Giter Site home page Giter Site logo

kinhvan017 / gphotos-upload Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eshmu/gphotos-upload

0.0 0.0 0.0 17 KB

Simple but flexible script to upload photos to Google Photos and add to a particular album. Useful if you have photos in a directory structure that you want to reflect as Google Photos albums.

Python 100.00%

gphotos-upload's Introduction

gphotos-upload

Simple but flexible script to upload photos to Google Photos. Useful if you have photos in a directory structure that you want to reflect as Google Photos albums.

Usage

usage: upload.py [-h] [--auth  auth_file] [--album album_name]
                 [--log log_file]
                 [photo [photo ...]]

Upload photos to Google Photos.

positional arguments:
  photo               filename of a photo to upload

optional arguments:
  -h, --help          show this help message and exit
  --auth  auth_file   file for reading/storing user authentication tokens
  --album album_name  name of photo album to create (if it doesn't exist). Any
                      uploaded photos will be added to this album.
  --log log_file      name of output file for log messages

Setup

Obtaining a Google Photos API key

  1. Obtain a Google Photos API key (Client ID and Client Secret) by following the instructions on Getting started with Google Photos REST APIs

NOTE When selecting your application type in Step 4 of "Request an OAuth 2.0 client ID", please select "Other". There's also no need to carry out step 5 in that section.

  1. Replace YOUR_CLIENT_ID in the client_id.json file with the provided Client ID.
  2. Replace YOUR_CLIENT_SECRET in the client_id.json file wiht the provided Client Secret.

Installing dependencies and running the script

  1. Make sure you have Python 3.7 installed on your system
  2. If needed, install pipenv via pip install pipenv
  3. Change to the directory where you installed this script
  4. Run pipenv install to download and install all the dependencies
  5. Run pipenv shell to open a shell with all the dependencies available (you'll need to do this every time you want to run the script)
  6. Now run the script via python upload.py as desired. Use python upload.py -h to get help.

gphotos-upload's People

Contributors

eshmu avatar

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.