Tag: Pipes

Filtering photos from a feed

I sometimes use my Tumblelog to post the odd photo from my iPhone. Generally I don’t want to post iPhone images to Flickr (typically these are spur-of-the-moment snapshots and low quality). There are actually two very nice free apps for the iPhone that let me post directly to Tumblr (called, imaginatively, Tumble and TheTumbler – I’m still trying to decide which one I prefer).

The problem is that I also feed my blog titles and my del.icio.us links to Tumblr, and my Flickr images, and sometimes I will also post a text note there too. Tumblr does not provide feeds on a per-item-type basis, it only gives an aggregated feed containing all the stuff you’ve uploaded there, or pulled in from other sources. Plus, if you then add that to FriendFeed, you get duplicates, even though FF can now work that out to some extent and roll them up into single entries.

Anyway… I put together a quick Yahoo Pipe which filters just the photos that were uploaded directly to Tumblr (ignoring Flickr images, for example). Feel free to clone and re-use, you can just enter your own Tumblr feed URL in the entry box at the top.

Update: well, shoot. It doesn’t ignore the Flickr images at all, does it? Gah. Apparently they are imported to Tumblr as images… which makes me suspect that even when I remove photos from Flickr they will stay on Tumblr. How annoying. And the more I look at the way that the Tumblr feed is constructed, the more I don’t like it at all.

Mixing Pipes and Plazes

I keep meaning to write a more detailed post about the changes that have been going on at Plazes, but in the meantime here’s a little doobrey I hacked up the other day.

Plazes now has a REST API (the old, pre-Activities version used to have an XML-RPC API). However, the information it provides is sometimes a little verbose for my purposes… I’d quite like to be able to simply ask the Plazes server “where am i?” and be told in a really simple format. Right now it looks like I need to know my user ID, and then go get http://plazes.com/users/<id>/activity.xml, and then get the name of the <plaze> element from the verbose XML that is returned. Something that just returned my current Plaze would be neater (for things like the ecto Applescript that I based off of Peter Rukavina’s Adium Applescript of days gone by, which used the old WhereAmI API).

So I turned to Yahoo! Pipes to see how I could abbreviate the output. I’ve created a simple Pipe which can return a small piece of JSON containing a user’s location when a user id (short name or number) is provided.

The base Pipe is here. It is not very useful in raw form as Pipes returns RSS by default, so running it will result in an apparently empty result on the web page. Try the JSON option instead.

You can add a user parameter (it defaults to my ID number, 6032), e.g. http://pipes.yahoo.com/pipes/pipe.run?_id=ZCgigzK93BGPeu60ouNLYQ&user=6032&_render=json

Running this query results in a JSON collection containing something like:

      "user":"Andy Piper",
      "plaze":"Andy's Office",

Annoyingly, Pipes only allows me to publish JSON or RSS (I’d prefer just simple text, but hey-ho).

Something more I’d like to do with this is to use Project Zero instead of Pipes, and make it more configurable to enable me to get more information on the user and plaze if needed.