LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Blogs > catkin
User Name
Password

Notices


Rate this Entry

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)

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:
  • 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.
Functional description
  1. Reads an Orage calendar export (.ics) file from stdin.
  2. Converts any recurring VEVENTs into a series of single VEVENTs.
  3. Removes any VEVENTs that do not end or begin in the time range from a month ago to two months ahead.
  4. Removes Orage-specific data.
  5. Writes what remains to stdout.
  6. Logs to stderr.
Example usage
  1. 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.
  2. In Orage, assuming the default export file is ~/orage_export.ics: File → Exchange data → Export → (Export) Save.
  3. Connect the phone.
  4. 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
Development and test environment
  • 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)
Attached Files
File Type: txt filter_orage_ics_for_gnokii-0.2.awk.txt (37.6 KB, 1 views)
Posted in Uncategorized
Views 1724 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:16 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration