WARNING: I don't maintain this project anymore so I don't recommend you use it.
You can use instead https://github.com/gilesknap/gphotos-sync which is a fork from this project with considerable changes to address a lot of its shortcomings.
Google Photos Sync is a simple script that will synchronize on a local filesystem all the photos stored in your Google Photos account.
All the photo filenames are automatically renamed according to the date and camera model
and are stored in a YEAR/MONTH/
folder hierarchy.
Just run python setup.py
from the source directory to install it in your system.
In order to work, gphotos-sync
first needs a valid client id linked to a project
authorized to use the Google Drive API. It is not provided in the distribution.
To do so:
- Create a project on Google Developer Console, following the Creating a project procedure,
- Authorize it to use the Google Drive API, following the Activating and desactivating APIs procedure,
- Create a Client ID by following the setting up oauth 2.0 procedure with application type set to Other,
- Once the client ID is created, download it as
client_secret.json
and save it under the application configuration directory:~/Library/Application Support/gphotos-sync/
under Mac OS X,~/.config/gphotos-sync/
under Linux.
Once the script is configured, you are now ready to use it using the simple following command line:
gphotos-sync TARGET_DIRECTORY
The first time, it will ask you to go to an url and copy back the authorization code in order to authorize the client to access your Google Photos through Google Drive.
It will then begin to download all photos locally.