mee/README.md

77 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2023-04-21 21:59:06 +03:00
mee
===
Minimalistic EXIF Editor.
MEE allows you to get, remove and change EXIF tags in images.
2023-04-22 04:42:41 +03:00
In addition to this, support for custom tags is implemented here. Custom tags are written in JSON format to the UserComment tag ([why](https://stackoverflow.com/questions/10833928/custom-exif-tags)). MEE can operate with them in the same way as with ordinary tags. Be aware of the 64 kilobytes limit for the UserComment tag.
2023-04-21 21:59:06 +03:00
Custom tags entered there can only be interpreted manually or with MEE.
2023-04-22 04:42:41 +03:00
EXIF libraries support:
2023-04-21 22:39:58 +03:00
2023-04-22 04:42:41 +03:00
- [x] exif (only JPEG)
- [ ] piexif (JPEG, WebP, TIFF)
- [ ] pillow (JPEG, WebP, TIFF, PNG)
- [ ] Wrap Perl exiftool?
2023-04-21 22:39:58 +03:00
2023-04-21 21:59:06 +03:00
Installation
============
No prebuilt package provided. Build it by yourself.
1. Install `poetry`
2. Clone repo and run `poetry build`
3. 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:
2023-04-22 04:42:41 +03:00
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>]
2023-04-21 21:59:06 +03:00
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.
2023-04-22 04:42:41 +03:00
-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.
2023-04-21 21:59:06 +03:00
--help print this message and exit.
--version print version and exit.
2023-04-22 04:42:41 +03:00
Environment:
DEBUG enable debug messages.
2023-04-21 21:59:06 +03:00
```
2023-04-22 04:42:41 +03:00
Use MEE as library
==================
Read sources and/or see `help(Mee)` for more info.
```python
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
```