A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Handle tags for gmail email accounts
Stefanedabf208bc15
diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.pyindex e1357d958..e7991e25b 100644--- a/src/paperless_mail/mail.py+++ b/src/paperless_mail/mail.py@@ -1,4 +1,5 @@import os+import reimport tempfilefrom datetime import datefrom datetime import timedelta@@ -70,7 +71,11 @@ class TagMailAction(BaseMailAction):return {"no_keyword": self.keyword}def post_consume(self, M: MailBox, message_uids, parameter):- M.flag(message_uids, [self.keyword], True)+ if re.search(r"gmail\.com$|googlemail\.com$", M._host):+ for uid in message_uids:+ M.client.uid("STORE", uid, 'X-GM-LABELS', self.keyword)+ else:+ M.flag(message_uids, [self.keyword], True)def get_rule_action(rule):