[KPhotoAlbum] Importing photo information
Johannes Zarl
isilmendil at isilme.lupus.uberspace.de
Mon Aug 26 21:51:53 BST 2013
Hi,
On Monday 26 August 2013 10:55:34 John Pearson wrote:
> I am not sure that this question is on topic for this list. If it is not,
> could you advise me where to ask it?
No worries. This is the right list.
> I have approximately 10000 images which are largely scans of family photos.
> Kphotoalbum looks like the perfect tool with which to organize them. Most
> of the images have captions identifying the people, places, in a separate
> text file currently. It seems that the description field would be the
> perfect place for the captions.
>
> I watched and read all of the documentation I could find and I found not way
> to import the captions as a batch process. I tried entering a few
> manually; but that would be a very slow and tedious process.
Currently the only import format via .kim files. These use a file format
similar to the one in index.xml, but with binary extensions. Personally, I'd
rather interact with the index.xml directly. Especially if you already have a
script that is almost there.
> My solution was to globally set the description field to a known phrase.
> Then I created a script to match file names and replace the known phrase
> with the caption line for the photo. Checking the index.xml files with diff
> after the substitutions shows the substitutions are in the correct places
> and that nothing else in the index.xml file has changed.
>
> However when I try to open the revised index.xml file with kphotoalbum, I
> receive the error message 'Failed to recover the backup: unexpected
> character'. Searching for the phrase has not shown me anything useful.
I guess that you have some special characters that are not allowed inside XML
attribute values. IIRC the contents of the descriptions should be XML-encoded
("%quot;" for '"' etc.).
For Categories, you have the additional constraint that you can't use the "&"
or "|" characters inside the value, because that characters are used
internally by kphotoalbum. Aside from that, adding the Categories should be
relatively straightforward since you already have a working script for the
descriptions. If you need help with these, just ask...
HTH,
Johannes
More information about the Kphotoalbum
mailing list