-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
94 lines (83 loc) · 2.94 KB
/
app.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import os
from scripts.rtd_reports.archive_reports import archive_reports
from scripts.rtd_reports.convert_reports import convert_reports
from scripts.rtd_reports.filter_reports import filter_reports
from scripts.lt_sync.split_loadfile import split_loadfile
from scripts.lt_sync.process_ltsync import process_ltsync
from scripts.rtd_reports.aio import run_plasue_aio
import scripts.summary as summary
import scripts.exclusion as excl
import scripts.extension as extn
import scripts.utility as util
from utils.helpers import clear
clear()
def get_menu_choice():
def print_menu(): # Your menu design here
print(23 * "-", "LT Sync & Planning Plause UTILS", 22 * "-")
print("1) RTD: Filter and gather reports")
print("2) RTD: Convert and format reports")
print("3) RTD: Cleanup and archive reports")
print("4) RTD: AIO reports")
print(78 * "-")
print("5) LT SYNC: Process")
print("6) LT SYNC: Split loadfile")
print("7) LT SYNC: AIO LT Sync")
print(78 * "-")
print("8) SUMMARY: Prepare summary file")
print(78 * "-")
print("9) EXCLUSION LIST: add new parts")
print("10) PDT EXTENSION: add new parts")
print(78 * "-")
print("11) UTILITY: archive old RTD reports")
print(78 * "-")
print("U) Update program")
print("X) Close program")
print(78 * "=")
loop = True
int_choice = -1
while loop: # While loop which will keep going until loop = False
print_menu() # Displays menu
choice = input("Choose procedure to run: ")
print("\n")
if choice == "1":
filter_reports()
clear()
elif choice == "2":
convert_reports()
clear()
elif choice == "3":
archive_reports()
clear()
elif choice == "4":
run_plasue_aio()
clear()
elif choice == "5":
process_ltsync()
clear()
elif choice == "6":
split_loadfile()
clear()
elif choice == "8":
summary.prepare()
clear()
elif choice == "9":
excl.add()
clear()
elif choice == "10":
extn.add()
clear()
elif choice == "11":
util.archive_old_in_rtd()
clear()
elif choice == "u" or choice == "U":
os.system("git pull && pip install -r requirements.txt")
clear()
elif choice == "x" or choice == "X":
print("Exiting...")
loop = False
else:
# Any inputs other than values 1-4 we print an error message
input("Wrong menu selection. Enter any key to try again...")
clear()
# return [int_choice, choice]
print(get_menu_choice())