Geeks With Blogs

Lance's TextBox

A minor beta update has been announced on the RSSBus blog (read about it here). Last summer I talked about how RSSBus gives you the ability to pipe together feeds and items from feeds. One of the really cool features of this new beta update is a new RSSBus script keyword: <rsb:pipe>. This new keyword simplifies the piping of feeds. I no longer have to use nested <rsb:call>'s, instead I can just put a series of calls inside the pipe and they are automatically connected and what comes out the end of the pipe is automatically pushed out to the resulting feed by RSSBus.

As a quick example, consider the script I posted last month about how to get a list of Amazon wishlist items for the top emailers in your inbox. That script looked like this:

<rsb:call save="mail" op="imapSearch?server=myserver&searchcriteria=ALL" /> 
<rsb:call save="union" op="rsbFeedUnion?feed=[_feeds.mail | urlencode]&filter=imap:fromemail" /> 
<rsb:call op="rsbSort?feed=[_feeds.union | urlencode]&sortby=rsb:count&type=numeric"> 
  <rsb:call op="amazonListSearch?email=[imap:fromemail]&type=wish"> 
    <rsb:push /> 

Now that script is not difficult to read and is fairly straight forward: search for mailers, save the results, union the results to filter duplicates, sort the results, and retrieve wishlist info for the results. Pretty easy.

But now its easier. With <rsb:pipe>, I can now get the same result feed without the nested call. Here is an example of <rsb:pipe> that works similarly to the above script, except for this example I'll change two things:

1. I'll get the wishlists of my Google Talk buddies instead of my top emailers.
2. I'll not only get the wishlist details, but I'll get the details of each item in the wishlists as well.

So now I'm piping together a list of Google Talk buddies with an Amazon wishlist search with an Amazon wishlist retrieval, and finally customizing the rss title and description of each result.

  <rsb:call op="gtalkBuddies" />
  <rsb:call op="amazonListSearch?email=[gtalk:id]" />
  <rsb:call op="amazonListGet?listid=[amz:listid]" />
  <rsb:set attr="rss:title" value="From [amz:customername]'s wishlist ([amz:listname])"/>
  <rsb:set attr="rss:description">
    From [amz:customername]'s wishlist ([amz:listname])<br />
    [amz:title]<br />
    <a href="[amz:asin]"><img src="[amz:imgurl]"/></a>

Technorati : , , , , ,

Posted on Friday, March 23, 2007 4:11 PM Programming , Software | Back to top

Comments on this post: RSSBus new beta - rsb:pipe

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: