Recent site activity

Welcome!



iphotoexport is now available as Phoshare.

Introduction

iphotoexport allows you to liberate your images and a lot of the data you entered into iPhoto. It creates and maintains a folder tree of your images outside of your iPhoto library that replicates your iPhoto event and album organziation. In addition, your image titles, descriptions, dates, keywords, and face tags are exported into image metadata, so that other programs like Picasa, Adobe Bridge, Adobe Photoshop Elements, Adobe Photoshop, etc. can see the data. iphotoexport works very well with Picasa on the Mac. 

iphotexport is very fast. It can synchronize a 20,000 image iPhoto library in less than a minute. Your first synchronization of course will take much longer, because iphotoexport has to create the full folder tree.

The code is available at Google Code (both source code and binary in the same .zip file).

Check News for information about updates. Use the iphotoexport-users group for discussions of iphotoexport.

iphotoexport has only limited support for iPhoto libraries that are custom configured to *not* copy images into the iPhoto library (in Preferences -> Advanced). You can still export your images, but any of the metadata options will not work.

Requirements

iphotoexport works with iPhoto '06, iPhoto '08, and iPhoto '09 on Mac OSX Snow Leopard, Leopard, or Tiger. It requires Python 2.4 or newer (but not Python 3). A suitable version of Python is included with Snow Leopard and Leopard. On Tiger, you might to upgrade your Python installation by downloading a current version from the python.org website.

If you use any of the options to update image metadata, then you need to install ExifTool for metadata support. ExifTool is another great piece of free software that allows the manipulation of image meta data. Make sure you grab the Mac OS X .dmg package. If you don't plan to use this feature, you can skip this step.

If you use the option resize images on export, then you need to install ImageMagick. ImageMagick is a collection of utilities to process images. Make sure you follow the Mac OS X instructions. If you don't plan to use the resize feature, you can skip this step.

iphotoexport is a command line utility, so some familarity with using the Mac OS X Terminal application and issuing commands from the command line is required.

Getting Started

  1. Download the most recent package from the Google Code.
  2. If your browser doesn't automatically unzip the downloaded file, click on the downloaded file to expand it.
  3. Open a Terminal session (from Applications -> Utility), and change to the folder with the downloaded files. This goes something like this:
    • $ cd ~/Downloads/iphotoexport-1.6
  4. Locate your iPhoto library. By default, it will be at ~/Pictures/iPhoto\ Library. If you are not sure, quit iPhoto. Then hold down the Option key, and click on the iPhoto icon in the dock to relaunch it. It will come up with a dialog that prompts you for a library. Below the list of libraries it shows the path to the library.
  5. Using your iPhoto library location, run iphotoexport.py. For example, to export all your iPhoto Events into an ~/Pictures/Album, type this:
    • % ./iphotoexport.py -e . --iphoto ~/Pictures/iPhoto\ Library --export ~/Pictures/Album
  6. If your iPhoto library is in the default location, you don't have to specify it on the command line, and you can just run:
    • % ./iphotoexport.py -e . --export ~/Pictures/Album
  7. To see a list of all the options available, type this:
    • % ./iphotoexport.py --help

Motivation

I like managing and editing my photos with iPhoto, but I don't like having my work kept hostage inside iPhoto. I also like Picasa from Google, for its speed and easy management of online albums (check out the "Sync to Web" feature), and it's ability to automatically discover images, even if stored elsewhere on your network. And sometimes I feel like using Adobe Bridge. So it's important to me that any work I invest into my photo collection (edits, organization, annotations, tagging) is not tied up in one application. That's where iphotoexport comes in. I've used variations of this tool for many years.

How does it work

iphotoexport exports all your images from your iPhoto library into a folder tree outside of your library. It preserves the following information:
  • Event and album organization: each event, regular album or smart album becomes a folder in the export tree. You can annotate your albums and events in iPhoto to store them in subfolders.
  • Edits: if you have edited your image in iPhoto, both the original and the edited version are exported.
  • Titles: iphotoexport uses the iPhoto image title as the export file name.
  • Descriptions: written into the caption-abstract field in the image meta data (JPEG only)
  • Dates: written into DateTimeOriginal in the image meta data (JPEG only)
  • Keywords: written into the keywords field in the image meta data (JPEG only)
  • Ratings: written into image meta data (JPEG only)
  • Faces: merged with the keywords, and written in the keywords field in the image meta data (JPEG only)
  • Places: place names (country, state, city, and user-defined place names) are merged with the keywords, and GPS coordinates are written into the image meta data (JPEG only)
Besides a full export, iphotoexport can also synchronize any changes you made in iPhoto by simply running it again. It then only applies your changes: new images, updated images, and deleted images. This is a one-way synchornization, and changes you made in your export folder are not copied back into iPhoto (actually, they will most likely be overwritten with the version of the image stored in iPhoto). 

