Featured Post

Linux daemon using Python daemon with PID file and logging

The python-daemon package ( PyPI listing , Pagure repo ) is very useful. However, I feel it has suffered a bit from sparse documentation, an...

2013-01-22

Web 2.0 made easy with IFTTT

Web 2.0 is about treating everything on the web as a datasource, and generating dynamic content based on one or more datasources. It used to be a fairly complex task: websites rarely presented their data in a structured form, much less provided APIs for access. So, one had to rely on a bunch of ugly screenscraping tricks which include pages of regular expressions.

Now, most sites publishing useful data also publish a machine-readable stream. Most will even provide APIs to access that data, e.g. Flickr (a Web 2.0 pioneer), Twitter, Facebook, etc.

The point of this post is to highlight ifttt.com (stands for "If This Then That"). It comes with many predefined "channels", which may be considered both sources of data and targets for publishing to. Personally, I use it to send myself a text message whenever the weather forecast predicts rain the following day. Recently, I just created a Tumblr (since there is a lot more social interaction between bloggers there than on Blogger), and wrote a recipe to duplicate posts in this blog to Tumblr. It reads the RSS feed for this blog, and every time there's a new item, a text post is created at Tumblr which links back to the post here.

I also have, for my personal use, a recipe that looks at Craigslist for listings of bicycles of a certain make, and emails me a link to the posting when one is found. For data sources which do not give legal RSS, one can use Yahoo! Pipes to preprocess the input and generate a clean RSS feed, which can then be used in an IFTTT recipe.