Skip to content
Pablo Casas Estévez edited this page Mar 11, 2017 · 22 revisions

Welcome to the Shotwell-event2folder wiki!

Introduction

Shotwell is a software to manage your personal collection of pictures and videos. You can learn more on its home page.
Shotwell can import pictures from any place on your file-system. It can leave the picture on its place or make a copy on its main library-path. All the data is stored in a SQLite3 Data Base.

One thing I missed from this software is the fact that I could not move easily the files from one place to another on the system, and the fact that I'm used to organize my library in a folder structure (../year/fulldate-event name/date - photoname.jpg ). Once a picture is imported, it remains on its place, even if you change its event or edit the date.

I also use Freevo 1.9 as my HTPC system and it needs to point to a folder structure to retrieve photos, so freevo 1.9 browses the folders and gets the names of the folders.

As you manage Shotwell, you can change file-titles, dates, even rename events. This changes does not affect to the real filename nor the folder structure they are stored.

I also wanted to have a little repository of the latest pictures on Dropbox, so as I said, It is difficult to select and move the correct portion of pictures without breaking shotwell's pointers or doing extra imports.

If you use Shotwell to manage your pictures and videos, and you want to move your library or keep a structured library in an event-oriented way, this scrip is for you.

What does this script do?

This script basically reorganize your Shotwell library on a folder oriented structure.
It gets your pictures and create a folder structure using your events. "/Main/path/of/the/library/YEAR/eventdate - eventname/fulldate Picturename.jpg" and so on.

As an extra, you can define a portion of pictures and store them to another place. I use this feature to keep the last 2Gb of Data in pictures on a separated Dropbox folder.

Included as an option, it can add a starting fulldate identifier on the picture-filename, so if you edit this picture with some external software or get a copy out of the shotwell library, you won't loose the date, because it is in the filename.

Included as an option, you can retrieve the photo's title from the filename. The script discards some useless strings of data stored in the filename. So if you import this file:
"2006-06 The great beer party.jpg", the title of the photo in the database will be "The great beer party" and only imports titles if title at Shotwell database is empty.

You can change the picture's date in Shotwell and reorganize the events, by running this script, the folder event's structure will get also reorganized and the full date identifiers at the start of the files will be renamed.

Notes about the system

This is a python3 script written for ubuntu. I've been using this script since ubuntu 14.04, and till now, ubuntu 16.10 with Shotwell 0.18.0, 0.22.0 and 0.24.0.

How to run this script

Just save the code and run it from the command line.

$python3 Shotwell_event2folder.py

The software will create the folders that are needed on the target folder library. It also generates a log file on the same place from where it is run.

The configuration file.

The first time the software is run, it creates a config file at your user directory called ~/.Shotwell-event2folder/Shotevent2folder_cfg.py

open and configure it by your needs. <Link to the configuration file>

A note about other script that I use: If you have old scanned photographs but without EXIF data, you can use Photodeliver to extract a date identifier from the filename or its path and store it as EXIF metadata before importing the collection in Shotwell or another date-based software. Have fun! https://github.com/pablo33/PHotodeliver

Clone this wiki locally