lfos / calcurse

A text-based calendar and scheduling application
https://calcurse.org
BSD 2-Clause "Simplified" License
992 stars 95 forks source link

`--export-uid` should be always on when exporting to iCal #351

Open goblin opened 3 years ago

goblin commented 3 years ago

According to rfc2445, regarding the "UID" property:

The property MUST be specified in the "VEVENT", "VTODO", "VJOURNAL" or "VFREEBUSY" calendar components.

Trying to import an ical file to Korganizer which was exported without --export-uid doesn't work and results in this error on the console:

org.kde.pim.kcalcore: The incidence didn't have any UID! Report a bug to the application that generated this file.

So here I am, reporting it.

The fix is obviously to pass --export-uid when exporting, but that's too obscure and should be on by default, because without it, the exported iCal files are not RFC-compliant.

The switch should probably remain there for backwards compatibility, but it should be a no-op when exporting to iCal.

lhca commented 3 years ago

According to rfc2445, regarding the "UID" property:

The current iCalendar standard is RFC5545, but the text is the same.

The fix is obviously to pass --export-uid when exporting, but that's too obscure and should be on by default, because without it, the exported iCal files are not RFC-compliant.

Unfortunately it is not as obvious as you might think, because --export-uid serves a particular purpose for calcurse-caldav.

Calcurse v4.7.0 included several updates to import/export of iCal files (which I wrote), but mandatory export of UID were left out after an email exchange with @lfos. The reason being that UID is used for CalDAV synchronization. This usage conflicts with the RFC5545 requirement that UID must be a globally unique identifier.

lhca commented 3 years ago

@lfos, is there any particular reason why the UID property is used for CalDAV synchronization?

RFC5545 allows the definition of non-standard properties: https://tools.ietf.org/html/rfc5545#section-3.8.8.2.

Why not define a calcurse-specific property, X-CALCURSE-UID, for synchronization purposes?

goblin commented 3 years ago

The current iCalendar standard is RFC5545, but the text is the same.

I got rfc2445 from https://calcurse.org/files/manual.html, perhaps it needs to be updated BTW.

lhca commented 3 years ago

@goblin, indeed.

The manual (doc/manual.txt) has not been regularly maintained for several years (five or six), and an update is a major task. Do not rely upon it.

The man-page (doc/calcurse.1.txt) is up to date, but covers only command line use.