diff options
-rw-r--r-- | butler.py | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,9 +1,21 @@ +import sys + from ausbutler.config import load_config from ausbutler.interface import Interface from ausbutler.goniec import Goniec + +args = sys.argv[1:] +if len(args) == 0: + args = ['calculate', 'generate', 'send'] + i = Interface(load_config('butler')) -i.calculate_all() -files = i.generate_all() -g = Goniec(load_config('goniec')) -g.send(files) + +if 'calculate' in args: + i.calculate_all() + +if 'generate' in args: + files = i.generate_all() + if 'send' in args: + g = Goniec(load_config('goniec')) + g.send(files) |