From d57dfb10556d45c157968dbb94e8b3034b4a64d3 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Fri, 4 Oct 2024 21:38:32 -0700 Subject: [PATCH] enhance --- etc/report_generator.py | 7 +++++-- etc/report_generator5.py | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/etc/report_generator.py b/etc/report_generator.py index e2d96c4..a2d50c6 100644 --- a/etc/report_generator.py +++ b/etc/report_generator.py @@ -114,9 +114,12 @@ def parse_log_file(file_path): for word in shameWordList: if word in line.lower(): if line not in log_data['shameList']: - log_data['shameList'].append(line) + line = line.replace('Ignoring Message:', '') + line = line.replace('|', '') + line = line.replace('INFO', '') + line = line.replace('DEBUG', '') + log_data['shameList'].append(0, line) - # get the user who sent the message user_match = re.search(r'From: (\w+)', line) if user_match: diff --git a/etc/report_generator5.py b/etc/report_generator5.py index b6c833b..53a1d00 100644 --- a/etc/report_generator5.py +++ b/etc/report_generator5.py @@ -124,7 +124,11 @@ def parse_log_file(file_path): for word in shameWordList: if word in line.lower(): if line not in log_data['shameList']: - log_data['shameList'].append(line) + line = line.replace('Ignoring Message:', '') + line = line.replace('|', '') + line = line.replace('INFO', '') + line = line.replace('DEBUG', '') + log_data['shameList'].append(0, line) # get the user who sent the message user_match = re.search(r'From: (\w+)', line)