importing from kphotoalbum

Post Reply
captainhunt
Posts: 16
Joined: 08 Nov 16 7:53

importing from kphotoalbum

Post by captainhunt » 08 Nov 16 8:18

Hi,

I am new to PSu and wondering whether somebody could give me a hint how I can import my pictures that are tagged with hierarchical keywords using kphotoalbum.
Some background on kphotoalbum:
kphotoalbum stores this information in a xml file, that is quite self-explanatory. e.g. a hierarchy like People>Familie>Sanwald>Aisha looks like:
<member-groups>
<member category="People" group-name="Familie" member="Sanwald"/>
<member category="People" group-name="Sanwald" member="Aisha"/>
</member-groups>
the set of all group-names and all memers is unique in each category.

An image is then tagged with the keyword Aisha like this:
<image file="archive/2007/2007-10/071014-122753-Iva Aisha im Garten Brauer.jpg" ... >
<options>
<option name="People">
<value value="Aisha"/>
</option>
</options>
</image>

Is it possible to import this to PSu? I am using the server version with a postgres db.

Best regards,
Gergoe

vlad
Posts: 969
Joined: 01 Sep 08 15:20

Re: importing from kphotoalbum

Post by vlad » 08 Nov 16 9:21

Hi, and welcome to the forum!
captainhunt wrote: Some background on kphotoalbum:
kphotoalbum stores this information in a xml file, that is quite self-explanatory. e.g. a hierarchy like People>Familie>Sanwald>Aisha looks like:
<member-groups>
<member category="People" group-name="Familie" member="Sanwald"/>
<member category="People" group-name="Sanwald" member="Aisha"/>
</member-groups>
the set of all group-names and all memers is unique in each category.
Are you saying that you can't have multiple Aisha's in the People category? (That would be a pretty big limitation, imho.)
An image is then tagged with the keyword Aisha like this:
<image file="archive/2007/2007-10/071014-122753-Iva Aisha im Garten Brauer.jpg" ... >
<options>
<option name="People">
<value value="Aisha"/>
</option>
</options>
</image>
Well, it does look like Aisha is assumed to be a unique string within the People hierarchy. Strange.
Is it possible to import this to PSu?
Not out of the box. (You can see all the data formats currently supported for import in the Data menu.) But you could write your own program or script, which converts the XML file to a Formatted Vocabulary File (FVF), or to some other format already recognized by Photo Supreme. To check the FVF structure, you could create a small hierarchy in PSU, then export it to a FVF.

Regards,
Vlad

vlad
Posts: 969
Joined: 01 Sep 08 15:20

Re: importing from kphotoalbum

Post by vlad » 08 Nov 16 9:41

Actually, I've just realized that importing from a FVF file will only recreate your hierarchical keyword structure in the PSU catalog. You will still need to associate the catalog labels (roughly, the PSU equivalent of keywords) to your images.

Your best bet might be to export your XML file to a CSV (comma-separated value) file and then use that CSV file to recreate in PSU both the label hierarchy and the corresponding label assignments. (If you have programming skills and are willing to consider such a method, I could provide the necessary details.)

Do I understand correctly that kphotoalbum is not capable to export metadata to the image files, or to xmp sidecars?

fbungarz
Posts: 3187
Joined: 08 Dec 06 5:03
Location: Arizona, USA

Re: importing from kphotoalbum

Post by fbungarz » 08 Nov 16 10:18

Do I understand correctly that kphotoalbum is not capable to export metadata to the image files, or to xmp sidecars?
I just looked at their website and the PDF handbook. The program appears to be extremely basic, a simple database entirely based on XML - apparently no data written to image files or as XMP sidecars. And probably not even an option to export anything into CSV...

Not sure if, with a little bit of programming it might be possible to convert the XML generated by kphotoalbum into XMP sidecar files and then read those back into PSu. The problem seems to be that the XML file of kphotoalbum includes the entire catalog of all files, it is essentially the whole catalog, not even individual XML sidecar files for each image ...

No idea how anyone in his sane mind these days can come up with an image database inside one single XML file. And this is advertised as freeware! To me looks like lock perfect trap to lock you in. Once you invested in tagging thousands of file you probably don't want to start over again.

Even digikam has long adopted XMP - and it is freeware too...

vlad
Posts: 969
Joined: 01 Sep 08 15:20

Re: importing from kphotoalbum

Post by vlad » 08 Nov 16 13:30

fbungarz wrote: No idea how anyone in his sane mind these days can come up with an image database inside one single XML file. And this is advertised as freeware!
Hmm, would you be pleased if the program was payware? :lol:
To me looks like lock perfect trap to lock you in.

It could be worse: imagine kphotoalbum had their own proprietary (binary) DB format! Looking on the bright side, at least they write the data to an open format (XML) - and that allows a migration path forward, for whoever is willing to invest the necessary skills, time or money.
Once you invested in tagging thousands of file you probably don't want to start over again.
Perhaps 'captainhunt' could tell us how many images he tagged in kphotoalbum.

captainhunt
Posts: 16
Joined: 08 Nov 16 7:53

Re: importing from kphotoalbum

Post by captainhunt » 16 Nov 16 0:04

Thanks for the replies, and Sorry for the delay, i was off a few days. meanwhile I am a step further, I hacked a python script that converts the xml tags into xmp sidecar. I am currently testing it. Once I have the solution I post it here. I tagged around 20k images with kphotoalbum, so of course I want to keep this work.

I also easily can create a csv file. So that might be another possible route to go. @fbungarz do you have more details on how to import a tags through a csv file into PSu?

fbungarz
Posts: 3187
Joined: 08 Dec 06 5:03
Location: Arizona, USA

Re: importing from kphotoalbum

Post by fbungarz » 16 Nov 16 8:57

Hi captainhunt,
there is a script with instructions that you can download from the resource repository:
https://repository.idimager.com/openres ... D96EA3BFD6

As I said: it is limited insofar as it needs the filename as an identifier to import the metadata.

Cheers,
Frank

captainhunt
Posts: 16
Joined: 08 Nov 16 7:53

Re: importing from kphotoalbum

Post by captainhunt » 16 Nov 16 16:01

Thanks Frank, that's exactly what I needed. I'll give it a try tonight.
Cheers
Gergoe

lucio
Posts: 1
Joined: 12 Oct 19 6:56

Re: importing from kphotoalbum

Post by lucio » 12 Oct 19 7:03

Hi @fbungarz,
regarding this old post i admit i also got stuck in Kphotoalbum with over 25.000 images collected in its XML index file.
I've tired the link you posted in 2006 pointing to the above mentioned script but it doesn't work.
Do you still have that script and would it be accessible to me?

Thank you.

Post Reply