Comment 7 for bug 286247

Revision history for this message
kylea (kylea) wrote :

If anyone is interested - and if you are receiving calendar events from Outlook 2003 you may have the issue of this bug:

I have written a few shell scripts to fix the calendar.ics file before calling the multisync process.

The sync is run via a cron job every 10 minutes executing a script:

/home/kylea/Documents/Scripts/calendar.sh

#!/bin/bash -x
# Process the calendar.ics file via multisync

# First call calendar_fix_UID.sh, this pre processes the calendar.ics file
# removing and line wraps on UID:
~/Documents/Scripts/calendar_fix_UID.sh

# Now call the sync process
~/Documents/Scripts/calendar_sync.sh

First fixes the UID: wrapping, I used sed - with help from http://rhcelinuxguide.wordpress.com/2008/07/24/useful-one-line-scripts-for-sed-unix-stream-editor/

#!/bin/bash -x
# Process the calendar.ics file - remove wrapped UID: lines
#
# From this....
#
# UID:

# 040000008200E00074C5B7101A82E008000000006046A0AFD144C901000000000000000010

# 0000000E4DF46277EA324C85C0C223DA9AA877
#
# To this....
#
# UID:040000008200E00074C5B7101A82E008000000006046A0AFD144C901000000000000000010

# 0000000E4DF46277EA324C85C0C223DA9AA877
#

cat ~/Documents/Calendar/calendar.ics | sed -e 's/UID:\r/UID\\/g' -e :a -e '/\\$/N; s/\\\n/:/; ta' -e 's/UID: /UID:/g' > ~/Documents/Calendar/calendar_tmp.ics
cp ~/Documents/Calendar/calendar_tmp.ics ~/Documents/Calendar/calendar.ics
rm ~/Documents/Calendar/calendar_tmp.ics

2. and the script to do the actual sync: ----> ~/Documents/Scripts/calendar_sync.sh

#!/bin/bash -x
# Process the calendar.ics file via multisync
# see calendar_fix_UID.sh also - this pre processes the calendar.ics file

msynctool --sync nokia-sync --filter-objtype contact --filter-objtype note -- note --conflict 2/i

Hope this helps someone else