Photo Stream without iPhoto/Aperture

I love using Photo Stream on my iPhone and iPad, but don't want to use iPhoto or Aperture on my Mac. The good thing is that iPhoto and Aperture just reference to a directory on your Mac to display the Photo Stream.

The first two lines of the script below will find all photos inside this folder and copy them to another folder on your Mac. I have chosen a folder inside my Pictures folder. Next it will find photos older than 90 days and delete them. This way you can maintain a 90 day stream of photos just like in iPhoto or Aperture.

The third line of the script moves the Photo Stream photos from the source folder into another folder I call _New Pictures. This way I can triage my new photos and move them down into my pictures folder structure.

The last line will then find any empty folders inside the Photo Stream source folder. This is just a way of keeping the folder clean since the source folder will be left with a bunch of empty folders with long alphanumeric folders. I never tested to see if these folders will auto delete after 30 days or not, so this last line may not be really needed.

To use this script, just change the destination paths if you want.

#!/bin/sh


#Copy Photo Stream photos
find ~/Library/Application\ Support/iLifeAssetManagement/assets/sub/ -type f -exec cp "{}" ~/Pictures/Photo\ Stream/ \;


#Keep only the last 90 days of photos in the Photo Stream folder
find ~/Pictures/Photo\ Stream/ -type f -mtime +90 -exec rm {} \;


#Move Photo Stream photos
find ~/Library/Application\ Support/iLifeAssetManagement/assets/sub/ -type f -exec mv "{}" ~/Pictures/_New\ Pictures/ \;


#Delete empty folders
find ~/Library/Application\ Support/iLifeAssetManagement/assets/sub/ -type d -empty -print -exec rmdir {} \;

Name the file with an .sh extension and change the permissions on the file so you can execute.

$ chmod 700 copy-photostream.sh

You can also have this run automatically at certain intervals by placing this script in cron.

$ crontab -e

Add this line to have it run every minute (edit for your path to the script of course):

* * * * * ~/Pictures/Scripts/copy-photostream.sh > /dev/null 2>&1