This is a simple script to scan an IMAP mailbox, pull in any messages with ICS files attached, and merge them into a single ICS file as output. I used this at work with our exchange-like server that did not support iCal subscriptions.
The script depends on the icalendar library from http://codespeak.net/icalendar/.