iphotoexport has two modes:
  • copy (default) - all images are copied. Your export folder can be anywhere, but you basically double the disk space needed to store your photos. Updates the image meta data only in the copied files.
  • link - exported images are just hard links to the image files in your library. Needs very little additional disk space, but only works if the export tree is on the same drive as your library. Updates the image metadata in the files in your library.
iphotoexport currently does not preserve the following information:
  • Album/Event descriptions
If you use Picasa, iphotoexport can warn you if your descriptions don't match the folder descriptions in PIcasa.

link mode

In link mode, iphotoexport does not actually copy the images from the iPhoto library into the export folders. Instead, each image is just a link back to the file in the iPhoto library. This has the advantage that you need very little additional disk space - just enough to store the folders and links. It actually works very well, with no real risk to accidentally damaging your iPhoto library. Lets look at what happens in a couple of scenarios:
  • You delete a file in the export folders: this removes only the link to the to the image file, and it remains in your iPhoto library.
  • You rename a file in the export folder: this only changes the name of the link, and does not rename the file in the iPhoto library.
  • You edit the file in the export folder: Your average image editor writes a new file on save. This replaces the link with a new file, and you end up with two independent copies of your image. Which is good, because iPhoto does not tolerate modifications to image files in it's library.
  • You modify the image meta data: some apps allow edits in place, while others make copies (same as edits). Except for geodata, iPhoto looks at image meta data only during the initial import, and will ignore all other metadata changes.
  • You create a new image in your export folder: it will not show up in the iPhoto library, because your export folder is actually a real folder outside the iPhoto library.
So as you can see, link mode is quite save. But you can only use it if your export folder is on the same drive as your iPhoto library - hard links cannot cross file systems.

How to use iphotoexport

Read Getting Started at the top of this page for instructions on downloading and running iphotoexport.

I recommend you start out with a new folder for your export, like ~/Pictures/Album. You can run your first export like this:

    ./iphotoexport.py -e . --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

Please note the quotes around the iPhoto library location. They are required because there is a space in the folder name. If your iPhoto library is in the default location, you don't have to specify it on the command line, and you can just run:
    ./iphotoexport.py -e . --export ~/Pictures/Album

This will export all events (-e .) from your iPhoto library at ~/Pictures/iPhoto Library. If you also want to include some of your albums or smart albums, use the -a and the -s options:

    ./iphotoexport.py -e . -s "Last Import" -a "Vacation|Family" --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album
 
The arguments to the -e, -s, and -a are regular expressions that match the beginning of the event and album and album folder names. A . is a wildchard for any character, so -e . will match any event with at least one character in it's name. The | means "or", so -a "Vacation|Family" matches any album that starts with the word Vacation or Family, or any album that is contained in a folder that starts with the word Vacation or Family. If you want to get just Vacation, but not Vacation Last Year, change it to -a "Vacation$". The ^ and $ characters mark the beginning and end of the name. so Vacation$ only matches album names that match "Vacation" exactly. For more details on regular expressions, read the linked Wikipedia article.

Sometimes you just want to skip a few albums or events. Instead of listing all the ones you want to export, you can use the -x option to exclude a few:

./iphotoexport.py -e . -x "Bad Event|Another bad one" --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

This will export all events except any event that starts with either "Bad Event" or "Another bad one".

By default, iphotoexport will use the image caption as the name of the exported file. You can modify the naming scheme with the -n option. It is a template, and recognized two placeholders, ${index} and ${caption}. ${index} is just a sequential number, based on the position of the image in the event or album. To prefix the caption with a number to maintain the album order, specify a template like this (you have to use a backslash so that the shell doesn't interpret ${index} as a shell variable):
  
./iphotoexport.py -e . -n "\${index}-\${caption}" --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

iphotoexport will create a folder for each event or album that matches. WIthin each folder, the image titles will be used as file names. If there are duplicates, a numeric suffix will be added. 

If you don't want all your 300 events turn into 300 folders in your export folder, you can assign a sub-folder name to events by adding a line starting with a @ in the folder description in iPhoto. For example, all events with the line @Vacation in their event description will be exported into ~/Pictures/Album/Vacation. You can have other text in the event description - iphotoexport only looks for lines starting with an @ character. Use the --folderhints option to scan event and album descriptions for folder hints:

 ./iphotoexport.py -e . --folderhints --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

Use the -k flag to have iphotoexport apply iPhoto image descriptions, dates, ratings, and keywords to the images:

./iphotoexport.py -e . -k --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

iphotoexport checks the descriptions and keywords only for new or updated images. So if you change the keywords later, iphotoexport will not export the change if you use -k. You can use -K instead, to check all images. There's really no drawback to doing that except that iphotoexport will run much longer because it has to open each image file to check it's existing meta data:

./iphotoexport.py -e . -K --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

If you are using iPhoto '09, you can ask iphotoexport to merge your face tags with the keywords, using the -f option (you need to combine it with either -k or -K to write the keywords):

./iphotoexport.py -e . -k -f --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

If you are using iPhoto '09, you can ask iphotoexport to export the GPS coordinates, using the -gps option (you need to combine it with either -k or -K to write the keywords):

./iphotoexport.py -e . -k --gps --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

You can also include place names (country, state, and city, and custom place names) with the -places option (you need to combine it with either -k or -K to write the keywords):

./iphotoexport.py -e . -k --gps --places --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album


If you have edited your pictures in iPhoto, iphotoexport will export the current, modified version of each picture. To also include the original images, use the -o option. The original image files will be exported into subfolders called Originals for each event and album:

./iphotoexport.py -e . -k -f -o --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

So far, we are only exporting new pictures. If iphotoexport finds an existing file or folder in your export folder that needs to be updated or should be deleted because it is not part of your iPhoto library, it just prints a warning. To enable full synchronization, use the -u (update) and -d (delete) flags:

./iphotoexport.py -e . -k -f -o -d -u --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

Be careful with this mode, because iphotoexport will overwrite any changes you made in your export folder, and delete any files that it thinks don't belong there! Better run without -d at first, and look at it's output, to see which files it would delete! So don't edit your pictures in the export folder, and don't add other images!

iphotoexport can resize images on export to fit into a given width and height. This option also converts all images to JPEG format, and re-compresses them at 75% quality. I use this option to make a folder of images to sync with my Apple TV. That can save a lot of space on the Apple TV disk - there's no point to copy your original 10 Megapixel camera images to the Apple TV:

./iphotoexport.py -e . -d -u -size 1920x1080 --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/AppleTV

Finally, if you are exporting to a folder on the same drive as your iPhoto library, you can use link mode, to create an export tree that uses very little disk space:

./iphotoexport.py -e . -k -f -o -d -u -l --iphoto "~/Pictures/iPhoto Library" --export ~/Pictures/Album

If you just want to see what iphotoexport would do, add the --dryrun option to any of the command above. In that mode, no files will be modified!

If you use decide to keep using iphotoexport, you might want to create a little shell script to run it with the proper options. For example, I have a script make_album.sh that I run every time I want to synchronize my iPhoto library. It maintains both a linked tree in my ~/Pictures folder with both the modified and original images, and a second copy without the large movie files on a network drive:
#!/bin/bash
LIBRARY="~/Pictures/iPhoto Library"
iphotoexport.py -e . -s "Last Month|Previous Month|Cooking Collection" -k -o -d -u -f -l --iphoto "$LIBRARY" --export ~/Pictures/Album
iphotoexport.py -e . -s "Last Month|Previous Month|Cooking Collection" -k -d -u -f --pictures --iphoto "$LIBRARY" --export /Volumes/Share/Pictures/Album

Use ./iphotoexport.py --help to get a full listing of all options, with explanations.

Working with Picasa

If you export your photo with iphotoexport, you can then use Picasa from Google to browse your pictures, or to upload your photos to Picasa Web Albums. This works very well if you add your export folder to the folder manage in Picasa, and enable the "Sync to Web" option for a folder. Every time you make changes in iPhoto, after you run iphotoexport, Picasa will automatically detect new, deleted, and updated images, and synchronize it with your online albums. Picasa picks up all the exported metadata, including titles, captions, keywords (with face tags if you use the -f option, and place names if you use the --places option), and GPS coordinates. If you have an edited photo, Picasa sometimes even recognizes your edits, and offers you the Revert option. iphotoexport does not sync iPhoto faces itself to Picasa face tags, only the face names to keywords.

The --picasa option improves Picasa integration. If possible, original images will be saved into the .picasaoriginals folder (default: Originals). And iphotoexport will compare iPhoto event and album descriptions against Picasa folder descriptions, and print a message if they are not the same. It cannot update the folder description in Picasa.

You can also edit your images in Picasa, including assinging tags, without worrying about corrupting your iPhoto library. However, if you use iphotoexport to synchronize updates and deletes (options -u and -d), any changes you make in Picasa will get overwritten. Picasa creates files in your folders to track edits and online status - iphotoexport will not disturb these files, even when using the -d and -u options.

If you want to transition some photos from iPhoto to Picasa, simply move the exported folder to a location outside of the export folder tree before you make edits.

Picasa for the Mac can also see photos in your iPhoto library, but it doesn't know about your edits, titles, descriptions, keywords, face tags, or albums. And if you are using iPhoto '09, which doesn't organize the folders in its library by event anymore, your event structure is not shown either.

Future Plans

  • Add a UI to configure and launch iphotoexport
  • Make iphotoexport a real Mac application.
Subpages (3): Download FAQ News
Comments