Request: Post-to-G2 button added to picasa ui

jivyb

Joined: 2005-11-10
Posts: 31
Posted: Mon, 2007-03-19 06:43

Hopefully this is the right place for a suggestion:

I like the picasa module, but for my end users, it's too complicated for them to zip an album or export a web page. So I think it would be awesome to take the picasa module a step further and, like the tabblo people (http://blog.tabblo.com/index.php/2006/06/17/picasa/)add a button to picasa that directly lets you publish the photos you're "holding" into a web folder. I know, it's always easy to suggest something you have no idea how to do...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-03-19 12:16

at the point where the picasa module for g2 was developed, google was about to release a picasa 2 api, but they didn't.
did they now?
if so, this could be done. since the gallery core development team is very busy, we'd welcome other developers to hack this together.
we'd be glad to explain the g2 aspects if anyone's interested.

--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
jivyb

Joined: 2005-11-10
Posts: 31
Posted: Sat, 2007-06-09 05:25

Hi Valiant--thanks for your response. I still don't think there's an api, but there is now a plugin for picasa that lets you upload to flickr. So I'm thinking there HAS to be a way to do it for g2. There's an explanation there that gives details that might help...

Here's the link to the open-source project: http://picasa2flickr.sourceforge.net/index.html

From the about page: "About
Based on the proof of concept provided by Tabblo and using the nice flickj api, picasa2flickr provides a kind of plugin to picasa that allows users to upload their photos to flickr.
The mechanism:

1. Using a custom "BlogThis" Button, picasa posts XML data (photos URL and titles) to a custom URL;
2. On this URL, a CGI script parses the XML and provides photos URL and titles to a dedicated Java applet;
3. The Applet retrieves the photos and upload them to a flickr account.

That's it."

 
oernii

Joined: 2005-10-27
Posts: 11
Posted: Wed, 2007-06-13 15:36

Hi, 2 years later: same problem ;-)

http://gallery.menalto.com/node/65235

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Sun, 2008-03-30 01:14
valiant wrote:
at the point where the picasa module for g2 was developed, google was about to release a picasa 2 api, but they didn't.
did they now?
if so, this could be done.

The API has been released now! http://google-code-updates.blogspot.com/2008/03/add-your-own-buttons-to-picasa-upload.html

 
jivyb

Joined: 2005-11-10
Posts: 31
Posted: Sun, 2008-04-13 01:12

Do you know if there is any interest in pursuing this? I think it would be a great addition to the itemAdd options...it's so much simpler if people could click a button w/in picasa and send the images rather than having to do an export as html.

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Thu, 2008-06-12 10:49

I'm almost done with a picasa button file. Currently it just uses galleryadd.pl, but it'll provide you a nice little UI to add the images and let you pick what album they go in. I hope to be able to post it here completed for beta testing next week.

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Mon, 2008-06-16 21:45

I have a picasa2gallery button finished, and in beta release.
It's available here:

http://www.snowburst.org/~jjohns/picasa2gallery.html

It's not the prettiest UI, but it works.

It only works with gallery 2.

Please give it a shot.
I've been running it at home for a week now without incident.

Source/etc to be posted soon.

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Tue, 2008-06-17 16:38

good job!

unfortunately, it does not work for me:
the button installs fine, but when i try to use it, I get the following error message (partially translated from German):

Quote:
Unable to find the specified module
LoadLibrary(pythondll) failed

followed by:

Quote:
Error
C:\Program Files\picasa2gallery\PYTHON25.DLL

I have Python installed and it is on the Path, but the PYTHON25.DLL file specified in the error message was not included in the ZIP-file you provided.

any ideas what the problem could be?

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Tue, 2008-06-17 16:51

Very strange.
Here are the contents of my picasa2gallery directory, from the unzipped file. I have a file python25.dll present. Do you have all of the same files?

Directory of C:\Program Files\picasa2gallery

06/16/2008 23:28 <DIR> .
06/16/2008 23:28 <DIR> ..
02/21/2008 13:12 77,824 bz2.pyd
06/16/2008 23:20 2,241,004 library.zip
07/11/2006 19:35 348,160 MSVCR71.dll
06/16/2008 23:20 28,160 picasa2gallery.exe
06/16/2008 00:33 2,469 picasa2gallery.exe.log
02/21/2008 13:11 2,117,632 python25.dll
06/16/2008 23:28 <DIR> tcl
03/27/2006 16:23 576,000 tcl84.dll
03/27/2006 16:44 1,038,848 tk84.dll
02/21/2008 13:12 479,232 unicodedata.pyd
02/21/2008 13:11 4,608 w9xpopen.exe
02/21/2008 13:12 323,584 _hashlib.pyd
02/21/2008 13:12 53,248 _socket.pyd
02/21/2008 13:12 655,360 _ssl.pyd
02/21/2008 13:12 40,960 _tkinter.pyd

Perhaps it is a case problem. If you have the same files, maybe try renaming python25.dll to PYTHON25.DLL ?

