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

@@ -2,20 +2,43 @@ from __future__ import absolute_import, unicode_literals
from .. import * # NOQA
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_EAGER_PROPAGATES = True
COMMON_PRODUCTION_ERROR_LOG_PATH = '/tmp/mayan-errors.log'
DOCUMENT_PARSING_AUTO_PARSING = False
FILE_METADATA_AUTO_PROCESS = False
INSTALLED_APPS += ('test_without_migrations',)
INSTALLED_APPS = [
cls for cls in INSTALLED_APPS if cls != 'whitenoise.runserver_nostatic'
]
COMMON_PRODUCTION_ERROR_LOG_PATH = '/tmp/mayan-errors.log'
# Remove whitenoise from middlewares. Causes out of memory errors during test
# suit
MIDDLEWARE = [
cls for cls in MIDDLEWARE if cls != 'whitenoise.middleware.WhiteNoiseMiddleware'
]
# Remove middlewares not used for tests
MIDDLEWARE = [
cls for cls in MIDDLEWARE if cls not in [
'common.middleware.error_logging.ErrorLoggingMiddleware',
'django.middleware.security.SecurityMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
'common.middleware.timezone.TimezoneMiddleware',
'common.middleware.ajax_redirect.AjaxRedirect',
]
]
OCR_AUTO_OCR = False
# User a simpler password hasher
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
@@ -32,20 +55,3 @@ TEMPLATES[0]['OPTIONS']['loaders'] = (
)
),
)
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_EAGER_PROPAGATES = True
# Remove middlewares not used for tests
MIDDLEWARE = [
cls for cls in MIDDLEWARE if cls not in [
'common.middleware.error_logging.ErrorLoggingMiddleware',
'django.middleware.security.SecurityMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
'common.middleware.timezone.TimezoneMiddleware',
'common.middleware.ajax_redirect.AjaxRedirect',
]
]