With the new API, I think you can solve the following problems.
I used googlecl and picasawebsync for syncing my photos and videos to Picasa(Google photos).
But they are not working now.
- googlecl does not support OAuth2.
- picasawebsync fails to upload video (except photo) file.
- Should change upload protocol.
I write the code to upload my video to google photos.
- OAuth2 using google-auth-lirary-nodejs
- written with typescript
- Upload video files using resumable upload protocol
- written with bash, curl and xsltproc
- To get hidden resumable-post link I hack the working ios app.
- Support OAuth2
- Upload video using resumable upload protocol
- Upload photo
- List albums and photos
- Delete albums and photos
- Modify property of albums and photos
- Google does not allow to change timestamp.
- Ubuntu
$ sudo apt-get install nodejs
$ sudo apt-get install curl
$ sudo apt-get install xsltproc
# if you can not run node
$ sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
- macOS : curl, xsltproc already installed
$ brew install node
$ git clone 'git@github.com:thatseeyou/picasa-resumable-uploader.git'
$ cd picasa-resulable-uploader
$ npm Install
$ mkdir ~/.credentials
$ cp <downloaded client secret file> ~/.credentials/picasa-resumable-uploader_client_secret.json (refer next section)
# (optional) picasa can run anywhere
$ ln -s $(pwd)/picasa /usr/local/bin
- Go to https://console.developers.google.com/start/api?id=drive
- Click 'Continue'
- Click 'Go to credentials'
- Click 'What credentials do I need' after setting the following
- Where will you be calling the API from? > Other UI
- What data will you be accessing? > User data
- Click 'Create client ID' ('Name' is not important)
- Click 'Continue' after setting 'Product Name' like 'picasa uploader'
- Click 'Download' and remane downloaded file to client_secret.json
$ ./picasa
NOTICE: The order of options matters.
picasa [-v] list album [--tab | --xml | --raw-xml] [album name]
picasa [-v] create album <album name> [summary]
picasa [-v] delete album [album name]
picasa [-v] modify album <album name> <property key> <property value>
2016-10 title "New Title"
picasa [-v] list photo [--tab | --xml | --raw-xml] <album name> [photo name]
picasa [-v] delete photo <album name> [photo name]
picasa [-v] delete pending
picasa [-v] modify photo <album name> <photo name> <property key> <property value>
2016-10 '2016-10-02 111234.mp4' title "New Title"
2016-10 '2016-10-02 111234.mp4' summary "New summary"
picasa [-v] upload photo <album name> <file path>
Sync directory contents to album.
$ ./picasa-sync-upload
Usage: picasa-sync-upload <directory>
ex) picasa-sync-upload videos/2016/2016-10
This can be run anywhere like the following.
$ ln -s <installed directory>/picasa-sync-upload /usr/local/bin
$ picasa-sync-upload