bricks
bricks copied to clipboard
[MODULE] - Email cleaner
Please describe the module you would like to add to bricks A brick that scans through the email and get rid of unnecessary information, e.g. Disclaimer, signiture, logos etc.
Do you already have an implementation? most of it can be used with re. for example:
import re
disclaimer = re.sub(r"Disclaimer.*?(?=$)", text, re.IGNORECASE)
image = re.sub("\[cid:image.*?(?=\])", text, re.IGNORECASE)
external = re.findall("EXTERNAL EMAIL.*?(?=\.)", text, re.IGNORECASE)
signature = re.sub(r"signature",text, re.IGNORECASE)
I made a first attempt for this brick.