Extract courses to environment variable
This commit is contained in:
parent
60f6e6b339
commit
0ff469a195
1 changed files with 2 additions and 16 deletions
18
app.py
18
app.py
|
@ -11,24 +11,10 @@ def hello():
|
||||||
url = os.environ.get('URL', None)
|
url = os.environ.get('URL', None)
|
||||||
if url is None:
|
if url is None:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
cal_str = urllib.request.urlopen(url).read()
|
cal_str = urllib.request.urlopen(url).read()
|
||||||
|
|
||||||
FILTERED_EVENTS = [
|
FILTERED_EVENTS = os.environ.get('COURSES', '').split(',')
|
||||||
'MGL',
|
|
||||||
'SYD',
|
|
||||||
'SQE',
|
|
||||||
'COM',
|
|
||||||
'RSM',
|
|
||||||
'ANG1',
|
|
||||||
'DLG1',
|
|
||||||
'SPO1',
|
|
||||||
'SPO2',
|
|
||||||
'STA1',
|
|
||||||
'PST',
|
|
||||||
'SEC',
|
|
||||||
'DIA'
|
|
||||||
]
|
|
||||||
|
|
||||||
cal = Component.from_ical(cal_str)
|
cal = Component.from_ical(cal_str)
|
||||||
other = Calendar()
|
other = Calendar()
|
||||||
|
|
Loading…
Reference in a new issue