Linux tip, Fedora tip / howto: convert an ical 1.7 file to 2.0

 
back to notes and tips index

Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.

convert an ical 1.7 file to 2.0

This page is about converting .calendar files of the Tcl/Tk ical program.

I had been using version 2.3.1 for the longest time, which apparently uses version 1.7 of the calendar file, and recently updated to version 3.0.2, only to find that it exits with "illegal version".

Digging around the code for a bit I found that with a few small changes, a 1.7 file can be converted to one that can be read by ical version 3 (didn't really feel like entering all info again..).

I wrote a small converter script in Perl: convert_ical_calendar.perl
(right-click and select "Save As", run chmod 755 convert_ical_calendar.perl after download) (I changed the extension to .perl because the web server was trying to run it)

If you copied your old .calendar file to calendar_old, for example, then run it like this:

convert_ical_calendar.perl calendar_old

The script will produce a file calendar_old_v2, which you can then rename again to ~/.calendar


← back to notes and tips index
Please do not copy the text of this tip (© Patrick Min) to your web site.