Make iCal subscribable calendar from Exchange data

Nov 12, '04 10:17:00AM

Contributed by: jsc

If you're a Mac user in a Windows office, you may get a lot of meeting invitations through Exchange. In Mail.app, you can click on the iCalendar attachments and have them added to iCal, but iCal doesn't understand Exchange-generated time zones, so you have to manually change them to US/Eastern, or they will get mangled after syncing with .Mac. I was thinking of ways to automate the process, and came up with the following way to generate a calendar you can subscribe to from the Exchange calendar data.

You can access all the calendar events from IMAP, if your Exchange installation is configured for that, through a folder named Calendar. The basic idea is to grovel through all the messages in that folder, and generate one iCalendar file with all the events. While we're at it, we can also translate Exchange's time zone IDs to ones that iCal understands. This script is ruby code that functions as a CGI script to do just that. Make it available from a web server, and subscribe to, for example (enter as one line, not two, with no spaces, and replace all the obvious buts with your specific info):

http://server/cgi-bin/exchange2ical.cgi?
  server=exchangeimapserver.mycompany.com&user=me&password=xxx
A few caveats: [robg adds: I haven't tested this one...]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041110141248547