This is very cool. I hope that you'll put it in a repo somewhere so it can be found and worked on by others in the future. F-spot definitely needs this functionality.
Mike On Wed, Sep 29, 2010 at 9:15 AM, Jean Levasseur <[email protected]>wrote: > Hello list, > > while playing with various versions of F-Spot, I accidentically > screwed-up my photos.db in an unrecoverable way. > > Hopefully, I could re-import all my pictures (and their metadata) but > all images found by F-Spot where now "Originals", even those I've > created as versions of other ones. > > I could get back my photos.db in a sane state with a little python > script I wrote [1] (I just can't grasp C# yet, I don't understand it). > I share it here so that if there are people better than me coding C#, it > could be used as the base for a plugin. > > Basically, it scans the database, looking for filenames with the > substring " (" indicating a version (most of the cases), then scans the > directories around (5 before/after) for an original (same substring > begining the filename, but without the "(version_name)" substring, and > then reaffiliate them as versions. > > The script is not perfect, nor it is very optimal resource-wise, but it > worked for me (I still have some difficulties with accented characters, > tho), so it could be useful for other people and it can give some ideas > for people looking to write useful plugins. I've tried to write it as > system-agnostic as possible, so it should work with any fairly recent > standard python install, and it should respect latest (> 0.6) f-spot > databases schemas. > > I'd be happy to hear anybody's thoughts on that! > > Jean Levasseur. > > [1] http://dl.dropbox.com/u/2668762/reaffiliate_versions.py > > _______________________________________________ > f-spot-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/f-spot-list > >
_______________________________________________ f-spot-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/f-spot-list
