[Kde-imaging] gwenview, digikam, keywords and metadata

Aurélien Gâteau agateau at kde.org
Wed Dec 5 14:53:58 UTC 2012


Le Thursday 29 November 2012 09:05:50 Kristian Rink a écrit :
> Hi Aurélien, all;
> 
> Am Dienstag, 27. November 2012, 15:50:05 schrieb Aurélien Gâteau:
> > > Yes, I already stumbled across the Nepomuks Python API. Takes a bit of
> > > getting used to it, though. :) I'll see where it will take me. By now,
> > > thanks a bunch for your comments! :)
> > 
> > Great! Keep us posted with your progress on this topic.
> 
> Well, after all, and after playing a bit with things this morning on the
> train, I figured out that pyexiv2 is quite straightforward and also PyKDE4s
> Nepomuk API is way friendlier than I thought, at first look.
> 
> See attached. So far my implementation is thoroughly pathetic: No error
> handling, to start with. No actual "syncing" of keywords (but rather just
> writing any Nepomuk keywords back to the file, effectively overwriting any
> previously stored keywords if there were any). Possibly no sane dealing with
> _all_ Nepomuk data (looking for tags and assuming tag labels to be the
> information needed). Possibly keywords not being retrieved by external
> applications as it seems there's a bunch of fields asides
> Iptc.Application2.Keywords to be used for such information (AFAICT digikam
> uses to write these to at least three or four different IPTC / EXIF tags).
> But ultimately, it works, and it does write things found in Nepomuk back to
> the image. I'll try pushing this to my github repo and spend some more work
> on it sooner or later to make it more useful.

That's a good start, I would vote for it to work recursively on a folder.

I also wonder if it would be possible to ask Nepomuk which files had metadata 
changes since a given date. If you have this information it is possible to 
implement an incremental syncing. You may want to get in touch with the 
Nepomuk developers to know if this is possible.

> Speaking of copies, however: It feels interesting to, in Nepomuks API,
> stumble across the same "issue" we at the moment are facing in our semantic
> media store. Given Nepomuk stores knowledge about "file" resources
> identified by a physical file system path, what happens to image metadata
> stored in there in case any of the image files gets copied or moved, at
> worst while Nepomuk/KDE is not running (Unix shell, some other desktop
> environment, ...)? This seems like just begging for inconsistency. But
> possibly this is a bit off-topic here. :)

Another good question for the Nepomuk developers :)

Aurélien


More information about the Kde-imaging mailing list