Chip's Tips for Developers

Contains coding, but not narcotic.

Handling iCalendar attachments with mutt and when

July 26th, 2010 9:55:01 pm pst by Sterling Camden

The other day I received a meeting request sent from Microsoft Outlook. This is the first such request that I’ve received since converting to mutt as my Mail User Agent (MUA). Thus, the request came as a file attachment of type “text/calendar”, which I could view as text. If you’ve ever looked at an iCalendar file, you know that they aren’t organized for easy reading. Finally, after I gathered the details, I added the appointment to my when calendar.

“I should automate this,” thought I. So I did. I’ve added some scripts to the remindwhen project to handle iCalendar attachments, including one “glue” script that’s specifically designed for use with mutt and when. See the README for details. As usual, tarball link is on the button below, or you can clone the Mercurial repository from BitBucket.

With the icalmutt.rb script in .mailcap for ‘text/calendar’, I can now view an iCalendar attachment without all the meaningless extra garbage that Outlook throws into it. At the bottom, it asks me whether I want to respond with accept, decline, tentative, or not now. If one of the first three, then the script creates an iCalendar response to the meeting and emails it to the meeting organizer using mutt (so it goes in my sent folder, too). If the response is “accept”, then the script also adds the event to my when calendar, with any specified advance alarm for remindwhen.

At some point, I’d like to add a script for creating a meeting as the organizer, but right now I’m tired of looking at the iCalendar specs and the sparse documentation of the icalendar rubygem (I ended up reading the source instead a lot of the time).

download

Posted in Ruby, Unix | 1 Comment » RSS 2.0 | Sphere it!

One Response to “Handling iCalendar attachments with mutt and when”

  1. [...] Handling iCalendar attachments with mutt and when — Chip’s Tips for DevelopersGetting all my email plumbing finished out.Tags: chipstips mutt when ruby email icalendar [...]

Leave a Reply

Better Tag Cloud