« the new new fall | Main | ed kuepper and jeffrey wegener at the NSC, 2005-07-13 »

hacking mail2ical to support ms outlook / exchange meeting requests

[ update: Georg Klein's rolled my changes into Mail2iCal version 1.3, along with some extra stuff for parsing URLs and working out the attendee list. You can get it here. ]

I found Mail2iCal, which sounded like exactly what I need to send all those MS Outlook / Exchange meeting requests into iCal. Unfortunately it doesn't do much parsing of the message body, which tells you all the fun stuff like the start/end date, where it is, and what's going on. After 2 years of using OS X, I figured maybe now was the time to start learning AppleScript, and work out how make it do what I wanted.

Surprisingly(?), I worked it out. Assuming you've got an e-mail with a message body looking something like this:

When: Monday, 11 July 2005 12:00-12:30 (GMT+10:00) Canberra, Melbourne, Sydney.
Where: One of the Meeting Rooms
*~*~*~*~*~*~*~*~*~*

We need to have a meeting about something or other.

it'll grab:

  • the start and end dates.
  • the location (if one's specified).
  • the description of the meeting (if one's specified).

It'll also hack off "Updated: " from the e-mail Subject, which indicates that it's a change to an existing meeting request. Maybe it's worth searching for a calendar event with the same subject and prompting to remove it before adding the new, changed event details. I'll leave that for some other time (or some other person) to do, though.

I've mailed my changes to the original developer Georg Klein, but in the meantime you can get my modified script right here, called ExchangeMeetingRequestToIcal.scpt. My code changes are pretty ugly and I've only tested it on half a dozen messages, so be careful it doesn't suddenly reach out of the screen and strangle you. Or something.

You'll probably find it most useful to invoke via a keystroke or two, with Mail Act-On.

Have fun!

* 18:21 * geek · comments (0)

Comments


Comments have been closed for this post. If you've got something to say, please contact me by other means. Thanks!