Skip to content

Metadata extraction reverse proxy based on twisted and exiftool

License

Notifications You must be signed in to change notification settings

znerol/exifproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exifproxy

https://travis-ci.com/znerol/exifproxy.svg?branch=master

Metadata extraction reverse proxy based on twisted and exiftool.

Installation

python3 -m pip install exifproxy

Usage

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.

Tryout

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

License

The software is subject to the AGPLv3 or later license.

About

Metadata extraction reverse proxy based on twisted and exiftool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages