Announcement

  •  » Extensions
  •  » Command line synchronization between digikam and piwigo.

#1 2011-06-18 08:44:26

sbyke
Member
2011-02-26
13

Command line synchronization between digikam and piwigo.

My goal is to tag photos in digikam and then automatically sync them into piwigo smart albums.  I.e. dump from camera, tag with digikam, run script, tell friends/family that the new photos are visible in piwigo.

I figured out the piwigo schema enough so that a python program I wrote can:
* Find all images newer than a time/date (of the last sync)
* Identify those with 5 stars for publishing
* Look up the tags for the new 5 star photos
* Eliminate the digikam specific tags unlikely to be useful to piwigo
* identify the directory and file name on the images

Alas, I didn't realize till just now that pwg.images.addSimple is restricted to JPG/PNG files.   I found pwg.images.add but that seems a bit more complex than I'd like since I have to scale/supply multiple copies of an image.  Is there API access to the same functionality available through piwigo -> admin -> photo -> add?  I think that it takes NEF and JPG and handles any rotation/scaling necessary.

I was looking for API documentation but if I go to:
   http://piwigo.org/doc/doku.php?id=en:de … images.add

Then click on webapi I get page doesn't exist.  I was hoping for a function that would allow me to:
1) upload NEF or JPG
2) allow me to provide tags
3) would handle any re-sizing, thumbnails, multiple resolutions, and rotation

Oh, and one more closely related question.  Is there API access to allow changing the tags of a photo?  If I add/remove a tag for a photo my script can detect the changed modification date in the metadata... but how do I tell piwigo?  Normally I'd read the (missing) API docs.

Offline

 

#2 2011-06-18 08:58:52

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

Re: Command line synchronization between digikam and piwigo.

Hi sbyke,

I will make a better answer later but concerning the Piwigo API, see all methods on your Piwigo install : http://yourdomain.com/yourpiwigo/tools/ws.htm (for example on a demo)

Offline

 

#3 2011-06-21 11:52:28

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

Re: Command line synchronization between digikam and piwigo.

sbyke wrote:

I was looking for API documentation but if I go to:
   http://piwigo.org/doc/doku.php?id=en:de … images.add

Then click on webapi I get page doesn't exist.

I've just created the page : http://piwigo.org/doc/doku.php?id=en:dev:webapi:start

Offline

 

#4 2011-06-21 18:19:06

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

Re: Command line synchronization between digikam and piwigo.

even if it doesn't use Piwigo API, check [extension by saimon] pywiUpload

Offline

 

#5 2011-06-21 20:56:57

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

Re: Command line synchronization between digikam and piwigo.

sbyke wrote:

I was hoping for a function that would allow me to:
1) upload NEF or JPG

pwg.images.addSimple won't take a NEF file, but JPEG or PNG file.

sbyke wrote:

2) allow me to provide tags
3) would handle any re-sizing, thumbnails, multiple resolutions, and rotation

Yes, pwg.images.addSimple can do it. Read the documentation [wiki] pwg.images.addSimple, you can give some tags. Resizing, thumbnails, rotation, creation of HD (high definition) are all automatic.

sbyke wrote:

Oh, and one more closely related question.  Is there API access to allow changing the tags of a photo?  If I add/remove a tag for a photo my script can detect the changed modification date in the metadata... but how do I tell piwigo?

You can use pwg.images.setInfo. It's perfect for adding a tag or changing the list of tags for a given photo.

Offline

 
  •  » Extensions
  •  » Command line synchronization between digikam and piwigo.

Board footer

Powered by FluxBB

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