Created
January 2, 2023 11:04
-
-
Save tosiara/2f3b9e7666c11285e4ee887d8228bee7 to your computer and use it in GitHub Desktop.
Parse ical Google Calendar export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from icalendar import Calendar, Event | |
g = open("sun.ics","rb") | |
gcal = Calendar.from_ical(g.read()) | |
for component in gcal.walk(): | |
if component.name == "VEVENT": | |
print(component.get('summary'), component.get('dtstart').dt) | |
g.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment