-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
31 lines (26 loc) · 930 Bytes
/
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
import enquiries
import os
from project import (analysis_handler, download_handler, edit_handler,
ensure_mismas, project_dir_handler, report_handler)
ACTIONS = {
'[>] Generate Report': report_handler,
'[>] Download': download_handler,
'[>] Analyse': analysis_handler,
'[>] Edit': edit_handler,
}
def main():
os.system('cls' if os.name == 'nt' else 'clear')
print('Welcome to MISMAS')
mismas_dir = ensure_mismas()
project_dir = project_dir_handler(mismas_dir)
menu = ['[>] Generate Report', '[>] Download', '[>] Analyse', '[>] Edit', '[x] Exit']
while True:
choice = enquiries.choose(prompt='What do you want to do?',
choices=menu,
multi=False)
if choice == '[x] Exit':
break
else:
ACTIONS[choice](project_dir)
if __name__ == '__main__':
main()