Skip to content

Instantly share code, notes, and snippets.

@cgranier
cgranier / README.md
Created October 12, 2013 15:00 — forked from nikcub/README.md
@cgranier
cgranier / exifdate-from-filename.sh
Created March 6, 2026 23:51 — forked from gregmuellegger/exifdate-from-filename.sh
Scripts to work convert PDFs to JPG and setting Exif Date and Description based on OCR text
#!/bin/bash
# Sets EXIF date on an image based on YYYY-MM-DD pattern in filename or manual date.
set -euo pipefail
show_help() {
cat <<EOF
Usage: $(basename "$0") [OPTIONS] <image>
Sets EXIF date on an image file. Extracts date from YYYY-MM-DD pattern in
filename, or uses manually specified date. Skips if EXIF date already exists.