kopia lustrzana https://github.com/jazzband/icalevents
25 wiersze
609 B
Python
25 wiersze
609 B
Python
from icalevents.icalevents import events
|
|
|
|
|
|
if __name__ == '__main__':
|
|
with open('calendars.txt', mode='r', encoding='utf-8') as f:
|
|
while True:
|
|
line = f.readline()
|
|
if not line:
|
|
break
|
|
|
|
name, url = line.split(maxsplit=1)
|
|
name = name.strip()
|
|
url = url.strip()
|
|
|
|
fix_apple = False
|
|
if name == 'icloud':
|
|
fix_apple = True
|
|
|
|
es = events(url, fix_apple=fix_apple)
|
|
|
|
print("%d event found for URL %s" % (len(es), url))
|
|
|
|
for e in es:
|
|
print(e)
|