Re: Import from disk and auto-tag



On 24/06/06, Warren Baird <photogeekmtl gmail com> wrote:
There's no mechanism to do this automatically - however, there are some
patches for bug http://bugzilla.gnome.org/show_bug.cgi?id=342137 that
will make this relatively easy --- the patch I submitted against the bug
will take simple xmp-like "sidecar" files at import and create tags for
them.

Basically you need to write a script that creates for every file
foo.jpg, a file called foo.jpg.xmp - the contents should look like this:

<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 3.0-28,
framework 1.6'><rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:iX='http://ns.adobe.com/iX/1.0/'
xmlns:dc='http://purl.org/dc/elements/1.1/'>
   <rdf:Description>
     <dc:subject>
       <rdf:Bag>
           <rdf:li>Tag 1</rdf:li>
           <rdf:li>Tag 2</rdf:li>
           <rdf:li>...</rdf:li>
           <rdf:li>Tag N</rdf:li>
       </rdf:Bag>
     </dc:subject>
   </rdf:Description>
</rdf:RDF>

Then with my patch, when you do the import, the tags will be created (if
necessary), and attached to each photo appropriately.

Hope this helps.

Warren

Great work, Warren. Could you please explain the XML in a bit more
detail? Specifically, I'd need to add tags for Keywords, People,
Caption/Title, Description/Comments, and Places. Just as an example,
how would the XML appear for a photo with:
Keywords "key1" and "key2"
People "person1", "person2", "person3"
Caption "This is the Caption"
Description "A short description."
Place "place1"

If I can see that, then I'm pretty sure that I can figure out the
rest. Also, how do I patch F-spot? I am not a developer, and I've no
experience in the matter. Thank you.

Dotan Cohen



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