Very few people know that I love gardening and I love flowers (one of my new found interests while I was on a 8 month job break). One of the challenges for a budding gardener is to find out what all is blooming during this time of the year, and though you can make a dash to a nursery; lazy bums like me prefer the e-way! So, my way of finding the (good & not so common) flowers is by scurrying flickr to find recent blooms in my city. This method has served me well but since I've been completely bored off-late; I decided to automate the entire process.
Enter popfly:I had played with popfly when it was launched; and couple of days back I decided to log in to see if there was any new features/improvements to it; first thing that I figured out was that none of my blocks were working! Fixing them wasn't tough and since I had long ago written a flickr block to retrieve photos from flickr; I decided to re-use it for my flower search. The logic is quite straight-forward; the block expects the city name (actually, a place) as a user input; hits flickr to get the place id for the user entered text and then hits flickr again with a hard-wired query (currently set to: flower+bloom). Since, I would most probably be only interested in finding the recent blooms (instead of flowers blooming last summer), the code also limits the photos to the ones which were taken in last two months (current month-2). Finally, the block wires the output to a display block to display the flowers in some kinda slide show. I ran into couple of issues with the wiring of display block I decided to use (ImageSlideShow): it wouldn't clear the images before starting a new slideshow; this would mean if I search for say Boston first, and in the mid of slideshow; decide to search for Seattle; the seattle flowers are appended to the boston list! Fixing this issue meant, ripping off the ImageSlideShow block; exposing the clearImages method and calling it in the glue code between flickr block and ImageSlideShow block. Once, the mashup was all set; I decided to create a web-page around it in popfly; unfortunately the html generated is not the best (understatement) and I haven't felt like tweaking it (yet). I generally don't like iframes but that's what you get with popfly and I still haven't figured out a way to change the background of my mashup. Anyway, in case you are interested in giving [i]bloomrtm a twirl; you can give it a shot here: on popfly or here
No comments:
Post a Comment