On the Blag Train
Posted by at 17:09 on 20 Sep 2008. There are ? Comments

Update (7 Mar 2009): I'm no longer using Habari but my own Django-based site backend.

It's been a good long while since I've had a blog and a great many things have changed, so here I am starting up a new one. I'm hoping to make this a place that I can put quick snippets of code, random stories and thoughts, and various other random things that don't really fit on their own page on .

<p>Josh
</p>

Josh

(~)
CameraCanon Eos Digital Rebel Xt
Date12 September 2008 at 23:54
Exposure ModeProgram Normal
Exposure Time1/250 seconds
Aperturef/8
ISO Speed1600
Focal Length24 mm
MeteringPattern
FlashOff

While I'm sure Wordpress is a nice piece of software I've decided to mess around with Habari because I really like the clean admin interface, how easy it is to modify (more on that later), the nice charcoal theme, and to piss off Josh, the dude above under the ominous white light.

First things first, Habari doesn't highlight code by default and I didn't like the plugins I found, so here is a quick one I whipped up this morning that uses Pygments, a really nice syntax highlighter written in Python. Note that Pygments must be installed on the server to make use of this plugin.

habari-pygments-1.1.tar.bz2

You can drop it in your plugins directory and after activating it use e.g. <pre lang="python">...</pre> to tell it to syntax highlight, which results in output like the following:

import os
import sys
 
def test(foo):
"""
Multiline comments
are a lot of fun
must resist a joke...
burma shave.
"""
print foo
 
# This is a comment
test("Hello, world!")

Expect some actual useful posts on here soon now that it is working nicely. Until then, let the mandatory beatings continue!

Comments

blog comments powered by Disqus