Skip to content

Google Photos CLI - to upload/download/analyze media items in your library.

License

Notifications You must be signed in to change notification settings

f2calv/CasCap.GooglePhotosCli

Repository files navigation

Google Photos CLI (a work in progress)

Unofficial Google Photos Command Line Interface

CI Coverage Status SonarCloud Coverage Nuget

This is an unofficial Google Photos CLI which can be installed as a .NET Global Tool.

Google Photos CLI is an unofficial utility which leverages the CasCap.Apis.GooglePhotos library to perform common and helpful operations against the media items held in your Google Photos account.

If you find this tool of use then please give it a thumbs-up by giving this repository a ⭐ ... 😉

Key functionality;

  • Media item upload
  • Media item download/backup
  • Media item duplicate detection

Installation/Set-up

The Google Photos CLI is distributed as a .NET Core Global Tool, to install the tool follow these steps;

Now check the tool is installed by entering googlephotos at a shell.

Usage

Use the context-sensitive help command to discover additional functionality/arguments;

  • googlephotos --help

The tool will download and cache album and media item metadata locally for speed during duplicate detection. This local cache data is stored in your user profile. If you use the logout command this local cache will be deleted;

  • googlephotos logout

Albums

Show context-senstive help for the albums sub-command;

  • googlephotos albums --help

List all albums;

  • googlephotos albums list

Show albums with duplicate names;

  • googlephotos albums list --duplicates

Add/create a new empty album with a title of 'my album title';

  • googlephotos albums add -t "my album title"

Download media items from specified album title into a folder;

  • googlephotos albums download -t "my album title" -o c:/temp/download

Download media items from specified album title into a folder, thumbnails, cropped, with EXIF information (except location);

  • googlephotos albums download -t "my album title" -o c:/temp/download --maxwidth 100
  • googlephotos albums download -t "my album title" -o c:/temp/download --maxheight 100
  • googlephotos albums download -t "my album title" -o c:/temp/download --maxheight 100 --crop
  • googlephotos albums download -t "my album title" -o c:/temp/download --maxheight 100 --crop --exif
  • googlephotos albums download -t "my album title" -o c:/temp/download --maxheight 100 --crop --exif --overwrite

Re-sync local album data with the latest data from the API;

  • googlephotos albums sync

MediaItems

Show context-senstive help for the media items sub-command;

  • googlephotos mediaitems --help

List all media items (this could be a very long list!);

  • googlephotos mediaitems list

Anaylse all meta data and search for possible duplicates;

  • googlephotos mediaitems duplicates

Upload media items into your google photos account, with optional pattern;

  • googlephotos mediaitems upload -s C:/temp/fotos
  • googlephotos mediaitems upload -s C:/temp/fotos --pattern *.jpg

Feedback/Issues

This CLI is a work in progress, I have started lots of features or left stubs in the code which I hope to eventually complete... Please post any issues or feedback here.

License

GooglePhotosCli is Copyright © 2020 @f2calv under the MIT license.

About

Google Photos CLI - to upload/download/analyze media items in your library.

Topics

Resources

License

Stars

Watchers

Forks

Packages