Just to give an update on this, I'm now able to authenticate, get the list of categories and create a new category using shotwell. I'm now working on splitting the image into chunks and sending it to Piwigo using pwg.images.addChunk and pwg.images.add, which looks like is going to be the most complex part of it. I'll post my code on github when I get this working...
Just to give an update on this, I'm now able to authenticate, get the list of categories and create a new category using shotwell.
Great news! Thank you for notifying the forum.
I'm now working on splitting the image into chunks and sending it to Piwigo using pwg.images.addChunk and pwg.images.add, which looks like is going to be the most complex part of it.
Just don't implement pwg.images.add in your first draft of the Shotwell plugin. Use pwg.images.addSimple instead. It is much simpler. You have to install [extension by plg] pwg.images.addSimple and read [wiki] pwg.images.addSimple. pwg.images.addSimple will become a standard method in Piwigo 2.2.
Don't hesitate to ask many questions, I'm here to make your life simpler as a contributor :-)
Well I'm glad I talked on the forum before digging too much into pwg.images.addChunk because, in fact, pwg.images.addSimple seems MUCH easier to use !
Ok so I'm now able to upload photos to Piwigo using Shotwell !
The code can be found here, and needs testing (obviously): https://github.com/guillaumev/piwigoshotwell I'll email the shotwell mailing list and will let you know.
Kudos to guillaumevfor this patch.
I just compile svn trunk of shotwell and apply the patch and it worked great !
results here : http://memeteau.com/photos/index.php?/category/36
A most of the shared host are usually limiting php upload to 2M(mine @toile-libre.org is 100M ! ) , it's true that the SimpleAdd will not be sufficient in most cases but it's great for now !!
So just get the SVN or stable of shotwell and add the ppa of yorba for the needed dev librairies (see http://yorba.org/shotwell/install/)
then get the Patch from Gitbub and apply hit on the root dir of the shotwell sources.
Recompile and install and that's it !
plg > you can find how to install the connector in shotwell here: https://github.com/guillaumev/piwigoshotwell (see readme file). In order to test it, I would say try to upload various files in various categories.
Testing it, I found two limitations:
- subcategories are not displayed in the combo box, making it impossible to upload photos into subcategories
- it's impossible to create a subcategory from the shotwell interface
I'll see if I can fix these, but probably later.
I just updated [extension by plg] pwg.images.addSimple with a new version 2.1e to fix the bug that forced the user to open screen [Administration > Photos > Add] at least once before using the Shotwell plugin.
guillaumev, can you please create a new topic dedicated to the Shotwell plugin, in the Beta testing section of the forum, please? (I will start to communicate a bit more about this export plugin then)