forked from poppu-mtg/StackIt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StackIt.py
34 lines (31 loc) · 906 Bytes
/
StackIt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
import os
import sys
import glob
try:
from StackIt import builder, config, watcher
except ImportError:
import builder, config, watcher
if __name__ == "__main__":
config.settingsfile = 'settings.yml'
if len(sys.argv) == 1:
try:
from StackIt import GUIapp
except ImportError:
import GUIapp
GUIapp.main()
else:
if sys.argv[1] == '--automatedtest':
for deck in glob.glob('testdecks/*.txt'):
builder.main(deck)
for deck in glob.glob('testdecks/*.de[ck]'):
builder.main(deck)
try:
from StackIt import GUIapp
except ImportError:
import GUIapp
GUIapp.main()
elif os.path.isdir(sys.argv[1]):
watcher.main(sys.argv[1])
else:
builder.main(sys.argv[1])