Skip to content

imagemeta-cli is a lightweight Image Metadata Extractor with batch support. It scans entire folders (recursively or flat), globs, or single files, and extracts EXIF, XMP (inline & sidecar), basic IPTC, image dimensions, and optional hashes.

License

Notifications You must be signed in to change notification settings

willyanibe/imagemeta-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imagemeta-cli

Image Metadata Extractor with batch support. Extracts EXIF, XMP (inline & sidecar), basic IPTC, dimensions, and file hashes. Exports to JSON, JSON Lines, or CSV.

  • Folders, globs, and recursion
  • Fast parallel scanning (--jobs)
  • UTF-8 output; newline = \n
  • MIT licensed, no fluff

Install (local dev)

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[test]"
imagemeta --version

Usage

Scan a folder recursively, JSON out

imagemeta "C:\photos" -r --to json -o .\report.json

Specific extensions only

imagemeta "C:\photos" -r --ext .jpg --ext .png -o .\report.json

CSV for spreadsheets

imagemeta "C:\photos" -r --to csv -o .\report.csv

JSON Lines for big data pipes

imagemeta "C:\photos" -r --to jsonl -o .\report.ndjson

Hashes (MD5 + SHA-256)

imagemeta "C:\photos" -r --hash -o .\report.json

Only certain fields (faster output, smaller files)

imagemeta "C:\photos" -r --fields path name width height datetime_original exif -o .\lite.json

Globs

imagemeta ".\shots\*.jpg" --to csv

Run without installing (module mode)

From the repo root (after unzip), set PYTHONPATH so Python can see src/:

$env:PYTHONPATH = "src"
python -m imagemeta.cli ".\shots\*.jpg" -r --to json -o .\report.json

Output schema (top-level)

{
  "path": "<absolute or relative path>",
  "name": "<filename>",
  "ext": ".jpg",
  "size": 123456,
  "mime": "image/jpeg",
  "width": 4032,
  "height": 3024,
  "mode": "RGB",
  "hash_md5": "",
  "hash_sha256": "",
  "orientation": "1",
  "datetime_original": "2024-01-12T09:44:55",
  "exif": { "EXIF DateTimeOriginal": "2024:01:12 09:44:55", "Image Make": "" },
  "exif_pil": { "…": "" },
  "iptc": { "…": "" },
  "xmp_inline": "<x:xmpmeta…>…</x:xmpmeta>",
  "xmp_sidecar": "<?xpacket …>…</x:xmpmeta>"
}

Development

pip install -e ".[test]"
pytest -q

License

MIT © Wilson Anibe

About

imagemeta-cli is a lightweight Image Metadata Extractor with batch support. It scans entire folders (recursively or flat), globs, or single files, and extracts EXIF, XMP (inline & sidecar), basic IPTC, image dimensions, and optional hashes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages