Hebe

by Sean B. Palmer

Hebe is a weblog system written in Python 3.1. It was written to power the Gallimaufry of Whits, and has command line and IRC interfaces. It's the sixth version of the Whits code, all named after the asteroids.

Usage

Get irc3.py, stream.py, and whits.py. Put them in a directory somewhere, doesn't matter where really. Then in the directory where you want to put your weblog (it can be the same directory as the code), copy template.html to index.html, and template.atom to feed.atom.

You'll need to edit the variables at the top of whits.py, and perhaps rename that file to hebe.py or whatever you like, and edit also the two template files that you copied over. You might also like to use the stylesheet that I use for the Gallimaufry of Whits, but it's a pretty spartan design.

To create entries, run either:

$ ./whits.py --irc

To get the bot to join IRC so that you can type input into a channel of your choice, or simply provide input as an arg to the program:

$ ./whits.py 'Some input.'

When you type text, it'll be added to the homepage, index.html, sequentially, so that if you did this in IRC:

<user> This is an {example http://example.org/} entry.
<user> This weblog is written using Hebe.

You'd see this on the weblog:

This is an example entry.

This weblog is written using Hebe.

You can use HTML and it won't be encoded: all the code does is to convert {title uri} into a link and wrap the text up in a paragraph element. When you've added enough lines (“items”) to make an entry, you can enter "%%" on a single line, either on IRC:

<user> %%

Or using the command line interface:

$ ./whits.py '%%'

This stops the current entry in index.html from being appendable, so that any new items thereafter will be added to a new entry above the current entry, and it copies what you've written into feed.atom. Typing '%%' twice in a row ought not to have any effect, but it might be better to avoid doing anything weird like that which might make the code uncomfortable.

The code is pretty messy, so I'm not actively supporting it, and you certainly shouldn't be thinking that it's production quality software. Users beware! If you don't backup your files, the stream editor that Hebe uses can quite easily eat them. This is why sed has an -i option.