Although it has been around for quite a while, I recently discovered IFTTT, a web application that makes an honest attempt to make the social media craziness a little less crazy.

In a world where people are hypnotized by their mobile devices, you can't blame business to be present where the attention of their audience is. This is what people's jobs look like: they look like teenagers sending pictures to each other on Facebook and tweeting what they had for lunch. That's how serious business has become. So how does IFTTT work and how can it help us to do the work for us? IFTTT is short for 'if this then that', and that's just how simple it is. 'If I post a picture on Tumblr, then this post is tweeted and linked back to Tumblr', 'If I mark a YouTube video in my favorites, this video will be posted on my Facebook page', etc etc. Simple and effective and that's why it's brilliant.

Of course, as true geeks, we can use this app in an even smarter way. IFTTT can post emails, and create files in services like Dropbox. And Dropbox is just a folder on your computer. This means you can get your computer to do anything you like with whatever content you may scrape off the net. My example to get you started: download all your favorite YouTube videos from the internet and put them in your Videos folder on your computer. Let's get cracking! (these instructions are for linux, and I'm using the ubuntu distribution)

There is a simple recipe (as that's what these IFTTT formula's are called), that links your YouTube favorites to Dropbox. In the IFTTT application, we want to select the YouTube channel for the 'THIS' section (authorize the connection if you have not done so already), and have the application check for new favorites on your account. If you done that, go through to the 'THAT' section of the recipe and pick the Dropbox channel. 'Append to textfile' is the action we want, and the text we write in this file is just {url}. Erase all other information except that. Now every time you put a video in your favorites, this file will be updated, or created if it doesn't exist.

Now we want to write a bash script that will check out the file and do what we want to do. First up, install the package 'youtube-dl'. This is the program that will download the video for us. just open up a terminal and type

$ sudo apt-get install youtube-dl

Now, stay in the terminal and cd to /etc/cron.daily/. all scripts placed in this folder will be executed on a daily basis. Of course you can put your file in the hourly, monthly or weekly folder too if you want. When we are here, we want to start a new file with the 'vi' command ('sudo apt-get install vim' if you don't have this program available) like so:

$ sudo vi youtube-favorites

Dont' forget the 'sudo' because we are on root grounds here and need the extra authentication to be able to save the file in this folder. We should get the text editor with a blank file. Hit 'i' for insert mode and place the following code there:


if [ -f ~/Dropbox/IFTTT/YouTube/favorites.txt ]
    cd ~/Dropbox/IFTTT/YouTube
    youtube-dl -t -a favorites.txt
    rm favorites.txt
    mv * ~/Videos/YouTube/

Then hit escape and type :wq! for saving the file and exiting the editor. This bash script will check every day in your Dropbox folder ~/Dropbox/IFTTT/YouTube for the file 'favorites.txt'. If it exists, it will use the program youtube-dl to download all the url's that are written there by IFTTT, remove the text file, and move the video files to your Video/YouTube/ folder. Make sure you have all the folders and file names in place. You can testrun the script by typing 'sh youtube-favorites', while you are still inside /etc/cron.daily.

This is just one example, but I'm sure it can get you on the way for creating your own groovy recipes. (Oh, and by the way, I don't take any responsibility for copyright infringement inspired by these IFTTT recipe ideas)

Reactie toevoegen

Plain text

  • Geen HTML toegestaan.
  • E-mail- en internetadressen worden automatisch aanklikbaar.
  • Regels en alinea's worden automatisch gesplitst.
By submitting this form, you accept the Mollom privacy policy.