diff options
author | emkael <emkael@tlen.pl> | 2017-01-06 03:15:33 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-01-06 03:15:33 +0100 |
commit | b0b0e9f8e5e14b1fc67fbd5db37dc37abe76e0f1 (patch) | |
tree | 7d1fa3a64b390c3609107bb3f1f4ee92d4c34154 | |
parent | 7622060916c22daa0a12261756797cbf8c17ec03 (diff) |
Actions for command-line interface
-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) |