Re: [misc] adding LOCATION to import

On Tue, 02 Oct 2018 at 11:19:51, Marco van Hulten wrote:
> I'm looking into FR#1, specifically importing the LOCATION property of
> iCalendar files to the (anonymous) note to the respective event,
> together with DESCRIPTION which is already saved there.  I simply
> thought of
> 
>     strcat(note_content, "\n")
>     strcat(note_content, description_from_ical_event)
> 
> even though there are more sophisticated ideas floating around on misc@.

Thanks for looking into this. I do not like this way of implementing
location imports for different reasons; one of the most important ones
being that exporting such an imported iCal event yields something
without location and with a modified note. Optimally, import-export
should yield an iCal event equivalent to the original data. This is
particularly important since iCal import/export is nowadays also used
for CalDAV synchronization.

I think there was the idea of using special keywords (e.g. a separate
paragraph with something like "Location: Nowhere" and possibly other
headers) that have a special meaning when importing/exporting.

> Where in the code is the string after "SUMMARY:", "DESCRIPTION:" and so
> on read?
> 

I think it's part of ical_read_event().

> vevent.note is the hash/filename of the note.  Is there a variable for the note's content?

No, ical_read_note() immediately generates a note file and only returns
the hash, so you would have to rewrite that part of the import process.

Regards,
Lukas

Links