A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
POST_CONSUME_SCRIPT: add documents archive_path
ziprandomf20254217f7e
diff --git a/docs/advanced_usage.rst b/docs/advanced_usage.rstindex d32d633b9..ba5b3cbaa 100644--- a/docs/advanced_usage.rst+++ b/docs/advanced_usage.rst@@ -165,6 +165,7 @@ into paperless. It receives the following environment variables:* ``DOCUMENT_MODIFIED``* ``DOCUMENT_ADDED``* ``DOCUMENT_SOURCE_PATH``+* ``DOCUMENT_ARCHIVE_PATH``* ``DOCUMENT_THUMBNAIL_PATH``* ``DOCUMENT_DOWNLOAD_URL``* ``DOCUMENT_THUMBNAIL_URL``diff --git a/scripts/post-consumption-example.sh b/scripts/post-consumption-example.shindex 81bfa3d48..6e42b1bc3 100755--- a/scripts/post-consumption-example.sh+++ b/scripts/post-consumption-example.sh@@ -6,6 +6,7 @@ A document with an id of ${DOCUMENT_ID} was just consumed. I know thefollowing additional information about it:* Generated File Name: ${DOCUMENT_FILE_NAME}+* Archive Path: ${DOCUMENT_ARCHIVE_PATH}* Source Path: ${DOCUMENT_SOURCE_PATH}* Created: ${DOCUMENT_CREATED}* Added: ${DOCUMENT_ADDED}diff --git a/src/documents/consumer.py b/src/documents/consumer.pyindex 474f9df8a..5673d159a 100644--- a/src/documents/consumer.py+++ b/src/documents/consumer.py@@ -170,6 +170,7 @@ class Consumer(LoggingMixin):script_env["DOCUMENT_ADDED"] = str(document.added)script_env["DOCUMENT_FILE_NAME"] = document.get_public_filename()script_env["DOCUMENT_SOURCE_PATH"] = os.path.normpath(document.source_path)+ script_env["DOCUMENT_ARCHIVE_PATH"] = os.path.normpath(str(document.archive_path))script_env["DOCUMENT_THUMBNAIL_PATH"] = os.path.normpath(document.thumbnail_path)