February 2nd, 2009
Introduction to Yahoo Pipes
What is/are Yahoo Pipes?
According to the Yahoo website, “Pipes is a powerful composition tool to aggregate, manipulate, and mashup content from around the web.”
Launched in Febuary of 2007, there was a good bit of initial excitement that surrounded the launch, and although it’s grown quite a bit in terms of functionality, for one reason or another it’s pretty much remained a “i must get round to having a look at that” item for most web people which I think is a real shame. Hopefully, for some of you, this talk will give you that “must get round to” moment and furnish you with a basic overview of what it’s all about.
If I were to tell you that you could generate dynamic content including, text, images, video and audio on-the-fly without having to do any real programming, would that interest you?
If you want to aggregate content from various sources and use that content for another purpose then pipes is well worth a look. Another way to think about this was brought up on readwriteweb.com where it was concluded that with pipes, “the web essentially becomes a giant database that can be queried and remixed in any number of ways”.
What kinds of things can you do with pipes?
Well, there are a lot of things you can do with pipes, I’ve discovered several things myself that I don’t yet know about while preparing to give this talk. As this is an introduction, we’ll cover the basics and let those of you with an interest discover the rest for yourselves later.
- Display an RSS feed’s items on your web page without any programming using a “pipes badge”
- Create your own custom RSS feed pulling data from various sources, filter it and output more relevant results to display on a site/app
- Create custom search results by mashing up google results, yahoo results and msn results, or indeed any search engine you care to use.
- Pipes is not limited to text based results, it’s possible to return images, MP3 tracks (that includes podcasts, yes) and video.
- Possible to “clone” existing pipes and tinker with them to alter the output.
- You can even make a pipe from other pipes and you can take this as far as you want really.
- You can use pipes to power flash applications as well thanks to yahoo setting up an open crossdomain.xml file at pipes.yahooapis.com.
Who’s using pipes + for what
- Blondie’s website is using pipes to deal with her news RSS feed.
- There’s a US government dept using a pipe for aggregated news (not very interesting though!)
- A cycling website makes use of a pipe for their news feed.
- Any PHP people will have come across the CakePHP framework, they use pipes for their “super feed” here: http://cakephp.org/planet
To begin with, we’ll look at the yahoo pipes interface. It is a bit daunting when you first look at it but once you’ve dragged your first object onto stage and connected it to something else you soon get the hang of it. The list down the left hand side contains all the objects that are available to you. I’m not going to go through them all in detail, largely because I haven’t used some of them myself yet and also because of the time it would take.
I’ve prepared pipes built by myself and some other pipes created by other people. [Some of the custom pipes used have not been published for a number of reasons...sorry!]
- generate a basic RSS feed using the East Coast Interactive feed
- more advanced RSS feed – OKN-coverage [not published]
- display images by keyword from flickr – Photos from Flickr
- display picassa web albums by userID
- search engine mashup – search – highlander edition[not published]
- display last 3 podcasts from directory (loads of inputs, hence slow load time)
- display video from vimeo by tag
- multi pipe mashup with okn-coverage and highlander[not published]
Another way to deal with using the output is to have pipes generate an RSS feed of your mashup by clicking on the “Get as RSS” button and being a “do stuff manually kind of guy”, this is the method I used live on the night of the presentation to embed some feed content as html into the OKN website by the power of CFML (you didn’t think I’d miss an opportunity to speak about the mighty ColdFusion markup language did you?) So, in proper “here’s one I made earlier” fashion all we do is use the super handy CFFEED tag to go and read the generated RSS feed and then use a loop to return the items, displaying them in a list.
<cffeed action=”read” source=”http://pipes.yahoo.com/pipes/pipe.run?_id=CKvAv4Ht3RG7trrlpQt1Yg&_render=rss” name=”OKNCoverage” />
<cfloop from=”1″ to=”#ArrayLen(OKNCoverage.item)#” index=”i”>
<cfoutput><li><a href=”#OKNCoverage.item[i].link#” title=”#OKNCoverage.item[i].title#”>#OKNCoverage.item[i].title#</a></li></cfoutput>
Job done…now we have an always up to date list of what’s being said about OKN from many locations on the internet. This can be viewed here
You’ve probably noticed there are more options including the ability to add it to your yahoo or google page, return the data in a JSON format and you can even add it directly to your RSS aggregator of choice. Additionaly you can use yahoo’s alert service to notify you by email or sms when a new item is picked up in your feed giving you the ability to be super nosey. The last item on the list gives you some form of PHP back which may be of interest to some of you. Presumably it generates the php required to output an RSS feed with php on to a page…personaly I’m happy using my 4 lines of CFML but each to their own!
Many interesting things can be done with pipes as you can see. best thing to do is to head over to the website (http://pipes.yahoo.com) and give it a go yourselves, there is a basic tutorial on the homepage and once you’re bored with that, the next step is to hit the “Browse” link and start wading through all the pipes people have built. You can dissect how they work or clone them and re-engineer them to suit your purposes.
- There is an iPhone interface for pipes at http://iphone.pipes.yahoo.com/pipes/
I’ve been speaking to fellow OKN instigator Jack Keenan about doing some kind of pipes/max/msp mashup using particular keywords found in feeds to trigger audio/video etc. When we get that done, we’ll maybe show it at a future OKN. I’d also be interested to hear any other ideas you may have so feel free to comment.