A command line interface app for Google photos for doing bulk tasks such as mass filtered downloads and mass uploads.
With Go already installed and setup, just call:
go get -u github.com/trinhdrew1418/gphotos-cli
Before usage, you first need to grant the application account authorization:
gphotos-cli init
This initializes the authorization token needed to access your account
gphotos-cli init
-c
or --credential-path
Designate the path of the credenntial file you'd alternatively like to use.Command to upload files to your google photos library.
gphotos-cli push [-OPTIONS] [FILE 1] [FOLDER 1] ...
-r
or --recursive
Recursively traverses folders in arguments for file uploads
-s
or --select
Pulls up a menu to select available albums from to upload to. NOTE: you can ONLY upload to
albums that you've created through this app. This is a limitation of the google photos api.
-v
or --verbose
This lists out all of the files you'll be uploading. Useful if you want to know which files have
valid extensions.
-a
or --album
Input the name of the album you want to upload to
Command to download files
gphotos-cli pull [-OPTIONS]
Follow the prompts to select your filters. It will download your files into folders separated by year and month. Each file will be named with its day of creation and time.
You can filter up to 10 of the following categories:
-d [PATH]
define the directory path you want to download your files to.
-s
or --select
pull up a selection menu of albums to download instead. The files will be downloading
into a folder of the name of the album. The files will not be organized further beyond
this. As a limitation of the API, filtering in conjunction with an album request is
not possible.
-a
or --album
Input the name of the album you want to download from.
Create albums by calling
gphotos-cli albums create [TITLE OF ALBUM]
More subcommands coming later.
Some of these packages were a huge help; either directly, as reference code, or as inspiration.