Metadata extraction reverse proxy based on twisted and exiftool.
python3 -m pip install exifproxy
twist exifproxy --help Usage: twist [options] plugin [plugin_options] exifproxy [options] Options: --backend= Url to backend, no trailing slash [default: http://localhost] --help Display this help and exit. --listen= Listen port (strports syntax) [default: tcp:8080] --version Display Twisted version and exit.
Requests to one of the proxy endpoints will be forwarded to the backend. When a successful result is returned from the backend, content is extracted from the body and sent to the client. The following proxy endpoints are available:
/json | All metadata is extracted from the backend response using
exiftool -j -g -a -struct and returned to the client with
Content-Type header set to application/json . |
/xmp | The xmp packet is extracted from the response and returned to the client
with Content-Type header set to application/rdf+xml . |
/preview | The first preview image is extracted from the backend response and returned to the client as a JPEG image. |
- /pageimage/{N}
- The Nth page image is extracted from the backend response and returned to the
client as a JPEG image. Index starts from
0
.
Run twist exifproxy --backend=https://raw.githubusercontent.com/exiftool/exiftool/master/t/images
Then use curl
to access any of the exiftool example images through one of the proxy endpoints:
curl http://localhost/xmp/Photoshop.psd curl http://localhost/json/GIMP.xcf
The software is subject to the AGPLv3 or later license.