summaryrefslogtreecommitdiff
path: root/butler.py
blob: 72ccd33bef9805586fd594f16c6d89f2d5f95ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys

from ausbutler.config import load_config
from ausbutler.goniec import Goniec
from ausbutler.interface import Interface

args = sys.argv[1:]
if len(args) == 0:
    args = ['calculate', 'generate', 'send']

i = Interface(load_config('butler'))

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)