Check if your local photos are properly sync'd with your Google Photos
Google Photos Sync Check is a utility to check that the albums you have in Google Photos (GP) are in sync with the albums you have locally on disk.
This utility is part of my personal workflow for how I use GP. GP is my primary storage for all of my photos/videos whereas my home server is my backup storage.
Absolutely all of my photos/videos go into albums. Periodically I download all new albums I’ve uploaded to GP from my phone and other devices using Google Takeout. I use this utility to make sure I haven’t missed anything and that it’s all in sync. 🔁
In order to use this utility, follow the instructions in Enable the Google Photos Library API.
Follow the instructions to Request an OAuth 2.0 client ID for the Google Photos API.
As part of that process you’ll download a client_secret_xxxxx.json
file. Name it client_secret.json
and save it to this dir.
If you get a oauth2client.client.HttpAccessTokenRefreshError: invalid_grant: Bad Request
error when executing the script, delete the client_token.json
file and execute the script again.
pipenv install --dev --ignore-pipfile
pipenv shell
python google-photos-sync-check.py --verbose refresh_db
python google-photos-sync-check.py --verbose sync_check ~/Pictures
pipenv shell
python -m pytest --cov=.
Development:
Python:
Python lang features:
Database:
Testing:
Library:
Websites:
Related work:
Post Google Takeout cleanup.
pipenv shell
python scripts/google-takeout-cleanup.py --dry-run ~/Pictures