Also, what version of windows are you running? I'm running XP.

 
oernii

Joined: 2005-10-27
Posts: 11
Posted: Wed, 2008-06-18 11:25

Wow, but unfortunately, I use only linuxes now. I'll give it a go at home tomorrow.

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Wed, 2008-06-18 11:29

it's really just a python script providing a gui wrapping gup, so i bet it would work under picasa on linux. i can try to put together an installation to do that if you want.

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Wed, 2008-06-18 22:02

I have a friend with the same reported error that you have using Vista. I'll try to debug this with her.

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Fri, 2008-06-20 08:26

Funny, my directory contained the following files (different from yours):

21.02.2008 12:12 77.824 bz2.pyd
16.06.2008 23:20 2.241.004 library.zip
11.07.2006 19:35 348.160 MSVCR71.dll
16.06.2008 23:20 28.160 picasa2gallery.exe
16.06.2008 00:33 2.469 picasa2gallery.exe.log
17.06.2008 18:10 <DIR> tcl
27.03.2006 16:23 576.000 tcl84.dll
27.03.2006 16:44 1.038.848 tk84.dll
21.02.2008 12:12 479.232 unicodedata.pyd
21.02.2008 12:11 4.608 w9xpopen.exe
21.02.2008 12:12 323.584 _hashlib.pyd
21.02.2008 12:12 53.248 _socket.pyd
21.02.2008 12:12 655.360 _ssl.pyd
21.02.2008 12:12 40.960 _tkinter.pyd

However, I just checked your homepage again and the zip file now contains different files (including a python25.dll).

So I extracted the new zip-file and then at least the error did not occur anymore. But apart from the message "Making copies for Gallery", nothing happened when I pressed the button...

I compared the new directory listing with yours and saw that library.zip was now missing. After adding that to the directory from the first zip-file I had downloaded, everything now works fine!

Thanks a lot for the great work!

Just make sure that the zip-file on your homepage includes all the necessary files!

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Fri, 2008-06-20 08:34

just one more thing...

I have password-protected my gallery (using .htaccess), and your button doesn't like that (causes 401 authorization required error). Would it be difficult to make your button work for password-protected galleries?

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Sat, 2008-06-21 13:20

I figured out why the zip file was so messed up. I took it from the "build" directory from py2exe instead of the "distribution" directory.
I have updated the zip file. Please give it another shot. http://ender.snowburst.org:4747/~jjohns/picasa2gallery.html
All you should need to do is wipe out your picasa2gallery directory, and replace it with the contents of the new zip file.

I'll look into the .htaccess issue. I imagine that might be kind of hard to deal with, but I'll see if I can figure out a way.

 
xkriisx

Joined: 2008-06-27
Posts: 1
Posted: Fri, 2008-06-27 07:45

olhado47, what to do when i tried to add more than 1 gallery/picasa account to the picasa2gallery.exe program.

ive deleted the folder c:\program files\picasa2gallery, unzipped the zip file to start over and keep getting the error that tells me to view the log file, again and again and again.

now i cant launch the program from picasa, it tells me to read the *.log file which reads:

********************************************
There is more than one gallery saved;
Use the "-g" option to select one.
Traceback (most recent call last):
File "picasa2gallery.py", line 393, in <module>
File "picasa2gallery.py", line 373, in main
TypeError: 'NoneType' object is not iterable
*********************************************

Please let me know if you have any suggestions ...

Thanks,

 
wizzy

Joined: 2005-03-01
Posts: 3
Posted: Sat, 2008-08-02 01:35

Nice app. Upload works fine, but would be wonderful if it copied the captions as well. v.3? :)

 
Xnuiem

Joined: 2008-07-01
Posts: 7
Posted: Mon, 2008-09-08 06:11

Any success in making this Picasa 3 ready? I get a script error, but havent quite figured out where just yet.

 
wkearney99

Joined: 2003-01-18
Posts: 2
Posted: Thu, 2008-09-18 02:46

Nice work JJ, care for a suggestion? Would it be possible to have it avoid uploading pictures already present in the album? I'd like to find a way to just select a whole 'album' in Picasa and upload it again to the 'same' album in gallery. If I do it now it uploads everything and ends up duplicating things. Don't know what calls can or can't be made into gallery to determine if a picture is present or not. And I'm sure some folks might have issues with checking solely on the picture filename (but not me as all mine are always unique).

Anyway, great job thus far. I look forward to subsequent versions!

-Bill Kearney

 
Xnuiem

Joined: 2008-07-01
Posts: 7
Posted: Thu, 2008-09-18 16:39

JJ, any thoughts about having some help? If so, I would love to help you port this for Picasa 3 and work on enhancements. I worked in Python, Jython actually, many years ago, mainly my team works in JAVA and PHP now, but I can still help out. If you need a CVS server or SVN, perhaps Sourceforge? Either way, I would love to help out.

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Fri, 2008-09-19 16:52

Help would be great. I apologize for not getting back to people comments and suggestions quickly. My job has been taking up a lot of my time.
I just (and I mean 5 minutes ago) created a project on google code.
http://code.google.com/p/picasa2gallery/

