This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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.

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
Release History

Release History

1.0.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mayan_exif-1.0.0-py2-none-any.whl (14.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Dec 23, 2015
mayan-exif-1.0.0.tar.gz (7.0 kB) Copy SHA256 Checksum SHA256 Source Dec 23, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting