Vellum just keeps getting better

Vellum, Stuart Langridge’s weblog tool written in Python, started out sweet, and just keeps getting better. A few highlights:

Funky caching: when someone requests a page but the static HTML file doesn’t exist, Vellum builds the page and saves it to the filesystem. That means that if you change your template and want to rebuild a few hundred (or a few thousand) individual entry archives, you do it by deleting the files. That’s it. No waiting around while the script rebuilds them all, hoping that it doesn’t crash or get shut down by your host’s process reaper before it finishes. View an entry in your browser to create it, so you can see that your changes worked out, and then walk away. The rest of them will get rebuilt as needed, which probably means that it’ll be Googlebot that waits for them to be rebuilt, rather than you or any other human.

Plugins: Movable Type plugins are cool, but they really only let you affect the output of templates. Vellum plugins let you make serious changes or additions to the program itself. You can add or change existing attributes and methods (like adding additional fields to entries, or returning “Too damn early” for Vellum.Entry.Entry.PhraseTime when the entry was posted between midnight and 7 a.m., with just six or seven lines of Python), or your plugin can register itself with a Vellum hook, and then Vellum will call it whenever that hook’s event (things like after an entry is saved, or before the form to edit an existing entry is displayed) happens. Pinging is just a plugin, six lines of code plus comments, attached to the “entry-rebuild-post” hook. The current list of plugins includes pinging, pingback and comments, which both extend an Audience plugin that builds the “a TrackBack is a comment” idea right into the structure of Vellum, categories, a posting bookmarklet, and a Textile-alike plugin to format text like Dean Allen’s Textile. On the horizon? Well, Stuart’s looking at mxTidy, a Python interface to HTML Tidy, the program for cleaning up the sort of sloppy HTML and XML we all end up typing sometimes.

Code in templates: while I understand the desire many people have to use template engines like Smarty for PHP (anything to keep the l^Husers away from actual code!), I’ve always personally preferred the “PHP is a template engine” school of thought. Vellum’s templates work by embedding Python in the HTML. The docs say to look at the templates, and if your reaction is “Stone the crows, that’s a load of complex rubbish! How am I meant to customise that?” then you should probably look elsewhere for a blogging program. But if you like the idea of printing out the date for a post with <%=time.strftime("%B %d, %Y",time.localtime(e.posted))%>, so that the whole formatting is right there in your template (“Wow! It’s all real Python! I feel the power at my fingertips!”), then Vellum might be right for you.

I’ve been saying for just over a year now that there’s plenty of room for all sorts of weblogging programs, at all sorts of levels of geekery, and Vellum fits right into a huge gap.


No comments yet.

Name (required)
E-mail (required - never shown publicly)
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.