Discussion:
Import from Picasa
Constantin Orăsan
2014-06-30 15:55:05 UTC
Permalink
Hello,

I am currently working on a script which imports information about people
embedded by other programs in the photo (in this case Picasa) and updates
index.xml accordingly. I think the structure of index.xml is fairly self
explanatory, but are there any issues I should be aware of when I modify
the XML externally?

I plan to:
- add a new keyword "external_info", so I guess I need to make sure it
appears in the list of keywords. For ID can I used the first available ID?
- add the name to the list of Persons, if the name does not appear. Can I
use the first available ID?
- update the information in the <options> tag with the relevant persons and
the external_info keyword.

For the moment the script will work only with version="3" uncompressed.
Does it make sense? Should I do anything special except make sure that I
have a backup of the index.xml file?

Is there a more detailed information about the database than
https://github.com/jzarl/kphotoalbum/blob/master/documentation/database-layout.md
I am trying to understand the differences between the different versions.

Thank you,

Constantin
Johannes Zarl
2014-06-30 19:03:53 UTC
Permalink
hi,
Post by Constantin Orăsan
I am currently working on a script which imports information about people
embedded by other programs in the photo (in this case Picasa) and updates
index.xml accordingly. I think the structure of index.xml is fairly self
explanatory, but are there any issues I should be aware of when I modify
the XML externally?
Obviously you should stop KPA before changing the index.xml, but I think you
already know that ;-)
Post by Constantin Orăsan
- add a new keyword "external_info", so I guess I need to make sure it
appears in the list of keywords. For ID can I used the first available ID?
Yes.
Post by Constantin Orăsan
- add the name to the list of Persons, if the name does not appear. Can I
use the first available ID?
Again, yes. IDs are generated the same way for all categories. "Persons" is
not any different then "keywords" (or any other category).
Post by Constantin Orăsan
- update the information in the <options> tag with the relevant persons and
the external_info keyword.
That should work.
Post by Constantin Orăsan
For the moment the script will work only with version="3" uncompressed.
Does it make sense?
As long as you don't alter tags that you don't care about, version 4
uncompressed should not make any difference:

The only difference between version 3 and 4 is that the
"images.image.options.option.value" tag has an additional attribute "area" in
version 4. As long as you keep that area tag where it appears, you can support
both version 3 and 4.

Regarding uncompressed vs. compressed format: This really depends on your use-
case. You can also start with uncompressed only and add support for the
compressed format later on.
Post by Constantin Orăsan
Should I do anything special except make sure that I
have a backup of the index.xml file?
Backing up the index.xml should be sufficient in your case. You can of course
use the kpa-backup.sh script if you want.
Post by Constantin Orăsan
Is there a more detailed information about the database than
https://github.com/jzarl/kphotoalbum/blob/master/documentation/database-layo
ut.md I am trying to understand the differences between the different
versions.
No, there's nothing else that I'm aware of. Thanks for the feedback, though.
I'll try highlight the differences in that writeup a little bit...

Cheers,
Johannes
Constantin Orăsan
2014-07-04 23:08:17 UTC
Permalink
Hello,

Thank you for your answer. I implemented the script and it seems to work
without problem. I will do a bit more testing, prepare the script so it can
be useful for others as well and then I will announce it here with the
expected fanfare :)

Regards,

Constantin
Post by Johannes Zarl
hi,
Post by Constantin Orăsan
I am currently working on a script which imports information about people
embedded by other programs in the photo (in this case Picasa) and updates
index.xml accordingly. I think the structure of index.xml is fairly self
explanatory, but are there any issues I should be aware of when I modify
the XML externally?
Obviously you should stop KPA before changing the index.xml, but I think you
already know that ;-)
Post by Constantin Orăsan
- add a new keyword "external_info", so I guess I need to make sure it
appears in the list of keywords. For ID can I used the first available
ID?
Yes.
Post by Constantin Orăsan
- add the name to the list of Persons, if the name does not appear. Can I
use the first available ID?
Again, yes. IDs are generated the same way for all categories. "Persons" is
not any different then "keywords" (or any other category).
Post by Constantin Orăsan
- update the information in the <options> tag with the relevant persons
and
Post by Constantin Orăsan
the external_info keyword.
That should work.
Post by Constantin Orăsan
For the moment the script will work only with version="3" uncompressed.
Does it make sense?
As long as you don't alter tags that you don't care about, version 4
The only difference between version 3 and 4 is that the
"images.image.options.option.value" tag has an additional attribute "area" in
version 4. As long as you keep that area tag where it appears, you can support
both version 3 and 4.
Regarding uncompressed vs. compressed format: This really depends on your use-
case. You can also start with uncompressed only and add support for the
compressed format later on.
Post by Constantin Orăsan
Should I do anything special except make sure that I
have a backup of the index.xml file?
Backing up the index.xml should be sufficient in your case. You can of course
use the kpa-backup.sh script if you want.
Post by Constantin Orăsan
Is there a more detailed information about the database than
https://github.com/jzarl/kphotoalbum/blob/master/documentation/database-layo
Post by Constantin Orăsan
ut.md I am trying to understand the differences between the different
versions.
No, there's nothing else that I'm aware of. Thanks for the feedback, though.
I'll try highlight the differences in that writeup a little bit...
Cheers,
Johannes
_______________________________________________
KPhotoAlbum mailing list
https://mail.kdab.com/mailman/listinfo/kphotoalbum
Loading...