Introducing xblog...
Please note that I'm moving all my personal website pages to my new blog on wordpress.com; this page may be removed at some point in the near future.
So, like I wrote in my previous entry, I got kind-of fed up with JRoller a while ago. Especially since their admins weren't too helpful in helping me export my data despite several emails (I did get some friendly help from Dave Johnson who works on the Roller package which powers JRoller, but he doesn't do administration for JRoller anymore). If anything, I want to feel in control of my data.
In control of my data? What does that mean? For me, that pretty much means it needs to exist as simple files on a filesystem, and be stored in a version control system, preferably SVN.
What else? I want to be able to work on my blog while offline. I want to support enough of the relevant standards to be considered a "good citizen" of the blogosphere. I want things to "just work". I want to author new entries using my text editor of choice. I want all the tools used for powering my blog to be open source, and written in a programming language and in a way that allows me to tweak the system easily. I don't want to worry about comment spam and the like.
I looked at using Sams custom blog package, but that looked like it requires a running python daemon, which I find a bit silly for content which is mostly static, and moreover its code isn't really documented all that well.
I looked at using PyBlosxom, which I stumbled upon mainly because Ted uses it. I got relatively far through configuring it properly, but me and pyblosxom kind-of got into a fight when I tried skinning the thing. I can't remember the details exactly; the tool certainly seemed nice enough. One thing I seem to remember is that it uses the last-modified timestamp from the file, which kind-of isn't what I want since I want to check things out of SVN on different machines and re-gen the static content based on when the file was actually last changed, not when it was last checked out. I tried to figure out how to hack a change for this into the codebase, but got lost somewhere within the whole extension framework that the tool has.
So, like many before me, I built my own silly blogging package. In python,
using Kid and assuming use of
SVN. Its not using SVN natively or
properly (even though I wrote
some helper code for using the svn python bindings a while
back), just parsing the working copy .svn/entries file and doing
a bunch of svn proplist / svn propget. Not pretty, not
finished, not particularly "well-designed", but it deserves the "works for me"
stamp of approval. I call this silly blogging package
xblog, and I've released it
under the CDDL. I don't
recommend using it and I'm not going to provide support for it.
Some reasons you might want to look at it anyway:
- Reasonable example of how to write a self-contained, small, portable, python utility
- Reasonable example of exactly how simple it is to generate some valid RSS (really, I don't get why there's been so much debate about this. It seems I got it (about) right the first time, and it didn't take more than an hour to implement)
- Simple examples of how to use Kid for generating XHTML and RSS
- Shows exactly how messed up python development is in terms of keeping backwards compatibility among minor revisions (eg the package should work with python 2.2, 2.3 and 2.4, but that was quite a bit of fiddling to get right)
- To rip out some of the useful bits and integrate them into some pybloxsom plugin or extension so you can use an actual proper open source project with some of the features I wanted (and you might want too)
- Reasonable example of how to create a custom variant of the XHTML 1.1 DTD (I ripped out a bunch of stuff that I don't want going into my blog entry 'source files')
- Reasonable example of how you set up libxml to work with (custom and XHTML) DTD catalogs
- Because you're bored and don't have anything better to do
:-)
I might accept patches, but really, I'd prefer people that have a need for this kind of tool invest their energy into making pybloxsom into a better product. It has a host of important 'real' weblog functionality I'm not going to add.
Update: Henri pointed out that I meant Dave Johnson, not Rod Johnson. Corrected. Thanks henri!