# Overview

This script helps you migrate from F-Spot to Digikam. Before doing anything it makes a backup of the SQLite files so if anything goes wrong you can revert all changes. It is currently able to copy the following:

• Tags
• Tag tree stucture
• Ratings
• Versioning (Digikam 2.x)

This was tested with the table structures for

• F-Spot 0.7.3 and 0.8.2
• Digikam 1.2.0, 1.9.0 and 2.1.1

The script will try to detect (possibly incompatible) newer database structures for Digikam, and will ask for your confirmation before continuing with the migration, so even if you are using something newer give it a try! :)

## Digikam 1.x/2.x

Digikam 2 added support for image versioning, similarly to what f-spot does. This script will also copy over this grouping information, but will only work with digikam 2.0 or newer. This is automatically detected, so you don't have to do anything.

## Usage

1. Open Digikam and make new albums that point to the folders that are managed by F-Spot. Yes, it also understands pictures that are not copied to the "main" F-Spot album.

2. When the pictures are scanned, close Digikam (and F-Spot, if it is still running).

3. Change to the folder where you saved the script and run:

python fspot_to_digikam.py DIGIKAM_FOLDER


Where DIGIKAM_FOLDER is the folder where Digikam's database is located, relative to your home folder (so "Pictures" for /home/your_username/Pictures). This is configured under Settings > Configure digikam > Database [SQLite] > path.

3.1 with "python fspot_to_digikam.py --help" you get a list with the available options

4. Start enjoing digikam!

## Notes

• The script assumes you are using the SQLite engine for storing pictures in digikam. Although it would be fairly easy to also support MySQL, I have not done it. In case you are using MySQL, I would advice to convert first to sqlite, run the script and then convert back. Digikam offers a menu option for this conversion.
• The script can be used to try digikam while still working with f-spot. If you change ratings or re-tag some pictures in f-spot and run the script again, it will copy these values over to the digikam database (actually it will overwrite any changes you made in digikam).
• On my PC from 2006 it takes around 3:00 to process 12000 pictures. There is probably room for improvement, but since this will be used once to migrate and the time is not too bad, I didn't invest too much time here.

## Dependencies

This script uses SQLalchemy to access the database and might not be installed by default in your system. On Debian based systems the package should be called "python-sqlalchemy":

$sudo apt-get install python-sqlalchemy  If you haven't got version at least 0.6, please upgrade. Alternatively, if you don't like installing random libs you probably will only use once in your live, you can do the following: • Go to the download site of http://www.sqlalchemy.org/ • Download the latest version of the 0.6 series (0.7 should be fine too) • Open the compressed file and move "SQLAlchemy-0.X.Y/lib/sqlalchemy" to the folder where this script is We also use DBUS to map the system's partion's UUIDs to their mount points: Digikam stores a reference to a volume-UUID while f-spot references the path: $ sudo apt-get install python-dbus


## Contact

If you want to contact me telling me the script worked well (or deleted your entire hard disk), here is my email: roland [at] geider [dot] net. If something didn't work as expected or could be done better, feel free to open an issue on bitbucket: https://bitbucket.org/rolandgeider/f-spot-to-digikam/issues