summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--butler.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/butler.py b/butler.py
index 2b253fa..9bf73e8 100644
--- a/butler.py
+++ b/butler.py
@@ -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)