Yahoo Pipes – year 2

A long year ago, I’ve posted some geeky post about Yahoo pipes. Not too geeky, but geek enough. I watched the video tutorial, then I knew how they work, I knew how to manipulate the pipes, unfortunately I didn’t know what it’s for. LOL.

Today when I need it, I finally know what it is for.

Content Aggregator

The main purpose of yahoo pipes is to manipulate any content without concerning cross-domain problems. Normally we can not retrieve content from other domain. From example you want to retrieve rss feed from http://www.domainmaneh.com and you want to show the feed into your website http://www.domainurang.com. You can not easily passing content each other. You can easily pass each other if you are in the same domain. But in different territory, you can’t.

After googling it from one page to another, finally I found yahoo pipes interesting. First at all, we can manipulate it all we want using a funny and easy-to-learn diagram. Second at all cross-domain problem is out of question.

I found this article before realize what yahoo pipes is can be utilized for.

He writes – “I have two blogs and I am also active on Twitter, Flickr, delicious and YouTube. Is there a website that can aggregate everything and also provide a daily feed?”

Three possible solutions to the above problem are Google Reader, Yahoo! Pipes and FriendFeed. I prefer Google Reader because the Yahoo Pipes hack is slightly geeky while theFriendFeed hack will only import the post titles and image thumbnails into your lifestream feed, not the full content.

Well, I tried google reader, and it’s too much process. I can’t find a way to get what I want. I just want to retrieve the xml. DON’T CARE AT ALL if they said that yahoo pipes slightly geeky. I find it amusing. You can say I’m a bit geeky. I think most of us now are geeky about gadget too, aren’t they? BUT, I think they underestimate what common people do, LEARN. Yahoo pipes is easy to use, and has many tools that the other aggregator can’t offer.

I will demonstrate a little (please open pipes.yahoo.com:

  • Drag Source to canvas -> put your source (news, blog, RSSfeed, etc)
  • Drag anything to canvas (for example language translator? rules, etc?)
  • Connect the pipes -> connect the hole of each block in canvas, and end it in OUTPUT BLOCK

Et Voila. You can see the result in the bottom panel. I’ll give you a small jquery code that simply use yahoo pipes.


<html><head>
<title></title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js">
</script>

<script type="text/javascript">
//Routine to display the items of an RSS feed in a web page
// The output is attached to a uniquely identified HTML item

// The URL of the RSS feed you want to display
var url='https://ykzir.wordpress.com/feed/';

//The id of the HTML element you want to contain the displayed feed
var containerID="test";

//------------------------------------------------------
// The gubbins...

function cross_domain_JSON_call(url){
 // url points to an RSS feed

 url="http://pipes.yahoo.com/ouseful/proxy?url="+encodeURIComponent(url)+"&_render=json&_callback=?";
 // displayOutput(url);

 //fetch the feed from the address specified in 'url'
// then call "myCallbackFunction" with the resulting feed items
 $.getJSON(
   url,
   function(data) { myCallbackFunction(data.value.items); }
 )
}

// A simple utility function to display the title of the feed items
function displayOutput(txt){
  $('#'+containerID).append('<div>'+txt+'</div>');
}

function myCallbackFunction(items){
  // 'items' contains the separate feed items;
  // 'title' contains the item title, 'link' the url, 'description' the main text

  // Run through each item in the feed and print out its title
  for (var i=0; i < items.length; i++){
    displayOutput(items[i].title);
  }

  // You could easily call 'myArbitraryCallbackFunction(items)" from this function
}

// Tell JQuery to call the feed loader when the page is all loaded
$(document).ready(cross_domain_JSON_call(url));

</script>

</head>

<body>
<div id="test"></div>
</body>

</html>

Well, well, well? ‘Arry Viderci!

3 pemikiran pada “Yahoo Pipes – year 2

  1. Rizky, nanti minggu tgl 26 feb ada di Bandung? Kalo iya, dateng kopdar ya, di Kedai Mangga, katanya sih seberang Hotel Horison. Saya sendiri belom pernah ke sana.🙂
    Waktunya, sekitar jam makan siang, mendekati jam makan siang lah.🙂
    Kalo tahu blogger lain di Bandung, tolong ajakin ya. ^^

    Rencananya mau ketemu Mbak Ami, dan tentunya yang dateng dari rombongan blogger Bandung adalah blogger yang dateng di kopdar ini.:mrgreen:

    • Ngejawab pertanyaan Rizky di blog saya, kopdar itu ya ga nentu lama waktunya. Bisa 2 jam, bisa lebih.😀
      Tergantung obrolannya selesai kapan.😆
      Tapi, kalo Rizky mau pamit undur diri, silakan, gak ada yang ngelarang. Pokoknya Rizky nongol deh, setor muka gitu.:mrgreen:

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s