diff --git a/conflict.py b/conflict.py new file mode 100644 index 0000000..f3e8004 --- /dev/null +++ b/conflict.py @@ -0,0 +1,12 @@ +from pathlib import Path +from ical.calendar_stream import IcsCalendarStream +from ical.exceptions import CalendarParseError + +filename = Path("./dmz.ics") +with filename.open() as ics_file: + try: + calendar = IcsCalendarStream.calendar_from_ics(ics_file.read()) + except CalendarParseError as err: + print(f"Failed to parse ics file '{str(filename)}': {err}") + else: + print([event.summary for event in calendar.timeline]) \ No newline at end of file diff --git a/dmz.ics b/dmz.ics new file mode 100644 index 0000000..86aae02 --- /dev/null +++ b/dmz.ics @@ -0,0 +1 @@ +BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Date iCal v3.8//NONSGML kigkonsult.se iCalcreator 2.20.2// METHOD:PUBLISH X-WR-CALNAME;VALUE=TEXT:Decentrala events BEGIN:VTIMEZONE TZID:Europe/Belgrade BEGIN:STANDARD DTSTART:20231029T030000 TZOFFSETFROM:+0200 TZOFFSETTO:+0100 TZNAME:CET END:STANDARD BEGIN:DAYLIGHT DTSTART:20240331T020000 TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST END:DAYLIGHT END:VTIMEZONE BEGIN:VEVENT UID:calendar.030419.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240304T190000 DTEND;TZID=Europe/Belgrade:20240304T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Hakaton URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.030519.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240305T190000 DTEND;TZID=Europe/Belgrade:20240305T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Kratka Predavanja/Lightning talks URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.031119.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240311T190000 DTEND;TZID=Europe/Belgrade:20240311T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Arduino radionica URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.031219.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240312T190000 DTEND;TZID=Europe/Belgrade:20240312T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Home made SOC build URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.031819.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240318T190000 DTEND;TZID=Europe/Belgrade:20240318T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Regex URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.031919.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240319T190000 DTEND;TZID=Europe/Belgrade:20240319T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Uvod u PCB URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.032519.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240325T190000 DTEND;TZID=Europe/Belgrade:20240325T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:Arduino radionica URL;TYPE=URI:https://dmz.rs/events END:VEVENT BEGIN:VEVENT UID:calendar.032619.field_date_time.0@radar.squat.net DTSTAMP:20240304T213601Z CREATED:20240304T213601Z DTSTART;TZID=Europe/Belgrade:20240326T190000 DTEND;TZID=Europe/Belgrade:20240326T190000 GEO:+44.805613;+20.479234 LAST-MODIFIED:20240304T213601Z LOCATION:DC Krov\, Kraljice Marije 47\, 6\, Beograd\, Serbia STATUS:CONFIRMED SUMMARY:(La)TeX URL;TYPE=URI:https://dmz.rs/events END:VEVENT END:VCALENDAR