Showing posts with label mashups. Show all posts
Showing posts with label mashups. Show all posts

Friday, March 21, 2008

scifAI Google Gadget

In celebration of World Poetry Day (right...), I published my first Google Gadget, for scifAI. Here it is:

Drop this on any web page using the code generated here.

You can, of course, add this to your iGoogle page as well. Go ahead, you know you want to. ;-)

Source code is over here. (Smaller version here, code here.)

more > | full >>

Monday, March 10, 2008

Tumblr hack: Author's Notes via Google Docs

This is a very basic HOWTO on retrieving a particular item in a Google Docs spreadsheet from your blog (not necessarily Tumblr), something that I could have used a few days ago. I use this over at my scifaiku site to show author notes for particular posts. *


  1. Create a new spreadsheet

  2. Use the first row to label the fields

  3. Enter some data

  4. Publish the spreadsheet

  5. Go to More publishing options

  6. Select RSS from the File format dropdown

  7. Click Generate URL and copy the resulting URL

  8. Modify the URL from something like
    http://spreadsheets.google.com/feeds/list/
    o<numbers>.<numbers>/od6/public/basic?alt=rss


    to something like (one line)

    http://spreadsheets.google.com/feeds/list/
    o<numbers>.<numbers>/od6/public/basic?
    alt=json-in-script&callback=notesLoaded&sq=postid%3D{PostID}


    where sq is a structured query (in this case, the postid field must be equal to the current Tumblr post id)

  9. Create a JSON call using the above URL, and put this near </body> (one line):

    <script src="http://spreadsheets.google.com/feeds/list/
    o<numbers>.<numbers>/od6/public/basic?
    alt=json-in-script&callback=notesLoaded&sq=postid%3D{PostID}" type="text/javascript"></script>

  10. Specify an output location using a named div
    <div id="authnotes_load"></div>

    If you want a nice "loading" animation to put inside this div, get one from ajaxload.info

  11. Write the callback handler:
    function notesLoaded(obj) {
    var notediv = document.getElementById('authnotes_load');
    if(typeof(obj['feed']['entry']) != 'undefined') {
    // 10 length of 'authnote: ', the first column
    var note =
    obj['feed']['entry'][0]['content']['$t'].substring(10);
    notediv.innerHTML = "<p><span>author's notes :"
    + "</span> " + note + "</p>";
    } else
    notediv.innerHTML = '';
    }

Adjust the above to taste. Enjoy!

You can see this in action here. A modified version is used at the main scifAI page ("42").

* Update: Deprecated in favor of just using Disqus comments.

more > | full >>

Sunday, February 24, 2008

Pipin' Not!

Hmmm. It seems the Yahoo! Pipes engine is down. All I'm getting for any pipe (not just mine) is:

Pipes encountered a problem while running this pipe: The Pipes engine request failed (-1)

I guess success does have its price. ;-)

Update 1: It's on and off. Mostly off at this time...
Update 2: Looks fine now.

more > | full >>

Pipin' Hot!

I'm obviously a big fan of Google (except for a few things here and there), and there are some projects of theirs, such as GoogleMashups and Jaiku, whose public launches I eagerly await. [ Hey Google, how about some dev accounts, huh? ;-) ] **

Meanwhile, I'm not one for thumb-twiddling, so I look around. Thus, I'm on Twitter and Yahoo! Pipes.

Yahoo! Pipes is simply fascinating, and I regret that I only started playing around with it over a year after its launch. If Google ever considered purchasing Yahoo!, Pipes was likely on its list of Pros.

The concept behind Yahoo! Pipes is simple: you stitch together various elements and transform data as it travels from one end to another. All this is done via a neat AJAX interface.

From the site:

Pipes is a powerful composition tool to aggregate, manipulate, and mashup content from around the web.

Like Unix pipes, simple commands can be combined together to create output that meets your needs.

I started on Pipes by combining Twitter JSON feeds and RSS from Prologue-themed WordPress sites, e.g. psyku.tk. It was a pretty interesting exercise, and you can see the results in my "Twitter + psy//ku" widget box.

Here's a snapshot of one of my pipes in the editor:



I'm sure I'll be working on more pipes as time allows. Check them out at pipes.yahoo.com/ibrado.

** Feb 26. I now have Mashups access.

more > | full >>

meanwhile, over at alexandr...