Friday, November 10, 2006

Output any newsgroup as an RSS feed in a half dozen lines of code. Thats pretty impressive, really. How? With RSSBus and a little script that calls RSSBus NntpOps.

Here's how It Works:

The code (notice its only 6 lines of code not counting the comments):

<rsb:call op="nntpListArticles">
  <rsb:call op="nntpGetArticle?currentarticle=[messageid]">
    <!-- format the description and push it out-->
    <rsb:push>
    From [nntp:from] on [nntp:date]<br/>
[nntp:bodytext | encodehtml]
</rsb:push> </rsb:call> </rsb:call>

You can get a different group or a different number of messages by overriding the server, currentgroup, and range in the inputs to the script (ie, in the querystring).  Also you can tell the script whether to return the full text of the article or not by using the full variable, which defaults to false and returns only the first thousand characters.

There's a more complete version of this script which includes eliminating the need for specifying all inputs by using defaults, a complete rsb:info to provide metadata about the script, and a link to each article in Google Groups.

#   
Thursday, November 02, 2006

As it turns out, a lot of the operations provided by RSSBus work great as lists using Microsoft's Simple List Extensions (see previous post if you aren't familiar with SLE). As an example, consider the yahooStockQuotes operation. If you only wanted to be able to track the latest quote of your favorite stock(s), a list would work perfectly. No need to store historical items about previous quotes in your feed reader. If your reader is smart enough to analyze historical data and give you charts and graphs, that will be a different story, and you can easily change the feed to a regular one instead of a list by just turning on a simple treatas feed attribute).

As an example of an RSSBus generated SLE feed, here is a sample stock quote script. This script takes one querystring parameter called "symbols", for which the value is a space separated list of symbols to query for. You can subscribe to this feed in your own feed reader, replace the symbols querystring value with your favorite stocks, and voila.

#   
Thursday, November 02, 2006

RSSBus by default produces Microsoft's Simple List Extensions.

For anyone who's not familiar with SLE, the cool thing about it is that it can tell the feed reader to treat an RSS feed as a LIST rather than a regular feed. One effect of this in your feed reader is that when you subscribe to a LIST, the reader knows that it shouldn't accumulate all of the items in the RSS feed forever. Instead, it will only maintain whatever is provided in the current feed as a standalone list, no saving of old items necessary.

The RSS Team blog entry about SLE points out a few of real world examples where this is the desirable behavior. View these in IE7 to see the features of SLE come to life.

When someone buys something from your Amazon.com Wish List (perhaps through the AmzWish widget) and that item is subsequently removed from your wish list, there's no reason for it to still be displayed by your feed reader as a part of your wish list feed. Similarly, when Hinder's "Lips of An Angel" is no longer Yahoo's #1 song, your feed reader shouldn't maintain that old #1 ranking, it should show in the list that Hinder has fallen out of the top 10 (one can only hope) and delete that item from its local copy of the list. When you view the list in your feed reader it will still show all 10 items, even if some of them have not changed and have already been "read".

Another great feature of SLE is that it also identifies to the feed reader which elements of items the reader should allow the user to sort the list by. The Amazon Wish List feed suggests to the reader that you can sort the list by price, sales rank, number of reviews, etc. Also SLE lets the reader put items into groups. The Amazon Wish List feed tells the reader that it can sort the feed by product category, ie Books, DVDs, Music, etc. Neat, huh?


#