Script to filter an Orage export .ics file for gnokii to write to Nokia series 40
Posted 05-12-2011 at 06:21 AM by catkin
Updated 06-26-2011 at 09:51 AM by catkin (Update, version 0.1 to 0.2)
Updated 06-26-2011 at 09:51 AM by catkin (Update, version 0.1 to 0.2)
Hello
This script is a workaround for gnokii not being able to set recurrence when loading calendar events to Nokia Series 40 phones. It is designed to work with data exported from Xfce's Orage calendar. It is at an early test stage, please report any problems via comments to this blog entry.
More specifically this script:
This script is a workaround for gnokii not being able to set recurrence when loading calendar events to Nokia Series 40 phones. It is designed to work with data exported from Xfce's Orage calendar. It is at an early test stage, please report any problems via comments to this blog entry.
More specifically this script:
- Works with a subset of RFC 5545 as seen in Orage 4.6.1 export files. In its GUI, Orage only supports BYDAY; it does not support BYMONTH, BYMONTHDAY, BYSETPOS or BYYEARDAY.
- Supports non-recurring events.
- Supports recurring events of all frequencies, optionally with specified Weekdays and "Which days" except for yearly frequency (either I don't understand Orage 4.6.1's YEARLY with BYDAY or it is broken).
- Does not support TODOs and JOURNALS.
- Reads an Orage calendar export (.ics) file from stdin.
- Converts any recurring VEVENTs into a series of single VEVENTs.
- Removes any VEVENTs that do not end or begin in the time range from a month ago to two months ahead.
- Removes Orage-specific data.
- Writes what remains to stdout.
- Logs to stderr.
- Download either the attachment (this requires removing the final .txt used to meet LQ's file upload extension restrictions) or http://pastebin.com/SyQRnta8 as filter_orage_ics_for_gnokii-0.2.awk and make it executable.
- In Orage, assuming the default export file is ~/orage_export.ics: File → Exchange data → Export → (Export) Save.
- Connect the phone.
- Code:
cat ~/orage_export.ics | ./filter_orage_ics_for_gnokii-0.2.awk > /tmp/orage_export.filtered.ics 2> /tmp/filter_orage_ics_for_gnokii-0.2.log gnokii --writecalendarnote /tmp/orage_export.filtered.ics 1 end
- Slackware64 13.1 with
- Xfce Orage 4.6.1
- GNU Awk 3.1.8
- gnokii from git snapshot 5may11
- Nokia 5130c-2 (RM-495 with 07.97 firmware, USB 2.0 connection)
Total Comments 0