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)
|
||||
if url is None:
|
||||
return ""
|
||||
|
||||
|
||||
cal_str = urllib.request.urlopen(url).read()
|
||||
|
||||
FILTERED_EVENTS = [
|
||||
'MGL',
|
||||
'SYD',
|
||||
'SQE',
|
||||
'COM',
|
||||
'RSM',
|
||||
'ANG1',
|
||||
'DLG1',
|
||||
'SPO1',
|
||||
'SPO2',
|
||||
'STA1',
|
||||
'PST',
|
||||
'SEC',
|
||||
'DIA'
|
||||
]
|
||||
FILTERED_EVENTS = os.environ.get('COURSES', '').split(',')
|
||||
|
||||
cal = Component.from_ical(cal_str)
|
||||
other = Calendar()
|
||||
|
|
Loading…
Reference in a new issue