Monday, May 30, 2005

Notice the new blogroll?

I've rewritten my blogroll generating script. First it's gone from Perl to Python. Second, it's got bigger. :-)

From about 20 lines of Perl to about 150 lines of Python with several classes. Some of that is due to the slightly more complex way Python gets at CGI variables. And some is because I've made the program do more.

Now, instead of simply reading a text file and converting it to includable javascript, it reads one file containing links and tags, and a second, template, file which decides what to show. That means the same "data-base" of links can be presented differently on different sites.

The template allows three kinds of line :

  • Plain-text which is output unmodified. For example, the subheadings you see on the left such as "Synaesmedia" and "IRL" are straight HTML <H3>s.

  • Single links, selected by name. For example, the data-file contains a link called "Synaesmedia Home" which links to my home-page. That's included in the template with the line ?Synaesmedia Home

  • Groups of links selected by tag. For example, all the links shown-under the IRL heading are links which are tagged "IRL", and the template contains a single line : * IRL which produces them in alphabetical order.

There are a couple of odd things about the script. The sorting is obviously by first name, whereas my old, hand-sorted, file was ordered by surname. So you'll find the links in different places. I should probably change that.

The other is that the same link can appear more than once if it has more than one tag. That looks a bit funny occasionally, but I think it's right in principle. Multiple-tags mean that the link should be seen in different categories.

Obviously, something that was initially trivial has started to grow, and that raises more questions ... how far do I want to continue with this? Is it worth adding to it further, or are there already existing services which handle the next level of complexity such as online editing of blogrolls and OPML sharing?

I don't know. For example, I've been wondering how I can integrate it with Zbigniew's Active Bookmarks. Or with

But is it worth it? Especially as blogrolling seems to be falling out of fashion.

1 comment:

Robert said...

well, it may not be fashionable, but ill certainly reciprocate your link by blogrolling you later on today :)