If you live in the world of Apple, you probably know what the Photo Stream is. You take a picture on your iOS device, and it automatically goes into your private photo stream. You can also choose to share it with friends or family in a photo stream to which they’ve subscribed. In my family, each of the four of us has our own photo stream, and we use this to share photos with each other. It’s been a really nice way to stay in touch with my family in Seattle when I’m in Pittsburgh. Yes, of course we talk on the phone too, but the photo stream allows us to share small things right then and there.
ANYWAY, this isn’t an advertisement for the photo stream.
If you have a Mac with iPhoto, you may have noticed that your streams, both private and shared, are synced with iPhoto as well. Cool! But what if you like keeping your photos somewhere else, like Dropbox or Google+? It turns out, iLife stores your photos in a really strange way. Each photo is in its own directory, and if you subscribe to multiple photo streams, your photos will have duplicate names. So, getting photos from your stream to another place on your system isn’t as easy as dragging and dropping.
That’s why I wrote this script, which recursively moves all the photos from the (hidden) photo stream storage location into a specified folder and guarantees unique filenames. On my computer, I set up a cron job so all the photos from my stream are synced with Dropbox every evening.
This has several advantages: one, since it’s a shared Dropbox folder, my family members who use Windows (all of them) can access the stream photos from their computers, without relying on a fast connection from icloud.com. Two, it means I have all my photos in one place, in Dropbox, rather than scattered between iPhoto and my file system. iPhoto is great if it’s all you use, but if you need integration between your photos and the rest of your OS, iPhoto doesn’t like to play nice.
So, now that we’ve covered the rationale, here’s the script: