Geeks With Blogs

News

qrcode

Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe


Lance's TextBox » About Me » My Resume »Twitter

I've been using Chris Pirillo's gada.be search service a good bit since it first game out. Its really cool. While it has more to offer than just the multi-source search, I realized that the multi-source search would be really easy to implement with RSSBus. RSSBus, after all, does give me the ability to easily mesh together and manipulate feeds.

One of the service operation libraries that comes with RSSBus is called FeedOps, and one of the operations it contains is called FeedUnion. The FeedUnion operation takes RSS feeds as input, and spits back out a single RSS feed that contains all the items from the input feeds, minus any duplicates (duplicates happen to be determined by RSS guid or link elements). So I can easily implement a search of MSN, Yahoo News, Flickr, Ice Rocket, Technorati, Feedster, and Google News in just a few lines of script:

<rsb:set item="input" attr="feed1" value="http://search.msn.com/results.aspx?q=mix06&format=rss&FORM=ZZRE" /> 
<rsb:set item="input" attr="feed2" value="http://news.search.yahoo.com/news/rss?ei=UTF-8&p=mix06" /> 
<rsb:set item="input" attr="feed3" value="http://www.flickr.com/services/feeds/photos_public.gne?tags=mix06&format=rss_200" /> 
<rsb:set item="input" attr="feed4" value="http://www.icerocket.com/search?tab=web&q=mix06&rss=1" /> 
<rsb:set item="input" attr="feed5" value="http://feeds.technorati.com/feed/posts/tag/mix06" /> 
<rsb:set item="input" attr="feed6" value="http://www.feedster.com/search.php?q=mix06&sort=date&ie=UTF-8&hl=&type=rss&limit=15" /> 
<rsb:set item="input" attr="feed7" value="http://news.google.com/news?hl=en&q=mix06&ie=UTF-8&output=rss" /> 

Then I call the feedUnion operation, passing the input item to it.

<rsb:call op="feedUnion" in="input">
<rsb:push />
rsb:call>
Notice the rsb:push there. For each item that results from the feedUnion operation, I just push it to the resulting RSS feed. If I wanted, I could add other logic to alter the item before pushing it.

 

The resulting output of this script is an RSS feed containing items from all of these sources, eliminating any with duplicate rss link elements.

Posted on Monday, May 15, 2006 8:27 AM | Back to top


Comments on this post: RSSBus: A script to search 7 sources at once.

# re: RSSBus: A script to search 7 sources at once.
Requesting Gravatar...
Why not just easily import the OPML we generate? BTW, our fetcher is built in .NET (running in mono libraries).
Left by Chris Pirillo on May 15, 2006 11:57 AM

# re: RSSBus: A script to search 7 sources at once.
Requesting Gravatar...
Chris, like I said - you have lots of great features - including OPML support.

In this post I am simply trying to demonstrate how RSSBus can let you work with feeds very easily.
Left by Lance Robinson on May 15, 2006 11:59 AM

Your comment:
 (will show your gravatar)


Copyright © Lance Robinson | Powered by: GeeksWithBlogs.net | Join free