On Thu, 2014-02-13 at 21:34 +0005, Sunny Sigara wrote:
I am trying to import a google holiday calendar with
While it can import all events from a evolution-ical file just fine,
it fails to do so for google calendar. I am using syncevolution-1.3.2
The problem is that SyncEvolution cannot split up .ics files which have
multiple VEVENT/VTODO/VJOURNAL components in a single big VCALENDAR.
This is what the Google calendar file contains.
The --import code which splits the file and then passes individual
chunks of it to the backend into which they are to be imported only
knows how to split at empty lines (the default). From the man page:
syncevolution --print-items <config> <source>
syncevolution [--delimiter <string>] --export <dir>|<file>|-
[<config> [<source> [<luid> ...]]]
syncevolution [--delimiter <string>|none] --import <dir>|<file>|-
syncevolution --update <dir> <config> <source>
syncevolution [--delimiter <string>|none] --update <file>|-
<config> <source> <luid> ...
syncevolution --delete-items <config> <source> (<luid> ... | *)
Writes all items in the source or all items whose <luid> is given
into a directory if the --export
parameter exists and is a directory. The <luid> of each item is used
as file name. Otherwise it cre‐
ates a new file under that name and writes the selected items separated
by the chosen delimiter
string. stdout can be selected with a dash.
The default delimiter (two line breaks) matches a blank line. As a special
case, it also matches a
blank line with DOS line ending (line break, carriage return, line break).
This works for vCard 3.0
and iCalendar 2.0, which never contain blank lines.
When exporting, the default delimiter will always insert two line breaks
regardless whether the
items contain DOS line ends. As a special case, the initial newline of a
delimiter is skipped if the
item already ends in a newline.
Adds all items found in the directory or input file to the source. When
reading from a directory,
each file is treated as one item. Otherwise the input is split at the
chosen delimiter. "none" as
delimiter disables splitting of the input.
If someone was interested in fixing this, he or she would have to add
methods in SyncSource for splitting up text according to the expected
content and then have the generic --import code call that.
Until then one has to pre-process input files to get the format that
SyncEvolution knows how to import. I'm attaching such a script. It
handles .ics files with one or more VCALENDAR inside.
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.