Description
Mayan EDMS app that extracts image documents’ EXIF data.
License
This project is open sourced under the MIT License.
Installation
Activate the virtualenv where you installed Mayan EDMS.
Install from PyPI:
pip install mayan-exif
In your settings/local.py file add exif to your INSTALLED_APPS list:
INSTALLED_APPS += (
'exif',
)
Run the migrations for the app:
mayan-edms.py migrate
Settings
EXIF_BACKEND: Specifies the backend used to extract the EXIF data, default: exif.backends.exiftool.EXIFTool.
Requirements
Usage
EXIF data is extracted automatically upon initial document upload or version uploads. The EXIF data is available via the .exif_value_of. accessor of the document version model. Example:
{{ document.exif_value_of.FileType }}
or:
{{ document.latest_version.exif_value_of.FileType }}
returns the ‘PNG’ string for PNG image files. This accessor can be used anywhere template expressions are used: indexing, smart links, etc.
Development
Clone repository in a directory outside of Mayan EDMS:
git clone https://gitlab.com/mayan-edms/exif.git
Symlink the app into your Mayan EDMS’ app folder:
ln -s <repository directory>/exif/ <Mayan EDMS directory>/mayan/apps
In your settings/local.py file add exif to your INSTALLED_APPS list:
INSTALLED_APPS += (
'exif',
)
Run the migrations for the app:
./manage.py migrate
EXIF Backends are just a class with a single method called execute which receives a document version instance and returns a dictionary of EXIF tags with their corresponding values. The default backend calls exiftool using the JSON parameter and then turn that JSON result into a Python dictionary:
class EXIFTool(object):
def execute(self, document_version):
new_file_object, temp_filename = tempfile.mkstemp()
try:
document_version.save_to_file(filepath=temp_filename)
result = exiftool(temp_filename)
return json.loads(result.stdout)[0]
finally:
fs_cleanup(filename=temp_filename)
1.0.0 (2015-12-22)
Initial release
Metadata
Release files for mayan-exif 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mayan-exif-1.0.0.tar.gz | 7.0 kB | Without provenance | Details for mayan-exif-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mayan_exif-1.0.0-py2-none-any.whl | Python 2 | none | any | Details for mayan_exif-1.0.0-py2-none-any.whl |
Total release size: 21.1 kB
Release files / mayan-exif-1.0.0.tar.gz
| Download URL | mayan-exif-1.0.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6ce47182325cb480dcf7cb4048394c854c958e51dbeb5f3b6a6641cb55f3210
|
|
BLAKE2b-256 checksum How to use checksums |
10a10452cc8ceff00ce6bfd723287814395ddcaa26ef086376009a05d3e92c0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / mayan_exif-1.0.0-py2-none-any.whl
| Download URL | mayan_exif-1.0.0-py2-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
d296aaca577bcb855230376df10ab844862eb3473b71b05f53a4d59a11d8d732
|
|
BLAKE2b-256 checksum How to use checksums |
9a9abbd9a15843fac9222e357a2b9fc8abc50ddc57e1b1c8ba8cd4a5c8d2564e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mayan-exif 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.