A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
small changes
Jonas Winkler391020a2b064
diff --git a/src/documents/consumer.py b/src/documents/consumer.pyindex 973fff925..8edbb00a3 100755--- a/src/documents/consumer.py+++ b/src/documents/consumer.py@@ -223,9 +223,9 @@ class Consumer(LoggingMixin):self.log("debug", "Deleting file {}".format(self.path))os.unlink(self.path)except Exception as e:- raise ConsumerError(e)- self._send_progress(file, 100, 100, 'FAILED',+ self._send_progress(self.filename, 100, 100, 'FAILED',"Failed: {}".format(e))+ raise ConsumerError(e)finally:document_parser.cleanup()@@ -234,7 +234,7 @@ class Consumer(LoggingMixin):"Document {} consumption finished".format(document))- self._send_progress(file, 100, 100, 'SUCCESS',+ self._send_progress(self.filename, 100, 100, 'SUCCESS','Finished.', document.id)return documentdiff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex cb115739b..37b046b2a 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -143,6 +143,15 @@ TEMPLATES = [},]+CHANNEL_LAYERS = {+ "default": {+ "BACKEND": "channels_redis.core.RedisChannelLayer",+ "CONFIG": {+ "hosts": ["redis://localhost:6379"],+ },+ },+}+################################################################################ Security ################################################################################@@ -376,12 +385,3 @@ for t in json.loads(os.getenv("PAPERLESS_FILENAME_PARSE_TRANSFORMS", "[]")):# TODO: this should not have a prefix.# Specify the filename format for out filesPAPERLESS_FILENAME_FORMAT = os.getenv("PAPERLESS_FILENAME_FORMAT")--CHANNEL_LAYERS = {- "default": {- "BACKEND": "channels_redis.core.RedisChannelLayer",- "CONFIG": {- "hosts": [("broker", 6379)],- },- },-}diff --git a/src/paperless_tesseract/parsers.py b/src/paperless_tesseract/parsers.pyindex c3715c83a..11a6c8b37 100644--- a/src/paperless_tesseract/parsers.py+++ b/src/paperless_tesseract/parsers.py@@ -90,7 +90,7 @@ class RasterisedDocumentParser(DocumentParser):self._text = get_text_from_pdf(self.document_path)return self._text- self.progress_callback(0,1,"Making greyscale images.")+ self.progress_callback(0, 1, "Making greyscale images.")images = self._get_greyscale()if not images: