mon, 01-may-2006, 17:08

Last week I wrote a Python script to import my Unix calendar event files into Google calendar. Today I wanted to put the 2006 Alaska Goldpanners schedule into my Google calendar. I suppose I could have entered all the games in manually, but instead I came up with an event file format, and a script to translate these files into iCal files that can be imported into Google calendar.

The format looks like this:

2006-Jun-14 1900 2200 Goldpanners vs. Fairbanks Adult All-Stars

with one event per line. The start and end times are in military time, and events have to start and finish on the same day.

To convert a file of these events to iCal format, download, and run it like this:

cat mycal | ./ > mycal.ics

Then you can import it into your Google calendar using the Manage Calendars | Import Calendar tab. I'd recommend creating a new temporary calendar and importing into that so that if there are any errors, you won't have disturbed your existing calendars.

tags: linux  sysadmin 
Meta Photolog Archives