Entries (RSS)  |  Comments (RSS)

Photocasting to iPhoto with Ruby

Today we’re going to teach you how to deal with having too many computers. Moving media around is a living hell because iPhoto and iTunes assume that you only ever possess one library. Sure, you can play music and movies purchased in the store on multiple machines, but what about your own library? How do you use that on multiple machines without moving things around?

At home I have a number of Macs, with one large machine (~1.5TB disk, 4 GB RAM) dedicated to digital photo editing. This machine houses a large volume of photos in it’s “Final Exports” folder. It’s not my main computer – my main computer is a MacBook Pro which travels with me nearly everywhere, and when I don’t have that, I have my iPhone.

I want my photos with me everywhere (or, at least, the last few hundred of them) so I can show people the last great event I went to, or that thing in the club that time. Here’s my solution.

1) Keep the photos on the large machine, where I edit photos in Adobe Lightroom and export them to the “Final Exports” folder.

2) Keep the laptop as the primary sync machine for the iPhone

3) Sync the iphone to the laptop, and retrieve the latest photos.

iPhoto 7 has a wonderful feature called Photocasting which will read lists of latest photos from the Internet (say, flickr, for example.) using a format that is very similar to RSS, but completely not compliant with current RSS standards.

The following Ruby script, and ERB template will turn a directory of directories into a pubsub feed for iphoto. You save your files in this form:

Final_Exports/dir1

Final_Exports/dir1/1.jpg

Final_Exports/dir1/2.jpg (and so on…)

Final_Exports/dir2

Final_Exports/dir…

Final_Exports/dirN (and so on…)

I use the scripts to generate RSS, and then put the RSS file somewhere on the Internet (the same directory with the photos works well, as my machines are internet accessible.) Running the script from cron once a day and syncing the phone, keeps you up to date.

Scripts:

makeiphotorss.rb

makeiphotorss.erb

This entry was posted on Wednesday, December 31st, 2008 at 9:06 pm and is filed under media, rubyrails, stuff, web development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

  • JeffRodgers
    Great article.

    I am going to have to look into photocasting at the studio.
blog comments powered by Disqus