Giter Site home page Giter Site logo

gallery2picasa's People

Contributors

rpwoodbu avatar sebastianw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gallery2picasa's Issues

Merge defined/choosen sub albums

For some albums it would be nice to merge the album into the main albums.

for this case it would be nice if it was posible to set an option -x nosubalbums -o true.-t "my new album name"

is that possible?

Passwords on command line are insecure

The script currently requires credentials for the database and for a Google account to be specified on the command line. This is insecure for two primary reasons:

  • While the script is running, other users on the system can see the credentials in a process list such as that given by ps -Af on a linux machine.
  • Shells like bash are likely to store the command in a history file, and it's a bad idea for lots of reasons to have these credentials stored in clear text history.

In general, the same reasons we don't want passwords in URLs apply here.

Perhaps it would be more reasonable to use a small settings file, or take the passwords interactively, or both. I'm happy to do this work myself, but please speak up if there are any requests about how it should be implemented.

Setting the album thumbnail

I tried to figure out how to set the album thumbnail. As of today, without any success.
If someone knows how to update this metadata through g2data, I might be able to get this data out of gallery2 as well.

Request: get a list of albums

Here is some suggestions.

Is it possible to get a list of album in Gallery2 into a text file like this:

Summer party
Christmas
2007 pictures

and then run the script again with the new (edited) text file as a parameter.

This would make it possible to get a long list of albums edit the list of what you dont need and start the script up again without having to confirm every single album.

  1. (maybe better?)
    or maybe a reverse the selection , so you have to confirm every album, and then the script first start migrating after all is choosen?

Google error: Entity too large! (crash the script)

Google error: Entity too large!
CREATING Item [F:Billede 127.avi] [T:Billede 127] [S:Billede 127] [K:]
CREATING Item [F:MVI_0509.avi] [T:MVI_0509] [S:MVI_0509] [K:]
Google error: Entity too large!
CREATING Item [F:MVI_0512.avi] [T:MVI_0512] [S:MVI_0512] [K:]
CREATING Item [F:MVI_0589.avi] [T:MVI_0589] [S:MVI_0589] [K:]
CREATING Item [F:MVI_0591.avi] [T:MVI_0591] [S:MVI_0591] [K:]
Google error: Entity too large!
CREATING Item [F:MVI_0592.avi] [T:MVI_0592] [S:MVI_0592] [K:]
CREATING Item [F:MVI_0593.avi] [T:MVI_0593] [S:MVI_0593] [K:]
Google error: Entity too large!
CREATING Item [F:Nyt01_10 014.avi] [T:Nyt01.10 014] [S:Nyt01.10 014] [K:]
Traceback (most recent call last):
File "./gallery2picasa.py", line 225, in
main(sys.argv)
File "./gallery2picasa.py", line 197, in main
summary, filename, keywords=keywords, content_type=filetype)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 470, in InsertPhotoSimple
content_type)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 426, in InsertPhoto
converter=gdata.photos.PhotoEntryFromString)
File "/usr/lib/pymodules/python2.6/gdata/service.py", line 1235, in Post
media_source=media_source, converter=converter)
File "/usr/lib/pymodules/python2.6/gdata/service.py", line 1302, in PostOrPut
multipart[2]], headers=extra_headers, url_params=url_params)
File "/usr/lib/pymodules/python2.6/atom/init.py", line 92, in optional_warn_function
return f(_args, *_kwargs)
File "/usr/lib/pymodules/python2.6/atom/service.py", line 185, in request
data=data, headers=all_headers)
File "/usr/lib/pymodules/python2.6/gdata/auth.py", line 725, in perform_request
return http_client.request(operation, url, data=data, headers=headers)
File "/usr/lib/pymodules/python2.6/atom/http.py", line 169, in request
_send_data_part(data_part, connection)
File "/usr/lib/pymodules/python2.6/atom/http.py", line 358, in _send_data_part
connection.send(binarydata)
File "/usr/lib/python2.6/httplib.py", line 743, in send
self.sock.sendall(str)
File "/usr/lib/python2.6/ssl.py", line 203, in sendall
v = self.send(data[count:])
File "/usr/lib/python2.6/ssl.py", line 94, in
self.send = lambda data, flags=0: SSLSocket.send(self, data, flags)
File "/usr/lib/python2.6/ssl.py", line 174, in send
v = self._sslobj.write(data)
socket.error: [Errno 32] Broken pipe

It seems like if you have more video's that are too large for PWA the script crash.

it seems like google changed the limits if you signed up to google plus(video limit 15 mins)

Sort album list alphabetically

