[Shotwell] Using Shotwell to organize photo backups.



Hi, all. I have a laptop full of photos, as well as two external drives, a Flickr account, a G+ account, a Shutterfly account, et cetera.

Owing to problems getting myself organized, I do not have a good record backing all these things up to each other, and so there are multiple disjoint sets of photos, with a union for them that is larger than any of the intersections.

So it sure would be nice if Shotwell could do this. I'm creating Shotwell DBs for each of the volumes in my possession so I can script a process to propagate photos once they are imported into one of them, with less thinking on my part. (Thinking gives me wrinkles.)

I looked at the SQLite schemas, and I wonder if there would be interest in adding a few modifications:

Something along the lines of this:


CREATE TABLE PhotoTable (id INTEGER PRIMARY KEY, store_id INTEGER NOT NULL, location TEXT  NOT NULL, width INTEGER, height INTEGER, filesize INTEGER, timestamp INTEGER, exposure_time INTEGER, orientation INTEGER, original_orientation INTEGER, import_id INTEGER, event_id INTEGER, transformations TEXT, md5 TEXT, thumbnail_md5 TEXT, exif_md5 TEXT, time_created INTEGER, flags INTEGER DEFAULT 0, rating INTEGER DEFAULT 0, file_format INTEGER DEFAULT 0, title TEXT, backlinks TEXT, time_reimported INTEGER, editable_id INTEGER DEFAULT -1, metadata_dirty INTEGER DEFAULT 0, developer TEXT, develop_shotwell_id INTEGER DEFAULT -1, develop_camera_id INTEGER DEFAULT -1, develop_embedded_id INTEGER DEFAULT -1, comment TEXT, UNIQUE (store_id, location));

CREATE INDEX PhotoEventIDIndex ON PhotoTable (event_id);

CREATE TABLE VideoTable (id INTEGER PRIMARY KEY, store_id INTEGER NOT NULL, location TEXT NOT NULL, width INTEGER, height INTEGER, clip_duration REAL, is_interpretable INTEGER, filesize INTEGER, timestamp INTEGER, exposure_time INTEGER, import_id INTEGER, event_id INTEGER, md5 TEXT, time_created INTEGER, rating INTEGER DEFAULT 0, title TEXT, backlinks TEXT, time_reimported INTEGER, flags INTEGER DEFAULT 0 , comment TEXT , UNIQUE (store_id, location));

CREATE INDEX VideoEventIDIndex ON VideoTable (event_id);

CREATE TABLE StoreTable ( id INTEGER PRIMARY KEY, store_type TEXT, basepath TEXT, username TEXT, password TEXT, pathsep TEXT DEFAULT "/");

CREATE TABLE ObjectTable( id INTEGER PRIMARY KEY, o_store_id INTEGER , o_location, TEXT, store_id INTEGER , location TEXT , UNIQUE (store_id, location)); 

Under this schema, each photo is uniquely identified instead of filename, by the combination of (store_id, locator). The default store_id is the filesystem directory Shotwell uses as always, and the locator would be the filepath. But this would allow Shotwell to add entries into ObjectTable (covering both photos and videos), for each time a photo/video is copied onto a different Store. That Store can be a removable or networked drive, a WebDAV resource, FTP, or a REST-API type web site.

I'm already creating a database of this type for my photos and I intend to test whether I can compile Shotwell to incorporate the new schema for its existing set of functions. That would only involve changing the SQLite commands in the Shotwell source code, so I can do it without much trouble. WOuld the rest of you be interested in adding the needed GUI dialogues to have Shotwell manage photo backups?

Regards,

Omri Schwarz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]