crazed monkey

Archive for January, 2003

RSS

Now serving dynamic and static pages

I was initially against using Blosxom to generate static pages as it would have meant duplication of information on my harddrive. Why should I have countless HTML and RSS files in addition to the TXT versions of my weblog entries? I then thought that it would be nice to generate static pages which played nicely with HTTP HEAD and the If-Modified-Since header. I still didn’t want the space overhead when, chances are, people were only interested in conditional downloads of the HTML and RSS pages in the category directories. Why not do both static and dynamic downloads?

I have wiped out my older rewrite rules in my Apache configuration for this weblog in favour of the following monster rule:

RewriteRule
^(([a-zA-Z0-9]+/)*[0-9]+(/[0-9]+)*/?(index\..*)?$)
blosxom.cgi/$1
[L]

That first part matches up archive entries by year, month and date in every category, possibly followed by an index page. (True, someone could post a URL which repeats a string of slash-separated numbers and it would still be processed, but it would have done so under the old rules as well. Maybe I will change that to force a “YYYY/MM/DD” format to the archives at a later date.) The “blosxom.cgi/$1″ dictates than anyone submitting a request matching the first expression is served a dynamic request, while the “[L]” portion tells the rewrite engine not to process anymore rewrite requests.

The above rule means that anyone requesting category pages not archived by date will receive a statically generated page. (I now have a script which will statically generate any modified pages and then remove any pages archived by date in order to save space.) Anyone requesting archives by date will receive a dynamic page.

I’m certain the above rule can be further optimised, but it’s good enough for now. If you use it and optimise it, please let me know.

Update: Some Apache mod_rewrite hacking has resulted in the following new set of rules:

RewriteRule
^(([a-zA-Z]+(/[a-zA-Z]+)*/)?(index\.(html|rss))?$)
-
[L]

RewriteRule
^(([a-zA-Z]+/)*200[2-9](/[0-1]?[0-9])?(/[0-3]?[0-9])?(/(index\.[a-zA-Z0-9]*)?)?$)
blosxom.cgi/$1
[L]

RewriteRule
^blosxom.cgi/(.*)$
-
[L]

RewriteRule
^(([a-zA-Z]+(/[a-zA-Z]+)*/)?[a-zA-Z0-9\-_\+]+.\html$)
blosxom.cgi/$1
[L]

That first rule allows HTML and RSS index pages for category URLs to escape rewriting and display the static page. The second rule is the same as my original rule above in that it serves dynamic pages for posts by date, but it also limits the valid values for the year, month and day. You can still enter an invalid date, it’s just a little more difficult. The third rule exists because Apache sometimes failed to stop the rewrite process after the previous rule. Finally, the last rule serves up dynamic single-entry permalinks.

You might notice that I have placed limitations on valid category names, post names and flavour names. It’s doubtful that I will have a category which contains numeric characters, or a post or flavour which contains characters other than alphanumeric.

Once again, if you use any of these rules and change them, I’d like to hear about the changes you make.

Tags:
  • none

Posted on January 27th, 2003 in meta, site - No Comments »

Categories back online; RSS feed additions

A new version of Blosxom was released last week and I decided to upgrade. This new version fixes a problem I was having with invalid name attributes for categorised entries and so I am now able to add categories to my weblog. This means that those of you who are only interested in programming entries can go straight to the programming category. Each category contains an RSS file in index.rss. Some entries remain uncategorised, but will be placed in appropriate categories once I determine what those are.

Speaking of RSS feeds, I have added a few helpful elements to the item entries, namely pubDate, category, and comments. This should make life a little easier for those using aggregators which take advantage of those elements.

Tags:
  • none

Posted on January 26th, 2003 in meta, site - No Comments »

Wireless sports data on a PDA

If you’re a sports fan and have a Palm OS® or a PocketPC® device, you might want to check out Covers’ new wireless sports matchups and live odds, powered by Phantom Fiber, Inc. Those with a wireless solution for their PDA can take advantage of up-to-the-minute sports matchups, injuries, live odds and articles on the go. If you don’t have wireless access, you can make use of the offline mode which synchronises data on the PDA, which you can then browse when the PDA is disconnected from its cradle. This is a free download!

Update: Blake has divulged some information about the client-side of the Covers application. Our development team has spent a lot of energy on exciting innovations on the client, specifically the Palm client. These efforts are mostly due to the fact that Palm does not provide many of the niceties that one has come to expect from either an operating system or a simple GUI platform.

Disclaimer: I am an employee of Phantom Fiber, Inc.

Tags:
  • none

Posted on January 22nd, 2003 in computers - No Comments »

Syndirella

Dive Into Mark: New news aggregator for Windows. Following Mark’s lead, I started using Syndirella for my news feeds. I was using AmphetaDesk before, which was OK once I installed the outliner plugin but it still wasn’t up to scratch.

Among other things, AmphetaDesk lacked a liberal RSS parser, RSS auto-discovery and support for item-level dates, all of which can be found within Syndirella. Syndirella’s best feature, however, has to be the built-in scraper which allows you to syndicate sites which refuse to provide an RSS feed. I have successfully configured several HTML-only feeds for syndication in this manner.

These features come at a price, however, as Syndirella requires the Microsoft .NET framework, a 20MB download. Still, even with its bugs it’s probably the best Windows-based news aggregator out there.

Update: Morbus Iff, AmphetaDesk’s author, has gracefully addressed the above three feature points. It seems as though many of my gripes are related to the outliner plugin and not necessarily AmphetaDesk itself, which is ironic since the outliner plugin made AmphetaDesk a much more enjoyable experience overall. Although AmphetaDesk supports auto-discovery, it does so through a bookmarklet (essentially a “Subscribe” toolbar button) and not when entering a URL in the “Add a Channel” page. Syndirella makes no such distinction, and even invisibly searches Syndic8.com for a feed when it cannot find one linked in the HTML, as per Mark Pilgrim’s RSS locator wishlist.

Even with Morbus’ helpful information, I’m still sticking with Syndirella for now. Having an aggregator application in which I can easily navigate to new items (by pressing the spacebar) is so much faster than any browser-based alternative. This doesn’t apply solely to AmphetaDesk as I used Radio Userland’s aggregator for a month, and it was the same way. However, as I mentioned to Morbus over ICQ, AmphetaDesk was quite nice in combination with tabs and gestures in Mozilla.

Tags:
  • none

Posted on January 21st, 2003 in computers, internet - No Comments »

Get Your War On: Sanctity of Human Life Day

A new page of Get Your War On strips was posted yesterday, including some scathing remarks on the United States’ Sanctity of Human Life Day.

WOMAN: If my daughters were systematically raped as part of a war crime, could I counsel them about abortion? Or would that violate the spirit of National Sanctity of Life Day?

MAN: Come on, we have to keep the spirit of that day alive all year! Like Ebeneezer Scrooge and Christmas! Life is sooo precious!

WOMAN: Yeah … what a precious gift life is. Especially when it’s forced into you, bloodily, again and again, by a group of soldiers holding you down in a refugee camp. The Lord works in mysterious ways.

Hey, that was yesterday! Happy belated Sanctity of Human Life Day, visiting Americans! Wouldn’t it be nice if you guys could celebrate your special day by fire-bombing Baghdad and “liberating” thousands of Iraqi citizens starved by crippling sanctions? That would be keen!

A history of National Sanctity of Human Life Day:

Keep spreading your compassion around the world and inside your own borders, Americans! You guys are the best!

Tags:
  • none

Posted on January 20th, 2003 in politics - No Comments »