mailbox2ics

We have an Exchange-like mail server at work, but it doesn’t support
iCal subscriptions. Since I use a Mac, and don’t have any interest in
Outlook, that makes calendar access a pain.

After some poking around, I discovered that the server stores the
calendar information in IMAP folders, with each event in a separate ICS
file attached to a fake message. So I put together a small script read
the IMAP messages and merge the ICS files into a single output file. By
writing the output file to a folder on the web server, it is easy to set
up a subscription in iCal.

The result only works one way, of course, though it should be possible
to push fake messages into the IMAP server. I have not tried that,
because I just use the server’s web interface for adding new events to
the calendar.

The script depends on the icalendar package from codespeak.net, and
the Python standard library packages for IMAP and email parsing.

I have posted the script to my server: mailbox2ics.

feed auto-discovery

I added feed auto-discovery to CastSampler.com today. It was pretty
easy using the feedfinder.py module, except for one small
problem. Something about the timelimit() decorator in that module
causes problems with django or mod_python (probably
mod_python). When timelimit() is enabled, the finder either produces
no URLs at all or an exception about “unmarshalling code objects” in a
“restricted execution environment.” It works great in my development
environment, which does not use mod_python. To get it to work in
production, I disabled the timelimit() decorator. I hope that does not
come back to bite me in the future.

CastSampler.com

My most recent project is CastSampler.com, a tool for building a
personal “mix-tape” style podcast. I tend to listen to one or two
episodes from a lot of different shows, so I don’t want to subscribe to
the full show feed. Instead, I add the show to my CastSampler list, then
I can add only those episodes that I want to my personal feed.

I have plenty of work left to do, but the basic features all work now
so I would love to get some feedback.