-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
43 lines (32 loc) · 1.09 KB
/
main.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
35
36
37
38
39
40
41
42
43
import os
import sys
from flow import Flow
from src.utils.common import Utils
os.path.dirname(__file__)
def main(argv):
if len(argv) == 1:
print(
"Please enter a city flag [option]\nTBLISI: -t\nBATUMI: -b\nKUTAISI: -k\n"
)
sys.exit(1)
if argv[1] == "-t":
flow = Flow(
Utils.get_json_to_dict("/config/sys/driver.json"),
Utils.get_json_to_dict("/config/routes/routes_TBLS.json"),
"./config/gsheetserviceacc/ServiceAccountToken.json",
)
elif argv[1] == "-b":
flow = Flow(
Utils.get_json_to_dict("/config/sys/driver.json"),
Utils.get_json_to_dict("/config/routes/routes_BAT.json"),
"./config/gsheetserviceacc/ServiceAccountToken.json",
)
elif argv[1] == "-k":
flow = Flow(
Utils.get_json_to_dict("/config/sys/driver.json"),
Utils.get_json_to_dict("/config/routes/routes_KUT.json"),
"./config/gsheetserviceacc/ServiceAccountToken.json",
)
flow.start()
if __name__ == "__main__":
main(sys.argv)