Skip to content

Instantly share code, notes, and snippets.

@bhollis
Created May 9, 2015 17:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhollis/2c96708f58642ae539b6 to your computer and use it in GitHub Desktop.
Save bhollis/2c96708f58642ae539b6 to your computer and use it in GitHub Desktop.
Simple script for copying iCloud Photos / Photostream photos out of the Photos library into a separate folder for import into Lightroom

Copy photos out of Photos App into Lightroom

This is a simple way to get your iCloud Photos / photostream photos out of the Photos app and into Lightroom. Photos get synced from your phone into your Photos library automatically, and this script periodically copies them out into an "import" folder where Lightroom's auto import feature can take over.

To install, copy copy-out-photos into ~/bin and net.benhollis.CopyPhotos.plist into ~/Library/LaunchAgents. Customize copy-out-photos to point to where your Photos library is and where your Lightroom import folder is. Then run these commands:

chmod a+x ~/bin/copy-out-photos
launchctl load ~/Library/LaunchAgents/net.benhollis.CopyPhotos.plist

Then go into Lightroom and open File > Auto Import > Auto Import Settings and set the watched folder to be whatever you set DEST_PATH to.

#!/bin/sh
SOURCE_PATH=~/Pictures/Photos\ Library.photoslibrary/Masters/
DEST_PATH=~/Pictures/Lightroom/Import
TOUCH_FILE="$DEST_PATH"/last-import
(find "$SOURCE_PATH" -type f -newer "$TOUCH_FILE" -exec ln {} "$DEST_PATH" \;) && touch "$TOUCH_FILE"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.benhollis.CopyPhotos</string>
<key>ProgramArguments</key>
<array>
<string>~/bin/copy-out-photos</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment