helps you convert your iPhoto image library into digiKam database

You leave iPhoto for a free alternative like digiKam? You probably want to migrate your library without losing your album sortings and keywords.

photokam is an easy-to-use pair of LGPLed python scripts that help you to convert your digital photos. I wrote them because I needed them. So I only tested my own configuration.

Download:  photokam-0.5.tar.gz


- Version 0.5 - Feb 2009. Tested with iPhoto 5.0.4 and digiKam 0.9.3 on Ubuntu 8.04 (Hardy)


- python (tested with 2.5).
        Should be included in your distrib.
- python-pysqlite2.
        Easily installed on debian/ubuntu distribs with 'sudo apt-get install python-pysqlite2'


Uncompress the archive where you want.

Phase 1

    $ ./ <path-to-your-iphoto-library> <output-directory>

It will not modify anything in the iPhoto library but create a new folder structure, create a tag file and a mapping file that links image paths to tags.

In short, three output artifacts:
1. Target folder structure with one folder per roll under a year-named folder.
2. Tag file
3. Tag mapping file

Target folder structure:

    YYYY                               year of the roll import
      +--YYYY-MM-DD  - rollName        date of the roll import and its name

- Thumbnails are ignored
- Originals are moved into roll folder and added tag "Original". Append "_" to modified versions and add tag "Modified".
- Movies are imported, not the thumbnail image.
- Modification dates of files and created directories are set from album data.

Tag file:


Tag mapping file:


- Tags are extracted from:
 1. Keywords as "Keywords/XXX"
 2. Albums as "Albums/XXX" with folder hierarchy separated by slashes.
 3. Ratings as "Rating/X" with X from 0 to 5
 4. Original/Modified as "Processing/<Original|Modified>"

This intermediate structure and files could be used to import into other photo management softwares like F-Spot, but you will have to write the stuff to recreate the tags in F-Spot.

Phase 2 (specific to digiKam)

User must import manually the folder structure into digiKam, e.g. by making it point to the output directory of the previous phase.

Note that you can import the structure into an existing digiKam database. The processing script will not modify existing data, only insert new one (except that it will reset the import date of any album with name starting with YYYY-MM-DD)

    $ ./ <path-to-your-digikam-dir>

The directory given as parameter must contain the tag and mapping files as well as the digikam3.db file.

The script does:
- Create the tags from the tag file if they do not exist (no overwrite)
- Scan the files to set their tags using the mapping file.
- Scan the albums to set their creation date from their name if they start with YYYY-MM-DD