Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/znerol/txexiftool
Exiftool protocol and stream endpoint plugin to be used with twisted
https://github.com/znerol/txexiftool
Last synced: 25 days ago
JSON representation
Exiftool protocol and stream endpoint plugin to be used with twisted
- Host: GitHub
- URL: https://github.com/znerol/txexiftool
- Owner: znerol
- License: mit
- Created: 2015-02-12T16:46:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-17T21:25:17.000Z (almost 9 years ago)
- Last Synced: 2024-10-13T22:47:27.841Z (25 days ago)
- Language: Python
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
txExiftool
==========.. image:: https://travis-ci.org/znerol/txexiftool.svg?branch=master
:target: https://travis-ci.org/znerol/txexiftoolExiftool_ protocol and stream endpoint plugin to be used with twisted_.
.. _Exiftool: http://www.sno.phy.queensu.ca/~phil/exiftool/
.. _twisted: https://twistedmatrix.com/Usage
-----::
from twisted.internet import defer, endpoints, protocol, reactor
from txexiftool import ExiftoolProtocol@defer.inlineCallbacks
def test():
# Construct an exiftool endpoint. If the tool is installed in a custom
# location, specify the path to the binary as the first argument. E.g.
# 'exiftool:/path/to/exiftool'
ep = endpoints.clientFromString(reactor, 'exiftool')# Instantiate the protocol by connecting to the endpoint
f = protocol.Factory.forProtocol(ExiftoolProtocol)
p = yield ep.connect(f)# Run commands and retrieve results.
metadata = yield p.execute('-j', '/usr/share/pixmaps/gtkvim.png')
print metadata# Disconnect
yield p.loseConnection()reactor.stop()
reactor.callWhenRunning(test)
reactor.run()License
-------The software is subject to the MIT license.