forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: afaa on April 01, 2006, 05:37:43 am

Title: Import albums from Picasa 2 into Coppermine
Post by: afaa on April 01, 2006, 05:37:43 am
I love Coppermine over Gallery2 but the latest thing from Gallery2.1 that can import from Piscasa is just too cool.
Reference link: http://codex.gallery2.org/index.php/Gallery2:Modules:picasa (http://codex.gallery2.org/index.php/Gallery2:Modules:picasa)

If you mods don't think it's possible then please ignore.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Joachim Müller on April 01, 2006, 07:19:32 am
valid feature request, not sure it should go into the core or come as a plugin or mod though.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Aditya Mooley on April 01, 2006, 07:49:02 am
Not really a valid feature request because there is no Picasa SDK available.
What the Gallery2 mod does is just accept a Zip file containing pictures. Now, accepting Zip file is a valid feature request. :)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: weegee on June 30, 2006, 05:18:20 pm
Picasa can export with an xml-file including the captions.. maybe it would be easy to read that file, so we don't have to write every caption again...
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on October 21, 2008, 10:44:24 pm
The api is available now: http://code.google.com/apis/picasa/

It would be so awesome to have this available. I started using Picasa to organize my photos and it makes it so easy to upload to Facebook with the api.

If no one wants to do this, I could try to do it. But there are stronger coders than me on the team. :)

Since in facebook this is an application, this could probably be a plugin and doesn't need to go into the core code of Coppermine.

My friend said he'd help me out on the project if no one else on the team wants to do this.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on October 21, 2008, 11:32:56 pm
My friend and I have already started doing research on this--checking out the iPhoto plugin--so I'll volunteer to take this on unless there are any objections. We've been wanting to work on a project and this seems like a good one.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Joachim Müller on October 22, 2008, 12:47:52 am
I'm looking forward to your plugin. I'm sure that you will do fine - don't under-estimate your skills. I think you did a fantastic job with your previous contributions.

Joachim
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on October 22, 2008, 02:29:15 am
Thanks for the vote of confidence, Joachim.

As I did some more research, I came across the announcement of the picasa api (http://google-code-updates.blogspot.com/2008/03/add-your-own-buttons-to-picasa-upload.html). Guess what I saw in the comment section:

Quote
tariquesani.net said...
WOW! thanks finally I can sit and program my sent to Coppermine button!

I'll ping Tarique to see about his work on the Coppermine button. :)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tarique Sani on October 27, 2008, 04:43:38 am
Hi Thu, Thanks for taking this up. Now that Picasa has given a API / Inteface to work with this indeed become a valid feature request and a good one at that. I did investigate and managed to get some "proof of concept" code but we never really finished it. However, as I remember there are a few challenges which need to be addressed

Most of the buttons available are for large sites like blogger, iphoto, flickr etc which means it is create once and forget it job but

#1 We cannot have a ready made button available for download because the URL to upload the photo has to be absolute and hard coded into button.

#2 Which album will this button upload to?

For #1 my idea was to have the button created dynamically - after all it is just a zip file - our URL to the picasa button will write the absolute path + url of the script to upload this to into the proper file, create the zip with an appropriate name and serve it

For #2 I am open to suggestions.

@Thu - I am willing to collaborate and extend whatever help you might need to see this thru
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on October 27, 2008, 05:39:41 pm
1) your idea to address the dynamic info challenge sounds good to me
2) Would it not be possible to get a list of albums to upload to and have the option to create new albums? I'm just thinking that that's how the Facebook plugin does it.

I'm looking forward to having a working plugin. Thanks for offering to help. :)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on December 23, 2008, 07:12:47 am
I have good news and bad news.

Good news: I have functioning code to upload files from Picasa 3 to a Coppermine gallery.

Bad news: It only works for CPG 1.5. It doesn't work in version 1.4; I think it has to do with the sanitizing of $_POST variables.

Limitations: this currently does a batch upload of the files, with proper resizing done on the computer (saving strain on the server). Because of that, file data like Captions, Keywords, etc are not transferable to the Coppermine gallery. Maybe eventually a more advanced upload method could be used so that the additional data could be retained.

To do's:
- Turn this into a plugin
- Automate the button-creation process.
  - Do this during plug-in installation.

Since this doesn't modify any core files, I'm not sure if it's necessary to make this a plugin.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Joachim Müller on December 23, 2008, 10:29:12 am
That's good news - it doesn't hurt imo that this will only work for cpg1.5.x. Actually, it should give end users an additional benefit for updating from cpg1.4.x to cpg1.5.x once it get's released. I'm looking forward to the plugin.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 19, 2009, 05:32:25 pm
let me share some thoughts about this : i find Picasa one of the best tools to organize pictures on local machine, by having all the features of taging, naming, rating pictures, creating virtual albums etc etc. It simply works. My 10 years of active photography gives me archive of 40.000+ images (i know, dont ask :D), and this is the only tool i belive it allows me to give them some rules :D Picasa is quick and easy, and lets be honest - its free after all.

coppermine is great tool and im using it for few years now, hosting over 35 thousand images in it, mine and others as well. It has some drawbacks, but i never thought of moving to some other tool.

i know there are links to various FTP upload solutions, XP publishing etc, but this doesnt go the way I need - I need to be able to select images in Picasa, "hit a button", choose a target gallery on my webserver and go make a cup of tea, while my machine is busy uploading. This can be done via FTP, mass upload etc, i know, but it doesnt have the ONLY option i really need - I need to transfer the CAPTIONS of the images, and make coppermine to accept them when processing the images into a given album / folder. This is really the one and only reason i want to have Picasa and Coppermine work together - if i organize pictures on my local machine, i give them names, descriptions etc, i dont want to do that job again on my remote / web server.

As i checked the google code page for Picasa2Coppermine project, the site is empty, there is nothing :( Is there any progress on this tool ? what are the problems with 1.4 version, can it be modified (even hardcoded) so it accepts the picasa files ? Is there a progress with this idea ? As i mentioned, this is quite interesting option for me, so I apologize for being so eager to see the results, but I belive this is the true future of photography publishing on the web :) And if I can offer my php coding skills, I gladly will, to help this project to complete.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on January 19, 2009, 06:47:09 pm
Thanks for the offer to help, Letus. I definitely would like to have some help to get the title, caption, etc data transferred from Picasa to Coppermine, also.

The project is empty because I couldn't figure out how to upload the source after going through all the menu options. I should have looked for instructions at the time but didn't get around to it.

The reason, I believe, that this plugin doesn't work with 1.4 is because of how that version handles input, like that from $_POST. It sanitizes all data and removes html entities that Picasa sends to Coppermine. I think getting around this would open the gallery to security vulnerabilities so that's why I didn't pursue that. In CPG 1.5, there's a new framework(?) for handling input which has an option to allow raw data input. Since this export feature is only available to gallery admins, I believed it would be reasonably secure from exploits by would-be hackers.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on January 19, 2009, 07:54:05 pm
I figured out how to upload the picasa2coppermine source (http://code.google.com/p/picasa2coppermine/source/browse/#svn/trunk) to Google Code. I'm currently working on the wiki instructions on how to use picasa2coppermine. It will be more automated, hopefully, but it's a manual process now.

Please note that this also requires getting CPG 1.5 from svn. (unless you're reading this after 1.5 gets released officially and then svn isn't required)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 20, 2009, 10:59:50 am
perfect, i wanted to see the code you made to be able to help, and extend the amount of information that curently get loaded from Picasa to CPG :) So i will check your code and see what we can do, also about the _post sanitizing and stuff.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 21, 2009, 02:09:31 pm
well, from what i've read about it, Picasa is storing the information in IPTC part of the image descriptions. To achieve what I need to do - upload images and keep their descriptions and names without duplicite work, it seems to be possible to "append" IPTC post-processing of the uploaded images >


1) image is choosen on local folder (marked within Picasa)
2) image is uploaded to remote webserver with Coppermine (using this plugin)
3) image is resized, watermarked etc on remote webserver
4) image is saved to database on remote webserver

and now

5) image is opened to read IPTC information from it, these information are updated to database to update image NAME (not file name, just the TITLE or CAPTION of the image) and DESCRIPTION

this would do the "magic" i need to do :)

do you agree or have any other ideas how to transfer the descriptions and titles ?
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 21, 2009, 03:34:17 pm
the other thing might be, to create "offline" module to be launched on finished gallery - this module would go thru all images in the given gallery, read their IPTC info, update caption and description of the image (database fields), and move to next image ...
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on January 21, 2009, 08:43:06 pm
well, from what i've read about it, Picasa is storing the information in IPTC part of the image descriptions. To achieve what I need to do - upload images and keep their descriptions and names without duplicite work, it seems to be possible to "append" IPTC post-processing of the uploaded images >


1) image is choosen on local folder (marked within Picasa)
2) image is uploaded to remote webserver with Coppermine (using this plugin)
3) image is resized, watermarked etc on remote webserver
4) image is saved to database on remote webserver

and now

5) image is opened to read IPTC information from it, these information are updated to database to update image NAME (not file name, just the TITLE or CAPTION of the image) and DESCRIPTION

this would do the "magic" i need to do :)

do you agree or have any other ideas how to transfer the descriptions and titles ?

@Letus: Thanks so much for researching this. Since the data is stored with the file in IPTC, it seems we don't need to do massive changes to this plugin to support getting the titles/descriptions transferred into Coppermine. Instead, as you implied in your more recent post, I think that that process should be handled in a separate plugin so that people using tools other than Picasa can take advantage of the data transfer. I did a search for IPTC in the forums here and there were a lot of results. Maybe someone has accomplished the task already.

Just a little correction on the order of things:
1) image is choosen on local folder (marked within Picasa)
2) image is resized, watermarked etc by Picasa
3) image is uploaded to remote webserver with Coppermine (using this plugin)
4) image is saved to database on remote webserver

One of the benefits of this plugin is not having to use webserver resources to do resource intensive file manipulations. :)

As I mentioned above, #5 should be handled by a non-Picasa-specific plugin. Then again, if it's easy enough, we can include it in the plugin so that people won't need to have 2 plugins to accomplish the tasks they want. I would just prefer to enable a solution that is less specific so that more people can benefit.

@ALL. A security flaw has been uncovered in the plugin so please let me make it clear: Do not use this on a publicly available web server. The subversion access was required to make it harder for less experienced users to try this out. This is currently for developers to test and revise. Since this requires CPG 1.5, which is not recommended for live use yet, please don't use this except for testing on a private/local server until there is a downloadable version. Thank you.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 22, 2009, 11:01:47 am
thank you for the debate, it helps to clear things out :), very progressive :D

from my point of view, the watermarking is mainly protective and also "branding" tool, and because of the "branding" side of this, i prefer to do it always the same way, it means, for any user who uploads photos to our gallery (there is about 100 of them currently), the watermark will be there, with same size and same position on all the pictures. So i suggested the order of uploading and resizing pictures on the remote machine (also, due to our main focus, which is military / history, we tend to upload large pictures to keep the details as big as possible, so reducing size locally means we are loosing information), this is definitly something we can set up two different ways (maybe some kind of setting in your tool ?), because not everybody needs to do it "my way".

but back to the point of IPTC, i did some research here yesterday, and there is tool that reads all images in the folder / gallery and if it finds IPTC info in them, it replaces / updates current image title and description with the information found in IPTC. Which is exactly what i was looking for, now we have two options. We can either adjust this mod and use part of it to attach it to this mod as post-processing ( point #5 in previous discussion) or keep it standalone like it is now, and only suggest ppl to install that mod as well and run after images are uploaded from Picasa using your plugin.

So i feel this is getting very close to what i am looking for :D

PS. As "real life situation", there is one more thing for me to think about :) - as I mentioned, i have thousands of images in my gallery. I invested a LOT of time to upload them, rename some of them, describe them. Now, I have Picasa on my local machine, where original images are, and these resized, adjusted, and described images with titles on my webserver. We obviously figured out, how to upload from Picasa(local) to Coppermine(remote). Now I just need to find a method, how to do it "the other way around", so how to get at least SOME of the information from Coppermine(remote) to my images in Picasa(local), so I dont have to do the same work of describing the local images, when I did that on remote (but its not in IPTC, but only in the database). And this task will be tough I'd say :)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on January 22, 2009, 07:52:14 pm
Picasa has a watermarking feature for uploaded files so I would think you could set it on your own computer to match the same settings that are used on the remote machine. If you as admin are the only person using the picasa uploader, this might not be that big of an issue.

The uploader gets the resize value from the Coppermine database so if you want to upload large files, that's not a problem.

I agree that it would be cool if there were a way in the api to sync between local and web files the way that there is for Picasa Web Albums.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 23, 2009, 09:16:39 am
yeah, the problem is not me, but other users - i hardly can ask them all to use same watermarking technique to have the watermarking same across all images, is easier for me to use watermarking on the webserver (remote machine)

about resize, do you upload all three image sizes directly from Picasa (thumb, normal, full size) ? because if you do, that would save a LOT of time/resources on remote machine

yeah, sync would be great, i just have no idea how to start :) i leave the images under its original "camera" names and so they are unique across my whole portfolio and each camera i have, so probably i can do some kind of export from CPG and try to import to Picasa, if that can be done, have to do some research in this topic :)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on January 23, 2009, 11:03:19 am
Picasa uploads the full (which is defined by the max size so not necessarily the original size) and thumb files. If the intermediate setting is enabled, the normal file gets created by Coppermine upon addition to an album.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on January 30, 2009, 07:43:15 am
It turned out that CPG 1.5 has a configurable option to read IPTC data so there's no need for additional coding. :) It at least imported the caption and keywords fields.

Aditya has made a plugin version of picasa2coppermine that is available via svn. Please check it out. Once it is ready, I'll remove the original version that I wrote to avoid confusion.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on January 30, 2009, 07:53:10 am
wow, great :D now only when 1.5 is due ? :D
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Joachim Müller on February 01, 2009, 10:28:51 am
When it's ready. While it's not being released, you can test it using the SVN checkout (http://documentation.coppermine-gallery.net/en/dev_subversion.htm#dev_subversion_checking_out), but remember: no support for cpg1.5.x yet - no support means "no questions asked". We're very strict in this aspect.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Letus on February 01, 2009, 11:33:48 am
yeah, sorry I asked, once i submitted this, i've seen some other forums about the "release date" :) I understand there is no support on SVN version
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Paver on February 10, 2009, 02:34:20 am
@Thu: I just noticed your work here on this plugin.  I'd like to contribute to the plugin as well.  Would you add me to the Google project?  My username is pvanrompay.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on February 10, 2009, 02:47:00 am
I've added you to the project, Paul. :)
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Paver on February 10, 2009, 11:59:17 pm
Thanks, Thu.  It would be nice to have a release version of this plugin ready when 1.5 launches.  I'll see what I can contribute with what you and Aditya are doing.

I haven't used Picasa to Web Albums.  I need to read documentation about the SDK too.  As a quick question, what happens if the transfer to Coppermine stops after file 5 (out of 20)?  It would be nice to resume a batch transfer without re-selecting.  If not, then a way to skip already existing files would probably work.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tranz on February 11, 2009, 01:46:21 am
I'm really looking forward to having this plugin ready as soon as 1.5 is ready. It would make it so much easier to update my gallery.

It would be a good case to test for what happens to an interrupted transfer. Maybe Aditya knows, but I don't know how to induce a failure, short of disconnecting my internet connection in the middle of the transfer? Then again, my test server is local to my computer so I can't test it that way.

Picasa maintains the selection of the photos so it wouldn't require re-selecting unless the selection got lost due to manual deselection or view change.

As for handling duplicates, that seems to be relevant to the core code. It's possible that the user really does want to use the new photo, and not skip it due to an existing copy. The question is if he/she wants to keep two copies or replace the old one with the new. The current system seems to keep two copies by giving the new copy a modified file name.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Aditya Mooley on February 11, 2009, 05:50:37 am
Quote
As a quick question, what happens if the transfer to Coppermine stops after file 5 (out of 20)?  It would be nice to resume a batch transfer without re-selecting.

Please understand, I have stated this earlier as well, Picasa does a single post for all the selected files and does not upload the files one by one. So, if you disconnect from the internet in middle of a Picasa upload nothing will be uploaded to Coppermine.

If Coppermine stops/dies in between adding the files, there is nothing we could do. Picasa never shows any message to users on its own. This is a limitation of Picasa and we cannot do anything about it. May be Thu can give this feedback to Picasa team. The biggest feature request is, doing one post per photo wherein we can handle many more things and much bigger uploads can be done. Right now, Picasa upload doesn't offer many advantages over regular upload via browser.

I have tried to handle most of the cases where uploading can fail like invalid file name, large file size, etc. In these cases, the file will be skipped and we move on to the next file. At the end, a message is shown with the stats for successful and failed uploads.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: SaWey on February 13, 2009, 05:57:18 pm
What about using an intermediate custom written application, so Picasa would send the images to that app and then the app does the rest?
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Aditya Mooley on February 14, 2009, 05:36:11 am
Well, that can be yet another plugin application.  I am really not in favor of modifying this plugin to behave as a batch upload script. Also, since Picasa posts all the image together, the maximum upload size allowed the server will be reached quickly and you won't be getting the real advantage of batch upload like process where you can process unlimited number of photos.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: johndogget on February 04, 2011, 07:37:03 pm
Hola. Great work! :) Works like a charm. Just a question on the max size per picture, currently Picasa is doing the shrinking and thumpnail creation and uploading both to coppermine; by default the pics are sized 2048 x 1366 pixels. Is there any way I can influence that setting; I already searched on the Picasa Google help etc. but didn't find that particular setting mentioned anywhere (apart from uploading to web folders, via emails, etc. where a setting like this is possible to set).
Thanks! Bjoern
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: papukaija on February 05, 2011, 11:36:44 pm
@johndogget: There's no support for feature requests (http://forum.coppermine-gallery.net/index.php/topic,15866.0.html).
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: johndogget on February 06, 2011, 06:38:36 pm
Alright... Thx for bringing that to my attention. I'll copy+paste then... ciao.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: johndogget on February 06, 2011, 07:07:28 pm
Alright... Thx for bringing that to my attention. I'll copy+paste then... ciao.

Actually I found it in the config page for "File settings" - "Max width or height for uploaded pictures ". Cheers.
Title: Re: Import albums from Picasa 2 into Coppermine
Post by: Tanuki on June 03, 2012, 04:21:57 am
Was this project abandoned?