Announcement

#1 2012-11-10 17:56:47

mwheinz
Member
2012-11-10
2

How to tag photos programmatically

Hey,

I'm new to Piwigo; and I love it. I'm in the process of trying to migrate about 14000 home photos from iPhoto to a home web server (for family only) and Piwigo is perfect: after a few hours of perl and rsync hackery, I'm 90% of the way there.

The last bit I'd like to do, though, is to map the "faces" in iPhoto to Piwigo tags. Is there a document I can read to let me know the correct way to add tags to Piwigo? I don't want to do it half-way and end up with a corrupted database.

I would be happy to share the final scripts with the Piwigo community when I'm done: the iphototopiwigo plug-in is excellent, but it's not really suited to doing a bulk conversion like this.

Offline

 

#2 2012-11-10 21:02:04

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: How to tag photos programmatically

Hi mwheinz,

You can use the Piwigo web API (web services) to set tags on a photo:

* pwg.tags.getList
* pwg.tags.add
* pwg.images.setInfo with parameter tag_ids

You can find Perl examples with tools/piwigo_remote.pl in your Piwigo installation.

The main problem in my opinion is to retrieve the information from iPhoto. I would be interested in learing how you can get this "face tags"!

Offline

 

#3 2012-11-10 21:10:46

mwheinz
Member
2012-11-10
2

Re: How to tag photos programmatically

Thanks!

The key for getting the data out of iPhoto is the AlbumData.xml file; I'm already able to export images while maintaining the event structure; the next step is to use the "List of Faces" array which appears to be a list of all faces, and the "face key" tag which maps the face in an image to the list of faces.

Offline

 

#4 2014-06-16 18:51:46

doclalor
Guest

Re: How to tag photos programmatically

Has anyone produced a face-tag preserving plugin to port photos from iPhoto to Piwigo?

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact