From: Jorg S. <Jor...@gm...> - 2007-02-10 12:14:26
|
Todd Zullinger wrote: > Adrian Dusa wrote: >> This is my first post to the list and I think this might be >> interesting. I wanted to syncronize the KOrganizer calendar with my >> Video iPod 5G. Normaly, this is extremely easy using the default >> script found (in my distro) in: >> /usr/share/gtkpod-aac/scripts/sync-korganizer.sh >> >> The problem is related to the exportd file: both KOrganizer's and >> GtkPod's exported .ics file separate entries by an empty row. >> >> The iPod does _not_ like this empty row, thus showing only the first >> calendar item and the first to do item so on. >> >> Solution: get rid of the empty rows in the exported file. >> I'm currently doing this with Find and Replace using this regexp: >> Find: [\n\r]{2,} >> Replace: \n >> >> ... but it would be a lot easier if the GtkPod's script would do it >> by default. > > There is code in the script that should strip out empty lines. Do you > have an example file that the script doesn't work on which you could > post? > > Here's the part that's intended to weed empty lines: > > cat $DATAFILE | grep -v '^[[:space:]]$\|^$' > > I'm not sure about the grep regex there. It seems to me that it could > be simplified to '^[[:space:]]*$' so that it would match any line that > had only 0 or more spaces in it. As it is now it will match empty > lines and lines that begin with exactly one space. > > If your korganizer file has more than one space on the "empty" lines, > then this grep won't catch them and they'll end up on the iPod. Has this patch been confirmed to work? If yes, you're welcome to submit it. Cheers, JCS. |