This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 265c712c94a6cd411a90b7a1f72d5def44ac8565 Author: Daniel Gruno <[email protected]> AuthorDate: Sun Oct 17 22:39:00 2021 +0200 make constant --- tools/archiver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/archiver.py b/tools/archiver.py index dc12e39..f14d7f6 100755 --- a/tools/archiver.py +++ b/tools/archiver.py @@ -70,6 +70,9 @@ else: # This is what we will default to if we are presented with emails without character sets and US-ASCII doesn't work. DEFAULT_CHARACTER_SET = 'utf-8' +# Standard "short body" max length for email aggregations +SHORT_BODY_MAX_LEN = 200 + # Fetch config from same dir as archiver.py config = ponymailconfig.PonymailConfig() @@ -585,7 +588,7 @@ class Archiver(object): # N.B. Also used by import-mbox.py notes.append(["ARCHIVE: Email archived as %s at %u" % (document_id, time.time())]) body_unflowed = body.unflow() if body else "" - body_shortened = body_unflowed[:210] # 210 so that we can tell if > 200. + body_shortened = body_unflowed[:SHORT_BODY_MAX_LEN+10] # +10 so that we can tell if larger than std short body. output_json = { "from_raw": msg_metadata["from"],
