-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
68 lines (59 loc) · 1.87 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
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
import sys
from art import tprint
from tools.atacs import Atacs
from tools.unacs import Unacs
from tools.moodle import Moodle
from tools.profile import Profile
from tools.helpers import clean_terminal
def return_menu():
menu = 'Return to Menu (r): '
q = input(menu)
if q == 'r':
clean_terminal()
main()
def main():
clean_terminal()
tprint("ATILIM\nUNIVERSITY", font="small")
print(
' 1. Save Your Information\n',
'2. Save Your All Atacs Messages\n',
'3. Save Your Announcements of Moodle Lessons\n',
'4. Check the Opened Area Elective Courses\n',
'5. Save Your Financial Pay Table\n',
'6. Save Your KVKK Form\n',
'7. Download Moodle Main Course Page Documents\n',
'8. Download Graduation Photos\n',
'9. Exit'
)
client_dict = {
1: Profile.save_profile_data,
2: Atacs.save_atacs_inbox_messages,
3: Moodle().save_moodle_course_announcements,
4: Unacs.get_opened_area_elective_courses,
5: Atacs.fetch_atacs_financial_information,
6: Atacs.save_kvkk_form,
7: Moodle().download_moodle_course_files,
8: Unacs.download_graduation_photos,
9: sys.exit
}
query = int(input(r'Choose One (1/2/3/4/5/6/7/8/9): '))
if query == 3:
save_all = input('Do you want to save all course announcements? (y/n): ')
if save_all.lower() == 'y':
Moodle().save_moodle_course_announcements(save_all=True)
return_menu()
elif save_all.lower() == 'n':
Moodle().save_moodle_course_announcements()
return_menu()
else:
print('Wrong option!')
return_menu()
try:
client_dict[query]()
except KeyError:
clean_terminal()
main()
return_menu()
if __name__ == '__main__':
__version__ = '2.0'
main()