File metadata: Add file metadata app

Add the file metadata app. This app uses binary wrappers called drivers
to extract properties from the file of documents. The default driver
uses the exiftool to extract the EXIF record from JPEG images.
The exiftool can also extra some properties from other files like
PDFs, office files and sound file.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-14 02:16:38 -04:00
parent 1efec6bd41
commit 0a7908baca
33 changed files with 1309 additions and 22 deletions

View File

@@ -0,0 +1,21 @@
from __future__ import unicode_literals
from mayan.apps.common.tests import BaseTestCase
from mayan.apps.documents.tests import (
TEST_PDF_DOCUMENT_FILENAME, DocumentTestMixin
)
from .literals import (
TEST_PDF_FILE_METADATA_DOTTED_NAME, TEST_PDF_FILE_METADATA_VALUE
)
class EXIFToolDriverTestCase(DocumentTestMixin, BaseTestCase):
test_document_filename = TEST_PDF_DOCUMENT_FILENAME
def test_driver_entries(self):
self.document.submit_for_file_metadata_processing()
value = self.document.get_file_metadata(
dotted_name=TEST_PDF_FILE_METADATA_DOTTED_NAME
)
self.assertEqual(value, TEST_PDF_FILE_METADATA_VALUE)