Feed: Scheme, and Stop-Gap solution

Feed: Scheme, and Stop-Gap solution

The discussion of the feed: scheme for Easy RSS Subscribing has been happening here and here. Feed urls would look like feed:http://www.thispiratekillsfascists.com/blog/index.rss .It turns out to be quite easy, in Windows at least, to set up an Aggregator as the handler of a URL scheme .. it’s just one Registry Entry.

This method will call the specified executable, with any arguments, including the URL that kicked the whole thing off. Now, this is where updates would be needed to aggregation software, and what led me to find a stop-gap solution.

  • The application should only run in one instance.
  • Subscriptions need to be accepted as command-line arguments.
  • The url needs to be parsed for HTTP retrieval (ie parse off “feed:”)

I’ve been using SharpReader lately, and it already complies with the first two conditions, but of course not the third.

In pondering the problem, I found that builtin windows applications rely on an intermediary to parse the url. For instance, telnet.exe is invoked by telnet://somehost.com/ — via something called url.dll, which parses the url and passes just the host on the command line. That seemed promising, but naturally url.dll wasn’t extensible.

Was there any other intermediary installed that could do this? I wanted to avoid having to install any more software. Well there’s Internet Explorer and javascript!

IE will open a url passed on its command line, and javascript: is a valid url. I wrote some javascript to parse the url, and request the “one-click subscription” link for SharpReader. It worked! And as an added bonus, to adapt the registry entry for another aggregator, only requires a small modification to the javascript. Here’s the registry entry. I was going to reproduce it here, but it just looks ugly, so please go check it out on the link, and import into your registry if you want to experiment.

The only problem with this method, is that a new IE window is launched. The code on the end is a trick to close that window automatically. It would be great to launch IE with no window at all .. any ideas or suggestions?