changed hardcoded filename to sys.argv[1]
This commit is contained in:
parent
a9ed302574
commit
e5137b5206
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import icalendar
|
||||||
import datetime
|
import datetime
|
||||||
import hashlib
|
import hashlib
|
||||||
import time
|
import time
|
||||||
|
import sys
|
||||||
|
|
||||||
OFFSET = -time.timezone
|
OFFSET = -time.timezone
|
||||||
events_url = "https://bitlair.nl/Special:Ask/-5B-5BCategory:Event-5D-5D-20-5B-5BStart::%E2%89%A519-20January-202023-5D-5D/-3FStart/-3FEnd/-3FEvent-20location/mainlabel%3D/limit%3D50/order%3DASC/sort%3DStart/prettyprint%3Dtrue/format%3Djson"
|
events_url = "https://bitlair.nl/Special:Ask/-5B-5BCategory:Event-5D-5D-20-5B-5BStart::%E2%89%A519-20January-202023-5D-5D/-3FStart/-3FEnd/-3FEvent-20location/mainlabel%3D/limit%3D50/order%3DASC/sort%3DStart/prettyprint%3Dtrue/format%3Djson"
|
||||||
|
@ -45,6 +46,6 @@ for key, value in events['results'].items():
|
||||||
cal.add_component(event)
|
cal.add_component(event)
|
||||||
|
|
||||||
|
|
||||||
f = open('output.ics', 'wb')
|
f = open(sys.argv[1], 'wb')
|
||||||
f.write(cal.to_ical())
|
f.write(cal.to_ical())
|
||||||
f.close()
|
f.close()
|
Loading…
Add table
Add a link
Reference in a new issue