Upload Album "Galleri - Uldum højskole - Efterår 2005 - Andre Billeder"? [y/N/a]n
Upload Album "Galleri - Rejser - Kleinwalsertal i østring"? [y/N/a]n
Upload Album "Galleri - Rejser - Erik og Henriette på tur. - Film"? [y/N/a]n
Upload Album "Galleri - Rejser - Lena og Anders på jordomrejse - Costa Rica"? [y/N/a]n
Upload Album "Galleri - Familie - Stormen på vitskøl"? [y/N/a]n
Upload Album "Galleri - Uldum højskole - Forår 2006"? [y/N/a]n
Upload Album "Galleri - Rejser - Erik og Henriette på tur. - Belize"? [y/N/a]n
Upload Album "Galleri - Rejser - Backpacker tur 2006 - Thailand"? [y/N/a]n
Upload Album "Galleri - Uldum højskole - Efterår 2005 - Anne k"? [y/N/a]n
Upload Album "Galleri - Uldum højskole - Efterår 2005 - Mie - 16,12,05"? [y/N/a]a
CREATING ALBUM [Galleri - Rejser - Erik og Henriette på tur. - Argentina] []
CREATING Item [F:IMG_5090.JPG] [T:Saa er vi paa city tur i Buens Aires.] [S:Saa er vi paa city tur i Buens Aires.] [K:]
CREATING Item [F:IMG_5091.JPG] [T:Museum.] [S:Museum.] [K:]
CREATING Item [F:IMG_5092.JPG] [T:Vatikanets ambassade i Argentina.] [S:Vatikanets ambassade i Argentina.] [K:]
^C

-0 option dosent work as it should, mismatch between selected album and actually uploaded albums.

seems the problem exists with both use of combinations n/y and /n/a

Albums get new date

Im not sure if this is an error or just how Webpicassa works, but all albums migrated get the date migrated insted of the date created in gallery2.

Entity too large

Traceback (most recent call last): File "./gallery2picasa.py", line 208, in main(sys.argv) File "./gallery2picasa.py", line 195, in main raise e gdata.photos.service.GooglePhotosException: (413, 'Request Entity Too Large', 'Video file size exceeds 104857600')

Check for duplicates

Hi.

It would be nice if the script could check for duplicates, so you can kind a resume your migration if something went wrong.

TypeError: encode() argument 1 must be string, not None

/sebastianw-gallery2picasa-7de09a6$ sudo ./gallery2picasa.py -b gallery -a xxxxxx.p -u [email protected] -p xxxxxxx -d gallery -g /var/www/gallery/g2data -y private -o false >> gallery.log
Traceback (most recent call last):
File "./gallery2picasa.py", line 215, in
main(sys.argv)
File "./gallery2picasa.py", line 151, in main
galbum = create_google_album(pws, album, privacy)
File "./gallery2picasa.py", line 71, in create_google_album
print strout.encode(sys.stdout.encoding, 'replace')
TypeError: encode() argument 1 must be string, not None

Google error: Entity too large!

Im still getting the following error with the newst script, seems to bee if there is more that on too large file in a row

Google error: Entity too large!
CREATING Item [F:Billede 127.avi] [T:Billede 127] [S:Billede 127] [K:]
CREATING Item [F:MVI_0509.avi] [T:MVI_0509] [S:MVI_0509] [K:]
Google error: Entity too large!
CREATING Item [F:MVI_0512.avi] [T:MVI_0512] [S:MVI_0512] [K:]
CREATING Item [F:MVI_0589.avi] [T:MVI_0589] [S:MVI_0589] [K:]
CREATING Item [F:MVI_0591.avi] [T:MVI_0591] [S:MVI_0591] [K:]
Google error: Entity too large!
CREATING Item [F:MVI_0592.avi] [T:MVI_0592] [S:MVI_0592] [K:]
CREATING Item [F:MVI_0593.avi] [T:MVI_0593] [S:MVI_0593] [K:]
Google error: Entity too large!
CREATING Item [F:Nyt01_10 014.avi] [T:Nyt01.10 014] [S:Nyt01.10 014] [K:]
Traceback (most recent call last):
File "./gallery2picasa.py", line 225, in
main(sys.argv)
File "./gallery2picasa.py", line 197, in main
summary, filename, keywords=keywords, content_type=filetype)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 470, in InsertPhotoSimple
content_type)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 426, in InsertPhoto
converter=gdata.photos.PhotoEntryFromString)
File "/usr/lib/pymodules/python2.6/gdata/service.py", line 1235, in Post
media_source=media_source, converter=converter)
File "/usr/lib/pymodules/python2.6/gdata/service.py", line 1302, in PostOrPut
multipart[2]], headers=extra_headers, url_params=url_params)
File "/usr/lib/pymodules/python2.6/atom/init.py", line 92, in optional_warn_function
return f(_args, *_kwargs)
File "/usr/lib/pymodules/python2.6/atom/service.py", line 185, in request
data=data, headers=all_headers)
File "/usr/lib/pymodules/python2.6/gdata/auth.py", line 725, in perform_request
return http_client.request(operation, url, data=data, headers=headers)
File "/usr/lib/pymodules/python2.6/atom/http.py", line 169, in request
_send_data_part(data_part, connection)
File "/usr/lib/pymodules/python2.6/atom/http.py", line 358, in _send_data_part
connection.send(binarydata)
File "/usr/lib/python2.6/httplib.py", line 743, in send
self.sock.sendall(str)
File "/usr/lib/python2.6/ssl.py", line 203, in sendall
v = self.send(data[count:])
File "/usr/lib/python2.6/ssl.py", line 94, in
self.send = lambda data, flags=0: SSLSocket.send(self, data, flags)
File "/usr/lib/python2.6/ssl.py", line 174, in send
v = self._sslobj.write(data)
socket.error: [Errno 32] Broken pipe

Scripts fails on Google Picasa Error

Traceback (most recent call last):
File "./gallery2picasa.py", line 107, in
main(sys.argv)
File "./gallery2picasa.py", line 101, in main
summary, filename, keywords=keywords)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 470, in InsertPhotoSimple
content_type)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 428, in InsertPhoto
raise GooglePhotosException(e.args[0])
gdata.photos.service.GooglePhotosException: (500, 'Internal Server Error', 'Error: 10 STORAGE_UNAVAIL')

Traceback (most recent call last):
File "./gallery2picasa.py", line 107, in
main(sys.argv)
File "./gallery2picasa.py", line 101, in main
summary, filename, keywords=keywords)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 470, in InsertPhotoSimple
content_type)
File "/usr/lib/pymodules/python2.6/gdata/photos/service.py", line 428, in InsertPhoto
raise GooglePhotosException(e.args[0])
gdata.photos.service.GooglePhotosException: (500, 'Internal Server Error', 'server is not responding')

filename_or_handle must be a path name or a file-like object

I'm getting the following error immediately after saying "a" to upload all albums

:~/gtop/sebastianw-gallery2picasa-ef4259c# ./gallery2picasa.py -d naudtson -b root -t ng_ -u XXXX -g /homez.312/naudtson/g2data/
DB Password:
Google Password:
Upload Album "Gallery - 2004 - Corsica"? [y/N/a]a

CREATING ALBUM [Corsica] []
CREATING Item [F:IMG00001.JPG] [T:IMG00001.JPG] [S:IMG00001.JPG] [K:]
Traceback (most recent call last):
File "./gallery2picasa.py", line 275, in
main(sys.argv)
File "./gallery2picasa.py", line 262, in main
raise e
gdata.photos.service.GooglePhotosException: (601, "Found <type 'unicode'>, not path name or object with a .read() method", 'filename_or_handle must be a path name or a file-like object')

Update broke script

[K:]
Traceback (most recent call last):
File "./gallery2picasa.py", line 153, in
main(sys.argv)
File "./gallery2picasa.py", line 134, in main
pws.InsertPhotoSimple(a.GetFeedLink().href, title,
NameError: global name 'a' is not defined

Migration to Oauth2 needed?

Hi,

I tried to utilize the script (which works great by the way) but encountered the following error while trying to authenticate:

Traceback (most recent call last):
File "./gallery2picasa.py", line 278, in
main(sys.argv)
File "./gallery2picasa.py", line 213, in main
galbum = create_google_album(pws, album, atitle, privacy)
File "./gallery2picasa.py", line 93, in create_google_album
raise e
gdata.photos.service.GooglePhotosException: (403, 'Forbidden', 'Modification only allowed with api authentication.')

Does that ring a bell?

gdata.photos.service.GooglePhotosException: (601, ...

Gallery version = 2.3 core 1.3.0

I've attempted the gallery2picasa script with gdata 2.0.17 and 2.0.14. Both end up with the same error...

gdata.photos.service.GooglePhotosException: (601, "Found , not path name or object with a .read() method", 'filename_or_handle must be a path name or a file-like object')


[~]# python2.6 public_html/cgi-bin/gallery2picasa-master/gallery2picasa.py -b XXXXXX -d XXXXXX -a XXXXXX -u XXXXXX -p XXXXXX
Upload Album ".com-gallery - 1975-1992"? [y/N/a]a
CREATING ALBUM [1975-1992] [Pix way back from 1975-1992]
CREATING Item [F:j_amp_g smithsonian trip.jpg] [T:j&g smithsonian trip] [S:Jeff Pinto and I posing next to me pop's plane at the Smithsonian.] [K:]
Traceback (most recent call last):
File "public_html/cgi-bin/gallery2picasa-master/gallery2picasa.py", line 275, in
main(sys.argv)
File "public_html/cgi-bin/gallery2picasa-master/gallery2picasa.py", line 262, in main
raise e
gdata.photos.service.GooglePhotosException: (601, u'Found /var/local/g2data/albums/1975-1992/j_amp_g smithsonian trip.jpg, not path name or object with a .read() method', 'filename_or_handle must be a path name or a file-like object')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.