I WUV THUNDERBIRD RSS!

I'll keep the adulation short: I absolutely love the embedded RSS support within the new Thunderbird. The key commands still bug me (but I can get used to 'em), the lack of being able to key to the folder list still bugs me (count yer tabs, boOooOy!), but I'm ignoring all that for the embedded RSS (which appears to be based on Forumzilla). I jumped right in and switched from Eudora at work (yep, they finally got Eudora import right too!) and I'm loving it.

Biggest annoyance with the RSS support, however, is that you can't sort your subscriptions, which seems like a pretty mindless thing to do. So, I whipped up a quick script (below). Your subscriptions are stored in a file called feeds.rdf in your user's Thunderbird folder, and you'll want to give the full path to that file as this script's only argument:

#!/usr/bin/perl
use warnings; use strict;
use XML::Simple; my $xml = XMLin(shift, KeyAttr=>['dc:title']);
my @titles = sort{ lc($a) cmp lc($b) } keys %{$xml->{"fz:feed"}};
foreach(@titles) {
  print " <RDF:li RDF:resource=\"";
  $xml->{"fz:feed"}{$_}{"dc:identifier"} =~ s/&/&amp;/g;
  print $xml->{"fz:feed"}{$_}{"dc:identifier"}."\"/>\n"; }

The script looks in the feeds.rdf file and writes out a new list of RDF sequence items which, theoretically, you SHOULD be able to just cut and paste. But, for some reason, you can't. I've done side-by-side compares, newline conversion, and yadda yadda yadda, but I just can't get the cut and paste magick working. What does work (but is insanely painful) is using this newly sorted sequence list as a guide to your MANUAL sorting of the feed.rdf itself. Painful, painful.

Anyone know what I'm missing for the last leg of this journey?

Update: Short story shorter, never trust a Windows text editor. Thanks to raku from #joiito, the above script has been edited, and cut and paste magick should work as originally intended. It was a simple matter of amperstands not being encoded.