Adds date and location to photos (and other files) based on EXIF, filename patterns and Google Photos' JSON
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nikita Karamov 31112d2e91
ci/woodpecker/push/woodpecker Pipeline was successful Details
Remove unused hooks
2 months ago
.github Update funding info 1 year ago
.editorconfig Initial commit 2 years ago
.gitignore Initial commit 2 years ago
.pre-commit-config.yaml Remove unused hooks 2 months ago
.woodpecker.yml Add CI 2 months ago
LICENSE Rename the license file 1 year ago Update 2 years ago Reformat file 2 months ago
requirements.txt Update EXIF to the latest version 1 year ago


A tool that adds date and location to the photos (and other files) based on EXIF, filenames and Google Photos JSON

Initially I created this script to retag the photos I exported from Google Photos, since they all had the todays date. This script now can be used for all sorts of photos.

This script finds the photo metadata (more specifically, date, time, and location of the shot) in EXIF tags, Google Photos JSON or file name (date and time only).

The Google Photos JSON can be acquired when you export your photos with Google Takeout.

This script was tested on Python 3.9, but should work all the way down to 3.6.


Clone the repo. Then, install the (only) requirement:

pip install -r requirements.txt

Then launch the script:

# to only parse EXIF and JSON
python3 -s "exif,json" ./input ./output

# to get date only from filename, while patterns "IMG_YYYYMMDD_HHMMSS*" and "YYYYMMDDHHMMSS*" are present
python3 -s "filename" -n "IMG_%Y%m%d_%H%M%S,%Y%m%d%H%M%S" ./input ./output

See python3 --help for more info.


Unlicense © Nikita Karamov