All Projects → int128 → Gpup

int128 / Gpup

Licence: apache-2.0
A command to upload photos and movies to Google Photos Library using the official Google Photos Library API

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Gpup

Gkeepapi
An unofficial client for the Google Keep API.
Stars: ✭ 1,066 (+441.12%)
Mutual labels:  google-api
Google Api Nodejs Client
Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
Stars: ✭ 9,722 (+4835.03%)
Mutual labels:  google-api
Google Places Api
This is a PHP wrapper for Google Places API Web Service. And is Laravel Framework friendly.
Stars: ✭ 147 (-25.38%)
Mutual labels:  google-api
Expenses
💰Expense tracker using Google Sheets 📉 as a storage written in React
Stars: ✭ 1,105 (+460.91%)
Mutual labels:  google-api
React Google Login
A React Google Login Component
Stars: ✭ 1,317 (+568.53%)
Mutual labels:  google-api
Google Maps React
Companion code to the "How to Write a Google Maps React Component" Tutorial
Stars: ✭ 1,542 (+682.74%)
Mutual labels:  google-api
Geocoder
🌎 GoLang package that provides an easy way to use the Google Geocoding API
Stars: ✭ 23 (-88.32%)
Mutual labels:  google-api
Angular Google Gapi
An AngularJS module for using all Google Apis and your Google Cloud Endpoints (Google App Engine) with OAuth. This module uses Google APIs Client Library for JavaScript, available for all GApis.
Stars: ✭ 176 (-10.66%)
Mutual labels:  google-api
Php Google Contacts V3 Api
👥 PHP library for the Google Contacts API (v3)
Stars: ✭ 97 (-50.76%)
Mutual labels:  google-api
React Google Autocomplete
React component for google autocomplete.
Stars: ✭ 131 (-33.5%)
Mutual labels:  google-api
Gapi Ocaml
A simple OCaml client for Google Services.
Stars: ✭ 79 (-59.9%)
Mutual labels:  google-api
React Google Calendar Api
An api to manage your google calendar
Stars: ✭ 93 (-52.79%)
Mutual labels:  google-api
Taking Advantage Of Google Apps Script
Here, CLI tools, libraries, Add-ons, Reports, Benchmarks and Sample Scripts for taking advantage of Google Apps Script which are publishing in my blog, Gists and GitHub are summarized.
Stars: ✭ 123 (-37.56%)
Mutual labels:  google-api
Google Sheets To Html
JavaScript that draws a Google Sheets document into an HTML table (includes base web template)
Stars: ✭ 53 (-73.1%)
Mutual labels:  google-api
Carmarker Animation
This android library will help to show the marker move along the route and turn smoothly along the road curves.
Stars: ✭ 154 (-21.83%)
Mutual labels:  google-api
Cuba
🇨🇺 Google Sheets + SQL = JSON
Stars: ✭ 45 (-77.16%)
Mutual labels:  google-api
Cardview
Material Design Cards ? How cool is that !
Stars: ✭ 101 (-48.73%)
Mutual labels:  google-api
Psgsuite
Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
Stars: ✭ 184 (-6.6%)
Mutual labels:  google-api
Albert
这个是我个人网站的项目,欢迎贡献代码,力求能够应用到实际工作中java相关的大多数技术栈。有兴趣请Star一下,非常感谢。qq交流群:587577705 这个项目将不断地更新!生产环境:
Stars: ✭ 168 (-14.72%)
Mutual labels:  google-api
Ng Gapi
ng-gapi a Google api module for Angular 6+
Stars: ✭ 126 (-36.04%)
Mutual labels:  google-api

gpup CircleCI

A command to upload photos and movies to your Google Photos Library.

Getting Started

Setup

You can install this from brew tap or releases.

brew tap int128/gpup
brew install gpup

Setup your API access by the following steps:

  1. Open https://console.cloud.google.com/apis/library/photoslibrary.googleapis.com/
  2. Enable Photos Library API.
  3. Open https://console.cloud.google.com/apis/credentials
  4. Create an OAuth client ID where the application type is other.
  5. Run gpup and follow the instruction as follows.
% gpup
2018/09/13 15:38:13 Skip reading ~/.gpupconfig: Could not open ~/.gpupconfig: open /user/.gpupconfig: no such file or directory
2018/09/13 15:38:13 Setup your API access by the following steps:

1. Open https://console.cloud.google.com/apis/library/photoslibrary.googleapis.com/
1. Enable Photos Library API.
1. Open https://console.cloud.google.com/apis/credentials
1. Create an OAuth client ID where the application type is other.

Enter your OAuth client ID (e.g. xxx.apps.googleusercontent.com): YOUR_CLIENT_ID.apps.googleusercontent.com
Enter your OAuth client secret: YOUR_CLIENT_SECRET
2018/09/13 15:38:22 Saved credentials to ~/.gpupconfig
2018/09/13 15:38:22 Error: Nothing to upload

Upload files to the library

To upload files in a folder to your Google Photos library:

$ gpup my-photos/
2018/06/14 10:28:40 The following 2 files will be uploaded:
  1: my-photos/travel.jpg
  2: my-photos/lunch.jpg
2018/06/14 10:28:40 Open http://localhost:8000 for authorization
2018/06/14 10:28:43 GET /
2018/06/14 10:28:49 GET /?state=...&code=...
2018/06/14 10:28:49 Saved token to ~/.gpupconfig
2018/06/14 10:28:49 Queued 2 file(s)
2018/06/14 10:28:49 Uploading travel.jpg
2018/06/14 10:28:49 Uploading lunch.jpg
2018/06/14 10:28:52 Adding 2 file(s) to the library

It opens the browser and you can log in to the provider. And then it uploads files concurrently.

You can specify URLs as well.

gpup https://www.example.com/image.jpg

Upload files to an album

You can upload files to the album by -a option. If the album does not exist, it will be created.

gpup -a "My Album" my-photos/

You can upload files to a new album by -n option.

gpup -n "My Album" my-photos/

Usage

Usage:
  gpup [OPTIONS] <FILE | DIRECTORY | URL>...

Application Options:
  -a, --album=TITLE                 Add files to the album or a new album if it does not exist
  -n, --new-album=TITLE             Add files to a new album
      --request-header=KEY:VALUE    Add the header on fetching URLs
      --request-auth=USER:PASS      Add the basic auth header on fetching URLs
      --gpupconfig=                 Path to the config file (default: ~/.gpupconfig) [$GPUPCONFIG]
      --debug                       Enable request and response logging [$DEBUG]

Options read from gpupconfig:
      --google-client-id=           Google API client ID [$GOOGLE_CLIENT_ID]
      --google-client-secret=       Google API client secret [$GOOGLE_CLIENT_SECRET]
      --google-token=               Google API token [$GOOGLE_TOKEN]

Help Options:
  -h, --help                        Show this help message

Known issues

See the Google Issue Tracker for the known issues.

Timestamp

If you upload an photo or movie without timestamp in the header, timestamp of the image will be current time. Google Photos Library API does not provide setting timestamp for now.

Photo storage and quality

By using gpup, files are uploaded in original quality, which consumes user's storage. It's the limitation of Photos Library API, as stated in the offical document.

All media items uploaded to Google Photos using the API are stored in full resolution at original quality. They count toward the user’s storage.

A workaround for this is to use recover storage feature of Google Photos, which lets you free up the storage space by converting all the files uploaded in original quality to high quality.

Contribution

Feel free to open issues or pull requests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].