My question is about parsing a .ics-File. The calender is going to be readonly. It will display events that are stored in a .ics-file. The file itself is maintained in Outlook and exported ~once a week.
Now my problem is about the parsing. I general it I need to do basically this in pseudocode)
calenderdata = file.open('calender.ics') for event in calenderdata: create_event(...)
But how do I do that? Has anyone here ever done this? I could write a simple parser myself, but there has to be a simple library for this… I just cannot find it…
The fileformat (this is real data) looks like this:
BEGIN:VEVENT CREATED:20200227T061211Z LAST-MODIFIED:20200227T061211Z DTSTAMP:20200227T061211Z UID:e8de5b1d-50ca-411d-946c-f20410f05839 SUMMARY:Schulelternrat PRIORITY:5 CATEGORIES:1 Informationen für Eltern DTSTART;TZID=Europe/Berlin:20171128T193000 DTEND;TZID=Europe/Berlin:20171128T213000 CLASS:PUBLIC SEQUENCE:0 TRANSP:OPAQUE X-MICROSOFT-CDO-BUSYSTATUS:BUSY END:VEVENT
There are several solutions like https://www.phpclasses.org/package/3478-PHP-Create-schedule-calendars-in-iCal-format.html.
But perhaps somebody here has a good solution for such a simple parsing-‘problem’…?