Importing foreign (non-iCal) calendars into Google Calendar
August 19, 2008 at 03:24 PM | categories: python, free state project | View CommentsGoogle Calendar is highly useful. I use it to keep track of all my appointments and due dates and I get helpful reminders when dates approach via email and SMS. Not only that, but it allows me to collaborate with other people's calendars as well, and they don't even have to use Google Calendar because Google supports the industry standard iCalendar format. Things are great.
Unfortunately, iCalendar format is pretty new, and not everyone is using it.
Because Google Calendar is so useful, it is annoying when you find a calendar that is not in iCal format. Two of note that I want to follow are
Both of these calendars are running Simple Machines Forum, version 1.x which does not support iCalendar format (presumably they will in 2.0).
So I wrote an exporter: Download SMF iCal exporter
The exporter scrapes the calendar page on an SMF enabled site and dumps out an iCal compatible file.
Usage: smf_ical_converter.py -u http://yourforum.com/index.php -o cal.ics Download a SMF 1.x forum calendar and dump in iCal format Options: --version show program's version number and exit -h, --help show this help message and exit -u URL, --url=URL URL of forum (up to and including /index.php) -n Name, --name=Name Name of the Forum / Calendar (name goes in .ics file) -i EXPR, --ignore-re=EXPR Ignore any event containing this regular expression (specify as many -i as you want) -o File, --output=File iCal filename to write -v, --verbose Be verbose about process --months-backward=NUM Number of months to go backward --months-forward=NUM Number of months to go forward
I have this tool running in a cron job to keep up to date with the two above mentioned calendars. You can import these URLs directly into your Google Calendar:
- NHUnderground.com iCal calendar (Includes just events, I use "-i 'Birthdays:'" for this one)
- FreeKeene.com iCal calendar
Update 09/16/08: I uploaded version 2 of this application. It has a better README and it now supports user specific date ranges.