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 9bc1b02e7a
Update EXIF to the latest version
1 month ago
.github Update funding info 1 month ago
.editorconfig Initial commit 10 months ago
.gitignore Initial commit 10 months ago
LICENSE Rename the license file 1 month ago
README.md Update README.md 10 months ago
metadater.py Move argparse to __main__ 1 month ago
requirements.txt Update EXIF to the latest version 1 month ago

README.md

metadater

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 today’s 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.

Usage

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

pip install -r requirements.txt

Then launch the script:

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

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

See python3 metadater.py --help for more info.

License

Unlicense © Nikita Karamov