2.3 KiB
2.3 KiB
mee
Minimalistic EXIF Editor.
MEE allows you to get, remove and change EXIF tags in images.
In addition to this, support for custom tags is implemented here. Custom tags are written in JSON format to the UserComment tag (why). MEE can operate with them in the same way as with ordinary tags. Be aware of the 64 kilobytes limit for the UserComment tag.
Custom tags entered there can only be interpreted manually or with MEE.
EXIF libraries support:
- exif (only JPEG)
- piexif (JPEG, WebP, TIFF)
- pillow (JPEG, WebP, TIFF, PNG)
- Wrap Perl exiftool?
Installation
No prebuilt package provided. Build it by yourself.
- Install
poetry
- Clone repo and run
poetry build
- Run
pip install ./dist/*.tar.gz
Usage
Minimalistic EXIF Editor.
Commands overview:
ls, get, set, del operate with EXIF tags.
cget, cset, cdel operate with JSON in UserComment EXIF tag.
Usage:
mee ls [options] <file>
mee get [options] [-k <key>] <file>
mee set [options] -k <key> -v <value> <file> [-o <file>]
mee del [options] (--all | -k <key>) <file> [-o <file>]
mee cget [options] [-k <key>] <file>
mee cset [options] -k <key> -v <value> <file> [-o <file>]
mee cdel [options] -k <key> <file> [-o <file>]
mee (--help | --version)
Options:
-o, --output <file> output file. Same as input file by default.
-k, --key <key> set EXIF/JSON key.
-v, --value <value> EXIF/JSON key value.
-c, --custom make 'get -c' alias for 'cget', etc.
--json print JSON output if available.
--all perform action with all EXIF tags.
--debug enable debug messages.
--help print this message and exit.
--version print version and exit.
Environment:
DEBUG enable debug messages.
Use MEE as library
Read sources and/or see help(Mee)
for more info.
from mee import Mee
mee = Mee("image.jpg")
mee.tags # current custom tags as dict
mee.set("is_nudes", True) # add key with bool value, VARIANT 1
mee.tags["is_nudes"] = True # add key with bool value, VARIANT 2
mee.commit() # write new EXIF to file