diff options
Diffstat (limited to 'bot/__main__.py')
-rw-r--r-- | bot/__main__.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bot/__main__.py b/bot/__main__.py new file mode 100644 index 0000000..915136e --- /dev/null +++ b/bot/__main__.py @@ -0,0 +1,19 @@ +from sys import argv + +from ._bs.load import load +from ._bs.tasks import tasks + + +def main(): + load('tasks') + if len(argv) <= 1: + print(f"Please provide a task to run: {' '.join(tasks.keys())}") + return 1 + to_run = tasks.get(argv[1]) + if not to_run: + print(f"Unknown task: {argv[1]}") + to_run() + + +if __name__ == '__main__': + exit(main()) |