Flickr Contacts' Favorites - Simplified

Here's an example of creating a feed of your Flickr contacts' favorite photos using RSSBus, which makes complex feed parsing/manipulation tasks easy.  In my next post after this one I'll talk about how you can use RSSBus caching so that you can control which items are returned in the actual feed (for those with large numbers of contacts or favorited photos). For example, if this feed results in 400 photos for you, successive requests for the feed will not continue to return 400 photos - but only the new ones, saving bandwidth and making your feedreader work faster. Anyway, here it is:


First, here is a feed of my Flickr Contacts' Favorite photos.

Second, here is my explanation of why it is a big deal. Yesterday I saw this post from Jeremy Zawodny on the Yahoo Developer Network blog about a Yahoo Pipe that generates a feed of Flickr contacts' favorite photos. Jeremy says it's the "coolest Pipe I've seen for a while now".

complex pipe

I agree, this is a great pipe. The problem is - take a look at the compexity of this pipe (pictured to the right). Its a maze, a big mess.

But...it is a useful maze, so how can I simplify it? RSSBus.

RSSBus didn't contain any FlickrOps yesterday (except one yahooFlickrSearch operation that returns a feed of Flickr search results), but now it does. I could have accomplished my goal feed using RSSBus' xmlOps to consume and parse the Flickr services. But instead, I used RSSBus' open connector interface to create my own FlickrOps connector. In just a few minutes I added a brand new connector to the growing list, which I have shared on RSSBus.com.

At this point, it literally took me about 1 minute to create a new 7 line RSSBus script that produces the desired RSS feed. The script simply gets a username (it defaults to my Flickr username) and then pipes together calls to the flickrContacts and flickrFavorites operations that are defined in my new RSSBus connector:


<rsb:set attr="username" value="[username | def('lmrobins')]" />
<rsb:set attr="pagesize" value="[pagesize| def('0')]" />
<rsb:pipe>
<rsb:call op="flickrNSID" />
<rsb:call op="flickrContacts" /> <rsb:call op="flickrFavorites" pagesize="[pagesize]"/> </rsb:pipe>


You can try the finished product out for yourself, here is the url. I added some extras like a customized feed title and description, and links back to Flickr inside the rss description. To customize this feed to your own contacts, just provide your own username in the querystring. For example, here is what it would look like for Alto Maltes (the creator of the pipe). Finally, here is the source of the script so that you can download it and run it on your own RSSBus installation.

Technorati : , , , ,

Print | posted on Friday, May 11, 2007 12:08 PM

Feedback

# re: Flickr Contacts' Favorites - Simplified

Left by Edward Grech at 5/11/2007 12:56 PM
Gravatar I didn't know about RSSBus before I read your post! I'll have to check it out too :)

You say "Its a maze, a big mess.".

I perfectly agree with you. The cause of the mess is the lack of a native (dynamic) "Pipe selector" module. However, note that actually I have found cleaner way to do it:

http://pipes.yahoo.com/pipes/pipe.edit?_id=4pU6n9X12xG9sfULYEsBXw

However (one must keep in mind that Pipes! is still in Beta and) this implementation is not yet working stably enough to replace my first implementation with it.

In my opinion, alot of pipe's functionality could be implemented quite elegantly in XSLT. For me, the beauty of pipes is its graphical interface.

Thank you :)

# re: Flickr Contacts' Favorites - Simplified

Left by Edward Grech at 5/11/2007 1:35 PM
Gravatar I missed a relevant detail... :)

Actually, the source of the mess is not in the core functionality of aggregating the contacts' favorites. That is implemented quite neatly in the submodules.

The feed can be obtained in 2 modes, either with 1 item per contact, or instead with 1 item per fave, by specifying the choice as a query parameter. Each is implemented in its own pipe, and it is the selector between these two implementations that is making the pipe look complex!

# re: Flickr Contacts' Favorites - Simplified

Left by Lance at 5/11/2007 1:51 PM
Gravatar Yes I agree that Pipes has a ton of potential. I like playing with it. What I don't like is the slowness of it all, but no doubt you are better with it than me. :)

The current RSSBus script that I have isn't perfect, it needs caching (as I mentioned above). But I love flickr so I will probably create some other feeds too.

Your comment:





 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski