More on the Mail/RSS gateway

Gabe and I got together yesterday to work on our email/RSS gateway software. He came up with a list of possible names (the most crucial part of any project). I liked the sound of "Bleek" and so that's what we picked.

Gabe notes that we made quite a bit of progress, and we did. A seasoned Python programmer would probably be done already, but that's not what we are. We pair-programmed XP-style, which was kind of neat.

It turns out that the project is going to be easier and harder than I anticipated. It turns out that there is a Python API for reading mail boxes. It was right under my nose in the standard library: mailbox. Gabe also found a nice sample script which shows how to read and write an mbox file. The mailbox API means we'll be able to support a number of mailbox formats, including MBOX and maildir.

I also found out that the XML-RPC libraries we need are a standard part of Python 2.2. That's great news.

Discovering the Python Library Reference was a great boon. I had previously been using the anemic module index, which doesn't serve as any kind of reference for the built in functions and exceptions. One of my major complaints about Python's documentation has disappeared. Now if only the API reference was as good a Sun's JavaDoc...

The bad news comes from the weblog front. I examined the Blogger API more closely, and it turns out to suck rather a lot. You can't even title posts. Blogger also has no concept of "below the fold" which I wanted to use. To provide metadata for weblog posts, Dave Winer came up with the Meta-Weblog API. It provides a struct (basically, a hash) for posting. This is nice because you can extend your server and client to allow custom behavior, but it also means each weblog implements this differently (sadly, there doesn't seem to be an implementation of the Meta-Weblog API in Python). The original Blogger API is also implemented differently for each weblog, but in a simpler way. Then there's the Blogger 2 API, which addresses the problems of the orignal, but isn't widely deployed yet.

We decided to have the user configure which type of weblog they are going to use (Blogger, Movable Type, Manilla, Live Journal, etc.) and we will implement appropriate XML-RPC posting mechanism. We're going to start with Movable Type because that's what we have and it has the best support for what I want to do.

Finally, we need to implement the HTMLization of emails and threads. I'll be working on that this week.

Ry4an sent me a long critique of the idea which I will post soon. He respectfully disagrees that the software is worth writing.