Parsing ICS to populate a calender (here: FullCalender.io)

Hi

I would like to display a calender (using FullCalendar.io). The calender itself works: Kalender der KGS | KGS Rastede

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 iCalCreator: Create schedule calendars in iCal format - PHP Classes.

But perhaps somebody here has a good solution for such a simple parsing-‘problem’…?

Just an update, in case somebody runs into this problem him/herself:

I created a PHP-Script that rewrites ICS to JSON. This JSON can be read in by Fullcalender.io. So solved outside of Kirby.