Command line utils for some Google API's.
usage: photo_upload.py [-h] [--secrets SECRETS] [--album_id ALBUM_ID]
[--first-in-album]
[photo [photo ...]]
Upload photos using Google Photos API.
positional arguments:
photo file names of photos to upload
optional arguments:
-h, --help show this help message and exit
--secrets SECRETS Google API OAuth client secrets file path.
--album_id ALBUM_ID Google Photos Album Id. If specified photos are added to this album.
--first-in-album Add each photo at index 0 in album.
usage: photo_util.py [-h] [--secrets SECRETS_FILE] [--create-album ALBUM_NAME]
[--list-albums]
Create album, list albums using Google Photos API.
optional arguments:
-h, --help show this help message and exit
--secrets SECRETS_FILE
Google API OAuth client secrets file path
--create-album ALBUM_NAME, -c ALBUM_NAME
title of album to create
--list-albums, -l Retrieves and prints list of albums visible for
credentials.
usage: doc_util.py [-h] [--secrets SECRETS_FILE] [--mode {append,insert,dump}]
[--infile [INFILE]] [--max-lines MAX_LINES]
document_id
Append lines to Google Doc.
positional arguments:
document_id Google Doc Id
optional arguments:
-h, --help show this help message and exit
--secrets SECRETS_FILE
Google API OAuth client secrets file path
--mode {append,insert,dump}
'append' - lines at the end of doc. 'insert' - lines
at the beginning of file. 'dump' - do nothing just
retrieve google doc content and print it to doc.json
file.
--infile [INFILE]
--max-lines MAX_LINES
if doc has more values
subscriptions_filter.py
.
Requirements: Python 3.7 or later.
- Install this application with pip:
pip3 install --src ~/soft -e git+https://github.com/TomasPP/google-api-utils#egg=google_api_utils
- Create a project through the Google Cloud Console.
- Enable your project to use the YouTube Data API via the APIs & Services Dashboard.
- Create an OAuth Client ID for a native application through the Credentials page under APIs & Services.
- Download the OAuth client secrets JSON file from the
Credentials page and
rename it to
client_secrets.json
.