forked from MyElectricalData/myelectricaldata_import
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (28 loc) · 701 Bytes
/
main.py
File metadata and controls
33 lines (28 loc) · 701 Bytes
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
import sys
from dependencies import *
del sys.argv[0]
PARAMS = {}
for arg in sys.argv:
PARAMS[arg.split("=")[0]] = arg.split("=")[1]
ACTION = PARAMS["action"]
APPLICATION_PATH = "app"
production = False
test = False
if "env" in PARAMS and PARAMS["env"] == "production":
production = True
if "env" in PARAMS and PARAMS["env"] == "test":
test = True
if __name__ == "__main__":
if ACTION == "wizard":
wizard()
elif ACTION == "run":
if production:
run()
if test:
run(test=True)
else:
run(dev=True)
elif ACTION == "debug":
run(debug=True)
elif ACTION == "create_release":
create_release()