A fixed location feed coming from a Google Spreadsheet timetable where weekdays are columns and hours are rows. This accounts for my usual daily toil between home and work.
A feed extracted from location information for events on my public Google calendar.
The three streams are merged and a result is selected according to a priority rating. Current version has a simple fixed implementation: timetable data has the lowest rank, while twits have the highest. It’s a rather complex use for Yahoo Pipes, featuring a master pipe with three subpipes with a pretty high module count. Have I started to reach the limits of the Pipes platform concerning pipe intelligibility?
Nearly every data mingling in Pipes is painful. And with painful I mean extremely painful. Dynamic data type conversion is handled by the platform and regex modules are of great help, but don’t attempt more than a handful substitutions or concatenations in the same pipe or things could go out of hands really soon. And let’s forget about numerical computations. Spreadsheets are a much more natural medium for all that jazz.
The Spreadsheets feature that puts it in approximate equal footing with Pipes are its functions for external data: a catalogue of spreadsheet functions that allow to retrieve content from outside the sheet for processing. The equivalent in Pipes are Source Modules: less painful to use, but at times less capable —it’s hard to beat full XPath XML data extraction, but then such a feature is overkill in most cases. On the other hand, good luck trying to synthesize feed items with Google Spreadsheets. It just doesn’t work that way. But putting differences aside, Spreadsheets should let me aggregate feeds and process them all the better. Publishing options allow me to emit a feed as a result; thus the full Pipes workflow would be realised, in a more compact way. True?
In cell A1, add the function =NOW(). That should nicely display the current date.
Now, publish your sheet and look for the More publishing options link, way down on the dialog. Click on it, and generate an URL for a cell-based feed for cell A1.
Open that link in any serious browser (one that supports RSS, I mean). What do you see?
The exact same date that appeared on the spreadsheet when you added the current date function. Now, wait an indeterminate amount of time, and retry. What? That’s not current any more! Plus, there is no caching involved. NOW() is not NOW() (I wonder if it should be called THEN()). Trouble is, spreadsheets are completely unable to update themselves unless an actual edit takes place. And this limitation affects external data functions too. The verdict: Google Spreadsheets are totally unusable for the purpose of aggregating, processing and emitting content. Humble Pipes win big this time with its, well, pipes paradigm.
However, Pipes and Spreadsheets can work together provided any dynamic component of the intended result is implemented on the Pipes side. Spreadsheets can just take on a supporting role, a kind of two-dimensional database. Which is a shame, if you ask me. Just think of the possibilities!
That is surely the motto for Yahoo Pipes developers. Not only they are in the process of improving and polishing a very interesting approach to content feed processing and remixing; but they are also a speedy bunch whenever it comes the time to interact with users (developers in their own regard). Just have a look at this short exchange in the Pipes Suggestion Board. It took less than 12 hours to get an answer!
Kudos to them, and be sure to check out their blog to look for the latest developments. By the way, I am about to release a new toy which uses Pipes, among other things (hint: now, it’s about geocoding). Stay tuned!
¿Para qué sirve un pipe con entradas de datos, si hay que ir a la página de Pipes para introducir los datos a mano? Hemos visto que podemos pasar nuestros valores a través de una URL (con un GET de HTTP); esto nos permite la automatización necesaria para añadir un elemento más a la cadena.
El código del bookmarklet se escribe todo en una misma línea, pero lo presento dividido e indentado para que se vea mejor la estructura. Además de presentarlo en una sola línea se procura que quede lo más comprimido posible (como un Perl one-liner) para encajar en la limitación de longitud de una URL en un favorito… alrededor de 2000 caracteres en Explorer (otros no tienen esas limitaciones).
Se trata de un código muy sencillo, en el que podríamos añadir más variables y llamadas a prompt para introducir más parámetros de entrada; lo fundamental es escapar, es decir, realizar un URL encoding mediante la función escape, el valor de lo introducido en las cajas de entrada a la hora de componer la URL (línea location.href). Aquí está, para añadirlo a los favoritos: bookmarklet BOEv2.