Tafelmusik

An Illusory Intertwingling of Reason and Response

Tafelmusik is a look askance at life. It is a chronicle of the Dance of the Good Thing, a part in which I strive always to take. Here lie my musings, my thoughts, my beliefs, and my desires. Join me. Dance.

Tafel :: meta :: plugins

Saturday, April 05, 2008

MicroID v0.1a for Blosxom

Mood: Geeky
Mood: Geeky

Download MicroID v0.1a

Sometimes I think my pages include more metadata than data. Ahh, well . . . at long last succumbing to the need to serve valid MicroIDs for each page of my own Blosxom installs (rather than simply for the first page), I bring you MicroID for Blosxom. MicroID will generate an arbitrary number of MicroID <meta> tags (for multiple claim emails) for your templating pleasure.

The difficulty with dynamic sites is that the MicroID contains the URL of the page signed, requiring pages to be signed on-the-fly as they're created. A precomputed MicroID for, say, the root level of a weblog, would become an invalid assertion over any other pages within.

For those of you who don't know, MicroID is a claim verification protocol allowing anyone with access to your email address to verify your ownership or control of your web pages. What it amounts to is the SHA-1 or MD5 signing of the page URL with your email address. Thus, you're able to attach your email address to pages, but only people who already know your address will be able to "read" it.

It's really no more secure in se than putting a <link rel="author" /> or any number of other semantic tags in your documents, as anyone who wants to could assert your authorship of an arbitrary document. However, it does provide a way for you to claim authorship without revealing personal details to anyone but the party you wish to convince. Thus the utility of MicroID is not in accountability (as it's too trivially forged), but in assertion of ownership.

Tuesday, June 21, 2005

Mood v1.1 for Blosxom

Mood: Geeky
Mood: Geeky

Download Mood v1.1

I’ve just fixed a bug which kept the last-declared mood and applied it to all stories after it, until a new mood was declared. Turns out Blosxom’s sub story doesn’t clear any variable associated with it each iteration. It was easy enough to make sure that nothing whatsoever was returned if no mood was declared, though.

So, voiláa! I give you Mood version 1.1. For more details see the original release post.

Mood v1 for Blosxom

Mood: Geeky
Mood: Geeky

Download Mood v1

This is my second Blosxom plugin, but my first “from scratch.” Today at work, in a few minutes, I scribbled out seventeen lines of code which have survived virtually unchanged (and only slightly expanded) in the final plugin. I banged out the whole thing in a couple hours; and if I were a halfway-decent programmer, it’d not even taken me that long.

One thing I would like to add is support for multiple flavour sets. Right now, it is possible to switch between predefined sets by using renamed copies of moodlist.pl and simply changing the require line. I suppose it would be possible to do something like require $blosxom::plugin_state_dir.'/moodlist.'.$blosxom::flavour.'.pl'; but it’s two AM and I want to get to bed. I suppose I’ll add that as an option in v2.

*****

Mood retrieves $meta::mood from a meta-mood tag within an entry file (parsed by Blosxom Plugin: meta) and uses it to provide either a textual or graphical representation of the mood. Requires Blosxom plugin: meta.

$mood::text places a textual representation of any mood tag found.

$mood::img places a textual, and when available, graphical representation of any mood tag found.

Mood images are defined in the file moodlist.pl, included in the distribution, which must be placed in the plugin state directory. Any mood can be linked to an image in moodlist.pl, more than one mood can use the same image, and images stored in different locations can be used.

SCase (Sentence Case) v1 for Blosxom

Mood: Geeky
Mood: Geeky

Download SCase v1

SCase allows the use of capitalized directory names without losing theability to resolve lowercase URIs. Currently only makes the path case-insensitive: filenames in permalinks are still case-sensitive.

1. Converts the requested path, $blosxom::path_info, to sentence caseallowing all-lowercase urls to be used.

This is useful since very few people (in the ordinary, mundane sense of the word: I would never be grouping anyone who would have occasion to read thisas one of the masses) know that URIs are case-sensitive. Out of laziness, mostpeople type only lowercase letters, even if the path contains uppercaseletters. This allows an all-lowercase path to "find" its capitalizedcounterpart.

2. Provides all-lowercase story path ($blosxom::path) to be used in links.To turn this option on, uncomment line 18. Really only useful if you areusing capitalized directory names but for some reason only want to presentlowercase links to the world at large.

Future Work: I'd like to extend the functionality to case-insensitive file-names ($blosxom::fn), for truly case-insensitive permalinks. Unfortunately,that's a bit out of my league. Some help, maybe?

SCase was inspired by the lcase plugin by Jonathan Lundquist. (Mirror)

Technorati