Source code for csv_manager.applications.csv_manager_app
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from groundwork import App
from csv_manager.applications.configuration import APP_PATH
[docs]class CSV_MANAGER_APP:
def __init__(self):
# Let's be sure our APP_PATH really exists
if not os.path.exists(APP_PATH):
os.makedirs(APP_PATH)
self.app = App([os.path.join(os.path.dirname(__file__), "configuration.py")])
[docs] def start(self):
self.app.plugins.activate(self.app.config.get("PLUGINS", None))
self.app.commands.start_cli()
[docs]def start_app():
CSV_MANAGER_APP().start()
if "main" in __name__:
start_app()