diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-09-01 19:31:47 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-09-10 19:01:00 +0300 |
| commit | 398799de0c1826c3544eb6eec681fa48096932a0 (patch) | |
| tree | c2a2cf7fcf30276ffc432e7a1750efd6b7d2c8bf /aggro.py | |
| parent | b7f129b29b8b8103336bfae265b3d5a0bc5ea03a (diff) | |
Refactor
Diffstat (limited to 'aggro.py')
| -rw-r--r-- | aggro.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/aggro.py b/aggro.py new file mode 100644 index 0000000..8e4f908 --- /dev/null +++ b/aggro.py @@ -0,0 +1,25 @@ +import json +import os + +from app.AggroConfig import AggroConfig +from app.PluginManager import PluginManager + +if __name__ == "__main__": + print("Starting aggro. Press CTRL-C to exit.") + + aggrofile_path = os.environ.get("AGGRO_CONFIG_PATH", "Aggrofile") + + with open(aggrofile_path) as f: + aggrofile_content = json.loads(f.read()) + + aggro_config = AggroConfig( + plugins=aggrofile_content["plugins"], graph=aggrofile_content["graph"] + ) + + manager = PluginManager(aggro_config) + manager.build_plugin_instances() + + try: + manager.run() + except KeyboardInterrupt: + print("Exiting...") |
