OPML

mdxi on 2005-06-20T06:29:15

Olive now has the capability to import lists of feeds in OPML format. Here's the first run:

mdxi@fornax:~/code/olive/trunk$ ./olive ~/MySubscriptions.opml 
Olive starting up.
Loading modules.
Initializing system.
Final stage setup.
Beginning OPML import.
71 of 72 feeds imported
See ~/.olive/errors.log for more information
mdxi@fornax:~/code/olive/trunk$ 
mdxi@fornax:~/code/olive/trunk$ cat ~/.olive/errors.log
-- Starting up at 2005-05-20T02:06:06 --
You're already subscribed to http://mdxi.collapsar.net/rss.xml as 'Diary'
mdxi@fornax:~/code/olive/trunk$

It's quite simple: start Olive with an argument, and that argument is taken to be the name of an OPML file to be imported. A couple of basic sanity checks are done for each feed found (nested outline files are understood, but the 'container' outlines are discarded) and if everything looks good, the feed is added to the feeds hash. When its done, Olive terminates.

The result of the above import (me folding rjbs's NNW subscriptions into my testing subscriptions, yielded the following status line:

 [S: 571/981] [U/N: 888/888]

So now we know that Olive handles larger amounts of data okay, and with the expected minimal increase in memory footprint (18M for ~80 feeds and 981 stories versus 17.5M for ~10 feeds and ~100 stories).

It still needs some cleaning up -- it should definitely ask the user for a new nickname when there is a collision instead of just throwing the feed out and writing to the error log as it does now -- but for right now I can consider this done and move on to the last few things I want to add before moving into a pure cleanup and documentation phase for a stable release.