-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold.py
66 lines (48 loc) · 1.49 KB
/
old.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
# OLD FUNCTION TO CHECK GOOGLE CALENDAR OUTPUT
# def print_events(events, calendar):
# count = 0
# # print("\n\n")
# # pp.pprint(events)
# # print("\n\n")
# for event in events:
# count += 1
# # Organiser
# try:
# organiser_name = event['organizer']['displayName']
# except:
# organiser_name = ""
# try:
# organiser_email = event['organizer']['email']
# except:
# organiser_email = ""
# # Summary
# summary = event['summary']
# # Start
# try:
# start = event['start']['dateTime']
# except:
# start = event['start']['date']
# try:
# start_tz = event['start']['timeZone']
# except:
# start_tz = ""
# # End
# try:
# end = event['end']['dateTime']
# except:
# end = event['end']['date']
# try:
# end_tz = event['end']['timeZone']
# except:
# end_tz = ""
# print(f"\n{calendar} #{count}")
# print(f"organiser_name\t{organiser_name}")
# print(f"organiser_email\t{organiser_email}")
# print(f"from\t\t{start} {start_tz}")
# print(f"to\t\t{end} {end_tz}")
# print(f"summary\t\t{summary}")
# print("\n\n")
# if UPDATE_BB:
# print_events(all_future_events_bb, "BB")
# if UPDATE_DV:
# print_events(all_future_events_dv, "DV")