We love our Apple TV. We particularly like the screensaver that scrolls through our photo collection. However, we quickly got bored of watching the same photos stream past again and again.
So I decided to see if it would be possible to automatically download a daily dose of interesting photos from Flickr directly on to our Apple TV.
Here is how I did it.
Ingredients
Before you start, you’re going to need the following:
- Apple TV
- Mac OS X 10.4.2 (or above)
- iPhoto or Aperture
- iCal
- Flickr API key
- The following Automator workflows: flickr_to_appletv.zip
Step 1: Ruby scripts
The first step is to ensure that Automator’s Run Shell Script will accept Ruby scripts.
To do this open /System/Library/Automator/Run Shell Script.action/Contents/Resources/Shells.plist and update it so it includes a key for Ruby, e.g:
… /usr/bin/ruby … args -e % – script $stdin.each { |arg| puts arg } ARGV.each { |arg| puts arg }
(taken from: Automator World)
Step 2: Configure Automator
Launch Automator and open the Import Interestingness to Apple TV via Aperture or Import Interestingness to Apple TV via iPhoto workflow depending on whether you want to use Aperture or iPhoto.
There are two steps within the workflow that need customised.
In Step 1 of the workflow enter your API key from Flickr (underlined in green). You can find your API key here: http://www.flickr.com/services/api/keys/

In Step 5 of the workflow choose an album within Aperture to store your photos in, e.g. “Flickr Interestingness”.

That’s it for Automator.
Step 3: Configure Aperture
You can ignore this step if you are using iPhoto
Launch Aperture and create a new Smart album called Apple TV: Flickr Interestingness. Setup the Smart Album to include all photos tagged with interestingness.

That’s it for Aperture.
Step 4: Configure iTunes
Launch iTunes and find the Photos tab under your Apple TV device. Ensure that you have selected to the appropriate source and album.

That’s it for iTunes.
Step 5: Configure iCal
Launch iCal and create a new task that opens the Automator workflow and schedule it to execute daily (preferably in the small hours of the morning so as not to eat your bandwidth when you’re working).

That’s it for iCal.
All done
That’s it. You can test to make sure it works by executing the Automator workflow directly.
Note: The workflow will download up to 100 photos per day. It will ignore photos that do not have a large or original version. If you want to download more than 100 photos a day simply modify the per_page variable in Step 1 of the workflow. The script should work with up to 500 photos.
Feel free to tweak and modify the script - you can download the original Ruby script.
If you find any bugs or need any support implementing it please leave a comment below and I’ll do my best to help.
What’s actually happening?
The workflow triggers a Ruby script that makes several calls to the Flickr API and then downloads 100 of the most interesting photos on Flickr from yesterday.
These photos are then imported into Aperture or iPhoto. In the case of Aperture they are also tagged.
Finally, Aperture or iPhoto is closed and iTunes launched. iTunes should then automatically connect to the Apple TV and download the photos from either Aperture or iPhoto.












Please add your comments...