-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
43 lines (33 loc) · 928 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
32
33
34
35
36
37
38
39
40
import json
from pprint import pprint as pp
from user_config import CONFIG
from wizcal import Wizcal
def main():
pass
if __name__ == '__main__':
for location in CONFIG["locations"]:
wc = Wizcal(city=location[0], country=location[1])
calendars = wc.get_calendar_data()
print("%s" % (location[0].upper()))
for events in calendars:
name = events["EVENT_NAME"]
address = events["ADDRESS1"]
store = events["STORE_NAME"]
eventFormat = events["EVENT_FORMAT"]
email = events["EMAIL_ADDRESS"]
phone = events["PHONE_NUMBER"]
web = events["URL"]
date = events["EVENT_DATE"]
gMap = events["googleMapUrl"]
attendees = CONFIG["guest_list"]
summary = "%s - %s (%s)" % (name, eventFormat, store)
desc ="""
Venue: %s
Format: %s
ADD: %s
P: %s
E: %s
W: %s
gMap: %s""" % (store, eventFormat, address,
phone, email, web, gMap)
wc.create_new_event(summary, address, desc, date, attendees)