Archive for October, 2003

Too Cool not to Blog

I’m woefully behind in posting, a situation I intend to remedy in the next few days. Just been too busy.

In the meantime, here’s something that was just too cool not to blog. It’s a mini-dock that plugins into the back of a naked IDE harddrive (or CD or DVD drive), turning it into a Firewire drive. (via 0xDECAFBAD)

There is only XUL

Been doing some reading on XUL, The XML User interface Language used in Mozilla products like Firebird. Very cool stuff. Unfortunately, I’ve had some problems getting some of the samples/tutorials I’ve found to work under Firebird. It seems like some things have changed since Mozilla 1.0, and I haven’t found any good references on the differences. I’m going to continue tinkering and see if I can get it worked out.

Also, the excellent Venkman debugger from Mozilla Navigator is available as a Firebird plugin.

Using xhtml:body in RSS feeds via Blosxom

As I mentioned previously, I’ve recently begun using the full version of NetNewsWire, which honors the use of xhtml:body within an RSS feed. When I upgraded my feed to RSS 2.0 a while ago, I decided to include a forshortend version of the story in the RSS tag, and the full, xhtml content of the story within . Since I had been using NetNewsWire Lite, I could only see the short description.

When I loaded feed into NetNewsWire, I found to my horror that all of the xhtml tags were being escaped within my xhtml:body. I looked at my RSS flavour’s story template, and my html flavour’s story template. Both use $body to include the body of a post. But my html pages don’t have all of the tags escaped.

It turns out that blosxom.cgi is the culprit… it includes logic to escape less-thans and ampersands within storys if the output mime type includes ‘xml’. This isn’t exactly a bug… arbitrary xml (or html) tags within the larger RSS xml document could cause the RSS file not to be well-formed, and so to not parse with standard XML tools. However, since my content is all valid xhtml, and is being enclosed within the feed inside an xhtml:body, there’s no need for this escaping.

I patched my blosxom.cgi in the manner I would expect the change to be made to the official blosxom.cgi… as a configurable option. The changes are as follows.

  1. Add a new config variable
  2. Add it to the vars declaration
  3. Change the code to check this variable.

In more detail:

Step 1: In the ‘Configuration Variables’ section at the top of the file, add a config var.

 #set to 1 if RSS template wraps $body in 
$rssxhtml = 1;

Step 2: Find the ‘use vars’ section right below the configuration varibales. Add $rssxhtml to the list of variables between the !’s.

Step 3: Update the code. Look for this block of code (try searching for ‘xml’:

      if ($contenttype =~ m{\Wxml$}) {
        # Escape <, >, and &, and to produce valid RSS
        my %escape = ('<'=>'<', '>'=>'>', '&'=>'&', '"'=>'"');
        my $escapere  = join '|' => keys %escape;
        $title =~ s/($escapere)/$escape{$1}/g;
        $body =~ s/($escapere)/$escape{$1}/g;
      }

And change the first line to look like this:

      if (!$rssxhtml and $contenttype =~ m{\Wxml$}) {

I'm going to submit this to the list and see if Rael will incorporate it into blosxom.cgi.

NetNewsWire

For some time I’ve been generally unhappy with news aggregators. When I first discovered the magic of RSS, I had not yet switched. I tried Amphetadesk. I was impressed with the idea of running the aggregator as a local HTTP server, and with the fact that it was written in Perl. I quickly found, however, that I wanted three-paned aggregation, and that there was no robust template for Amphetadesk to meet my needs. I looked around and stumbled onto (what was then) a new three-paned aggregator for Windows, Syndirella. At the time I happened upon it, it was still in early stages, and new features were being added constantly, as suggested my members of the Syndirella mailing list. It was just about perfect for my needs.

Shortly after I started using Syndirella, I switched. Unfortunately, Syndirella is Windows-only, written in C# and .NET – I would have to find another aggregator. I have at times looked at NewsMonster, unfortunately it still does not work with Firebird on OS X. I‘ve looked at a few other products, and settled on NetNewsWire Lite. I considered the full version, but it’s $39, while NNW Lite is free. According the website, here’s the difference in versions:

The Lite version does not contain all the features of the full version. Specifically, it doesn’t display dates, subjects, and creators, it doesn’t include the Combined View, Find command, Scripts menu, or the Services menu subscribe command. It also doesn’t include the weblog editor and Notepad.

Didn’t sound like a reason to spend $39. At the time, I didn’t have a blog, so the weblog editor and notepad features didn’t mean much to me. I could live without date, etc. And so I’ve used NNW Lite, but I haven’t been happy.

Number one complaint… the one that has kept me looking for a new aggregator: when viewing an entry containing a link, hovering the link does not provide any indication of the link title or url. I often use this information to decide if a link is worth visiting. This means that every blog entry with a link (only about 99.9% of blog entries) gets opened in a browser if I think I might want to follow a link. Why use a three-paned agregator if you don’t read the content in the aggregator? (Update: As reported in the comments by Xian, NNW Lite now shows this info in the status bar when you hover. Cool!)

Still, I kept reading how everyone just loves NetNewsWire. I didn’t get it. When I updated my RSS 2.0 feed to show include full content via xhtml:body, I found another limitation of NNW Lite… it doesn’t use xhtml:body. Instead, I only see the shortend . Now, I was pretty sure I had read somewhere that NetNewsWire supports xhtml:body. So, I went to the homepage to check it out. I noticed that you get 30 days free before you must pay for the full version of the app, so I thought I’d give it a whirl.

Guess what? I can now view feed content inside of xhtml:body. Not only that, but hovering a link inside a story shows the link title and url in the status bar. Well, what do you know.

Now I have to decide if I’m willing to pay for an aggregator… of which there are many free options. Just none I like. For now, I can say that these two features make NNW a far better product that NNW Lite… the two may as well not be from the same company.