A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Simpler regex
Daniel Quinn2421f559be12
diff --git a/src/documents/consumer.py b/src/documents/consumer.pyindex 643ac4f66..777047b03 100644--- a/src/documents/consumer.py+++ b/src/documents/consumer.py@@ -47,11 +47,11 @@ class Consumer(Renderable):DEFAULT_OCR_LANGUAGE = settings.OCR_LANGUAGEREGEX_TITLE = re.compile(- r"^.*/([^/]*)\.(pdf|jpe?g|png|gif|tiff)$",+ r"^.*/(.*)\.(pdf|jpe?g|png|gif|tiff)$",flags=re.IGNORECASE)REGEX_SENDER_TITLE = re.compile(- r"^.*/(.+) - ([^/]+)\.(pdf|jpe?g|png|gif|tiff)$",+ r"^.*/(.+) - (.*)\.(pdf|jpe?g|png|gif|tiff)$",flags=re.IGNORECASE)REGEX_SENDER_TITLE_TAGS = re.compile(@@ -233,6 +233,7 @@ class Consumer(Renderable):def _store(self, text, doc):sender, title, tags, file_type = self._guess_attributes_from_name(doc)+ tags = list(tags)lower_text = text.lower()relevant_tags = set(