The project is 99% empty.
I'll try to get the source code and build instructions uploaded tonight or this weekend.

 
jo2317

Joined: 2008-11-12
Posts: 1
Posted: Wed, 2008-11-12 06:21

Just to help out:

It doesn't look like it handles multiple galleries at this point.

If you want to delete all but one, you'll need to edit the gup (gallery uploader) config file.
It should be located in "C:\Documents and Settings\<your username>\.gup\config.ini"

you can take out the extra gallery and then it will work again.

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Fri, 2008-11-28 13:41

I just got (forceably) updated to Picasa 3, and I have no problems with the picasa2gallery.
Can you try upgrading to the latest version of Picasa and let me know if there's still a problem?
Thanks.

 
tgm4883

Joined: 2004-10-11
Posts: 16
Posted: Tue, 2009-01-06 16:08

Not sure how active this still is, but I'm running picasa2gallery 0.2 on Picasa 3 (Linux version) on Ubuntu 8.10. Works pretty well, although there are a few issues.

1. Picasa2gallery won't save the gallery location/user/password. I've tried Picasa 3 on Windows and it works fine, I've even copied the .gup directory into the same location in Ubuntu and still doesn't work.
2. There seems to be a limit to 120 pictures uploaded at a time. Is this changeable?

 
oernii

Joined: 2005-10-27
Posts: 11
Posted: Wed, 2009-02-11 09:02

see my blog post http://www.axonpro.sk/content/view/134/101/lang,en/

1) The current SVN sources of picasa2gallery uses some older GUP. I have replaced them in my install with the current guplib&gup.py from http://code.google.com/p/galleryuploader/source/checkout and it works very well.

- I had to edit the provided button (picasa2gallery.pbf) so it now looks like this:

            <param name="exe_path" value="/home/oernii/bin/"/>
            <param name="exe_name" value="picasa2gallery_wrapper.sh"/>

- I also had to create a custom wrapper because picasa uses wine and copies the files to the default TEMP folder of this wine. Problem is it returns filenames as "C:\windows\TEMP\..." which I had to replace with the real fs locations. See my simple wrapper

picasa2gallery_wrapper.sh:

#!/bin/sh
ALLFILES=$(echo $* | sed -e 's/C:\\/\/home\/oernii\/.google\/picasa\/3.0\/drive_c\//g' -e 's/\\/\//g')
python /home/oernii/bin/picasa2gallery-svn/picasa2gallery.py $ALLFILES

Hope this helps someone.

PS: any hope of getting tags & album names from picasa ?

 
olhado47

Joined: 2008-06-12
Posts: 9
Posted: Wed, 2009-02-11 09:35

Cool.

re GUP: I had to modify GUP a little to make it read images as binary files (the default on *nix) instead of text (the default on windows).

re pbf file: Cool. Yeah, I couldn't find a way to have picasa accept a dynamically created file, so I had hard coded the exe_path to C:\Program Files\...

re tag & album names: When I wrote this, picasa didn't pass that information to the uploading executable. It could have been updated since then, but I have a feeling the answer is "not likely"

-JJ

 
phaze

Joined: 2005-11-20
Posts: 4
Posted: Sun, 2009-02-22 19:37
olhado47 wrote:
Cool.

re GUP: I had to modify GUP a little to make it read images as binary files (the default on *nix) instead of text (the default on windows).

re pbf file: Cool. Yeah, I couldn't find a way to have picasa accept a dynamically created file, so I had hard coded the exe_path to C:\Program Files\...

re tag & album names: When I wrote this, picasa didn't pass that information to the uploading executable. It could have been updated since then, but I have a feeling the answer is "not likely"

-JJ

Hi JJ,

are those changes already available to the public community? I just checked your website an the last changes made there were in 2008...

Cheers, Axel.

 
kramp

Joined: 2009-02-26
Posts: 1
Posted: Fri, 2009-02-27 19:23

hi
i tried this usefull module on picasa 3
it doesn't work : i got the button and the gui, successfully connected to my G2 (it list my folders) but when clickin on "Upload&Exit" nothing hapens
here's what i find several times in the log file :

Exception in Tkinter callback
Traceback (most recent call last):
  File "Tkinter.pyc", line 1403, in __call__
  File "picasa2gallery.py", line 100, in uploadButton_command
  File "picasa2gallery.py", line 250, in postImages
  File "picasa2gallery.py", line 221, in createAlbumWithParent
  File "picasa2gallery.py", line 208, in getAlbumIdForName
  File "guplib\albums.pyc", line 201, in search_name
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
 
oernii

Joined: 2005-10-27
Posts: 11
Posted: Wed, 2009-12-30 13:05

I had this error too, you have to pull a newer version of GUP (or guplib?) I belive. The bundled one causes this error.

PS: you can try this "button" even outside of picasa for easier debugging. Just run it from commandline with:

python /usr/bin/picasa2gallery-svn/picasa2gallery.py $files