mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-16 21:55:37 -05:00
change order of elements in parsed Texts
This commit is contained in:
@@ -112,8 +112,7 @@ class MailDocumentParser(DocumentParser):
|
||||
|
||||
mail = self.get_parsed(document_path)
|
||||
|
||||
self.text = f"{strip_text(mail.text)}\n\n"
|
||||
self.text += f"Subject: {mail.subject}\n\n"
|
||||
self.text = f"Subject: {mail.subject}\n\n"
|
||||
self.text += f"From: {mail.from_values.full}\n\n"
|
||||
self.text += f"To: {', '.join(address.full for address in mail.to_values)}\n\n"
|
||||
if len(mail.cc_values) >= 1:
|
||||
@@ -134,6 +133,8 @@ class MailDocumentParser(DocumentParser):
|
||||
if mail.html != "":
|
||||
self.text += "HTML content: " + strip_text(self.tika_parse(mail.html))
|
||||
|
||||
self.text += f"\n\n{strip_text(mail.text)}"
|
||||
|
||||
self.date = mail.date
|
||||
self.archive_path = self.generate_pdf(document_path)
|
||||
|
||||
|
Reference in New Issue
Block a user