[KPhotoAlbum] KPhotoAlbum Digest, Vol 73, Issue 18
Constantin Orăsan
c.orasan at gmail.com
Thu Feb 2 12:48:24 GMT 2012
Hello,
>> I have a python script that I used to teach my students how to use
>> XPath (the XML file from kpa was very appropriate for the task). I am
>> more than happy to share/customise. If you want to embed the
>> information in IPTC or XMP, there seem to be libraries in python. I
>> guess we can take this discussion off list if you need help.
>
>
> This sounds quite interesting. Please share your work with all of us,
> don't hesitate to use the list for that.
>
Given the interest here it is http://pastebin.com/WqHjkQ8b
This script started from a real need. A friend wanted me to give her
the photos I have of her, but she does not use any software to
organise them. If I used export, drag and drop the structure of the
folders (which also reflect the location of the photos) is lost. So I
wrote this script which identifies photos where a certain person is
tagged and copies the file to a directory which contains the first
location assigned to the photo (or unknown). I also add the date of
the photo to the file name. (at a later stage I used this script to
teach my students about XPath and python. It is a very nice example
how to navigate an XML)
Today, I added the last bit of code which embeds the IPTC data in the
copy of the photo. If you send me requests, I can covert this to a
tidier piece of code which does more things. The way I wrote the code
should not touch your original images or your database, but the usual
disclaimers apply :)
Constantin
More information about the Kphotoalbum
mailing list