Add support for multi-event calendar files
My local utility provider publishes .ICS files with events like garbage containers being emptied:
https://portal-api.kredslob.dk/api/calendar/icsfeed/07513454__29_______/18340
I would like to import that into the Proton Calendar, but I am getting a message that multi-event ICS files are not supported. Would you be able to implement this feature?
-
Murloc
commented
Hi there
i have used this ical file and it worked with multi events:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//test v0.1//test customICALWriter//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20260303T030000Z
DTEND:20260303T220000Z
DTSTAMP:20260302T230000Z
UID:c3d871cf-d2a3-4f76-806d-d961a75f6416
CREATED:20260302T230000Z
DESCRIPTION:C1
LAST-MODIFIED:20260302T230000Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:C1
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20260405T020000Z
DTEND:20260405T210000Z
DTSTAMP:20260404T220000Z
UID:9fe072fe-fa96-4a27-820c-e6f27238e0f8
CREATED:20260404T220000Z
DESCRIPTION:C2
LAST-MODIFIED:20260404T220000Z
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:C2
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20260506T020000Z
DTEND:20260506T210000Z
DTSTAMP:20260505T220000Z
UID:e4923616-659f-4318-8c7e-acc80712efc3
CREATED:20260505T220000Z
DESCRIPTION:FE
LAST-MODIFIED:20260505T220000Z
SEQUENCE:2
STATUS:CONFIRMED
SUMMARY:FE
TRANSP:OPAQUE
END:VEVENT
END:VCALENDARin case you need to change some date info with powershell, here are some code examples, how you can change,replace,set stuff:
$icsDateFormat = "yyyyMMddTHHmmssZ"
(get-date(get-date($date.name)).ToUniversalTime() -Format $icsDateFormat)
(get-date(get-date($date.name)).AddHours(4).ToUniversalTime() -Format $icsDateFormat)
(get-date(get-date($date.name)).AddHours(23).ToUniversalTime() -Format $icsDateFormat)$templ_eventinf = @"
BEGIN:VEVENT
DTSTART:<START>
DTEND:<ENDE>
DTSTAMP:<JETZT>
UID:<UUID>
CREATED:<JETZT>
DESCRIPTION:<DESC>
LAST-MODIFIED:<JETZT>
SEQUENCE:<SEQNR>
STATUS:CONFIRMED
SUMMARY:<SCHICHT>
TRANSP:OPAQUE
END:VEVENT
"@$eventmidblock += $templ_eventinf.Replace("<START>",$Startzeit).Replace("<ENDE>",$Endzeit).Replace("<SCHICHT>",$titel).Replace("<JETZT>",$Jetzt).Replace("<SEQNR>",$seq).REPLACE("<UUID>",($([guid]::NewGuid()))).Replace("<DESC>",$beschreibung)
$icstxt = $templ_eventheader + $eventmidblock + $templ_eventend
#Save ICS
$icstxt | out-file $icspath#normalize ICS
Start-Sleep -Seconds 2
$path = "C:\Temp\icstest.ics"
$content = (Get-Content $path) -join "`r`n"
[System.IO.File]::WriteAllText($path, $content + "`r`n", (New-Object System.Text.UTF8Encoding($false)))