wordpress it is *sigh*

While my search for good blogware has turned up the empty set, I’ve taken the easy option and gone with wordpress.

What did I want from my blogware? Well:

  • a minimal markup for inline formatting
  • the ability to copy and paste code without having to escape it or encode HTML entities
  • extending the code to be fun…

The only decent markup language I’ve come across is reStructuredText, although I can tolerate mediawiki’s. It does things right:

  • the markup is pretty close to what I’d use if I was posting in plain text
  • you can escape the markup if you need to
  • you don’t need to escape literal blocks (apart from indenting them)
  • it supports higher-level things like metadata, xrefs, citations

The only problem is that it’s very python-centric. Even though it’s semi-standardised, it evolves as the docutils dev team add features to the docutils processor. There aren’t processors for perl, ruby or C, so it’s not the why-aren’t-we-using-this-it’ll-work-ootb solution that, say, YAML is in its domain.

The plugin that sealed the deal with wordpress was reST for wordpress. It is a hack: it calls “rst2html“ and rips the body out, and recommends you turn off the “correct invalidly nested XHTML automatically” feature of wordpress (although this may be to avoid pre-processing, rather than because the rst output is broken).

I really wanted hobix to work. It wasn’t going to happen. Apart from the markup issues, its maintenance future doesn’t look bright. A bunch of stuff is broken, and from my exposure to that code base, adding my own plugins is likely to be anything but fun.

The motivation to post is at the critical lower bound as it is, without procrastinating about mending the posting-platform.

scroball.rb: an audioscrobbler client

After discovering the awesomeness that is last.fm I became annoyed at it indexing the misrepresentative contents of my local iTunes library. This gave the false impression that I spend most of my time listening to Kanye West’s Gold Digger (catchy though it is).

I play most of my music using iTunes Shared Libraries and an mt-daapd server running on a Debian NSLU2. If there’s a way to make last.fm scrobble music iTunes accesses from a DAAP server, I couldn’t find it. Then there’s all the music I listen to with players that lack audioscrobbler plugins. Why wait for last.fm to work out what my tastes are? I needed a way to let audioscrobbler catch up with me: manual scrobbling.

Fortunately audioscrobbler provides documentation of the Audioscrobbler Realtime Submission Protocol. From this, I hacked together a ruby script to scrobble my music directories: scroball.rb. It does do a little bit of subterfuge: it backdates and calculates the start times to avoid collisions that audioscrobbler would pick up in sanity checking. This can legitimately be used to retroactively scrobble a listening session.

ruby ~/scroball.rb p00ya `/bin/date -d 'last wednesday' +%s` .

yay! Hopefully the last.fm folks like it; it’s not intended for abuse.

dudders: Dynamically Updating DNS Duly Embracing RSA SIG(0)

For those of us with dynamic IP addresses at home (assigned via IPCP/PPP/ADSL) it’s nice to have a stable host name for remote access. My previous solution was to use dyndns, which uses an HTTP-based protocol to update a subdomain of one of dyndns’s domains. However, I preferred to use my own domain.

As I try to use cool crypto wherever possible, the public-key based SIG(0) from RFC2931 seemed like a nifty protocol to use. The usual tool for generating keys is dnssec-keygen, and for performing updates it’s nsupdate, both part of ISC’s BIND. I set this up and tested it from my MacBook Pro, where it worked fine.

However, since a WRT54GL router running OpenWRT controls my PPP connection, and thus knows when my IP address changes, the logical place to be running nsupdate was on this router. Unfortunately OpenWRT’s nsupdate (packaged as bind-client) is relatively large at 439186 octects; add to this libopenssl and bind-libs, and I’d run out of room on my JFFS2 partition. If you have the room, it’ll work for TSIGs: Ignace Mouzannar describes how to do it. However, even when I got it installed, I couldn’t make it sign a SIG(0) request. Chip Rosenthal has also noticed problems, and came up with an HTTP-based solution to get another host to run nsupdate, called web-nsupdate.

My solution? Write my own client in C, that can read the “dnssec-keygen“ key files. Presenting dudders: my lightweight DNS UPDATE client. It even comes as an OpenWRT ipkg. It still needs a crypto library, but it can use libgcrypt which (even after dependencies) still weighs in lighter than libopenssl.