Blosxom Plug-in: multicat
I love my blogging software - blosxom. It's just so light, compact,
and easy to use. Blosxom is especially nice for someone like myself
that prefers to use a mouse as little as possible while using
a computer. I can use the
command line to author a new blog entry using vi, spell
check the new entry using aspell, modify
the blog entry's publication date using touch, and use
the standard unix file system commands to insert my new blog entry into
my blog file structure (i.e. my blog's category heirarchy). And I can
do all this as fast as I can type the commands at the shell prompt.
There is one limitation of blosxom that I just recently bumped up
against. The limitation is a byproduct of using the blosxom data
directory structure to double as the blog's category heirarchy. Each
blog entry lives in one directory, and thus one category. Sure, a blog
entry can be copied into (or a link made in) another directory to
associate the entry with a secondary category, but then blosxom
will show that entry multiple times. So, that's no good.
I wanted to find a way around this behavior primarily because I
wished to associate the daily journal entries
(located in "/daily_journal/2006")
that I composed about our recent trip to Vancouver
with a new category
(something like "/vacations/2006/vancouver"). That way, I could still
read my daily journal in a linear fashion using a URL like:
http://rus.berrett.org/blog/daily_journal/2006/
yet, at the same time, access just the journal entries that detail our
Vancouver vacation using a URL like:
http://rus.berrett.org/blog/vacations/2006/vancouver/
(Note: the above examples of URLs to access blosxom blog entries
presume that
my
modifications to blosxom with regard to "viewing by date" have been
applied to the blosxom installation).
With that goal in mind (one entry - many categories),
I set to the task of creating a blosxom plug-in that will allow me to
"file" a blosxom entry under one or more different categories while,
at the same time, suppress the display of the multiples. I was able to
create a plug-in (which I've named "multicat") that does exactly that.
The "multicat" plug-in allows me to easily classify a single entry under
many different categories (i.e. different directories) using symbolic
links. The multicat plug-in controls when the symlinks to the entries
are displayed and when they are hidden. Thus, the display of duplicate
entries (which is the normal blosxom behavior when symlinks to files
are encountered) is suppressed.
Support for the comments plug-in and the writeback plug-in is built-in.
Comments (or writebacks) that are added to or appear on a source entry
will show up in the symlinked entry and vice versa.
I think what I have done is very clever and I'm very pleased with the
result. I can now create symlinks to blog entries in other secondary
categories and, in effect,
file a single blog entry under multiple categories. This was something
that was impossible to do before (and I scoured over many different
other blosxom plug-ins) and, ultimately, I think it could be very
useful to the blosxom blogging community at-large (but I could be
wrong about that).
So, using the example above, I can now build a URL to access all of the
entries in my daily journal that are just about our recent trip to
Vancouver. Check it out:
Note that each of those entries has not one, but two, categories that
it is associated with. Mission accomplished.
More information about the multicat plug-in can be gleaned by reviewing
the source code (my perl reads pretty easy), or by reading the man page.
I have provided links to both (as well as my development log) below:
cheers!
(Update Mon Mar 13 00:47:59 PST 2006 // fixed a grammatical error)
|