From 44c2ebec710e0c81f6ede60a306c4615bb65d62f Mon Sep 17 00:00:00 2001 From: ThoreOlthoff Date: Mon, 2 Sep 2024 14:58:20 +0200 Subject: [PATCH] adjusted the pyproject.toml --- mailcom/inout.py | 5 ++--- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mailcom/inout.py b/mailcom/inout.py index 18f919f..063e053 100644 --- a/mailcom/inout.py +++ b/mailcom/inout.py @@ -16,8 +16,8 @@ def list_of_files(directory_name: str) -> list[Path]: return email_list -def get_text(name): - with open(name, 'rb') as fhdl: +def get_text(file): + with open(file, 'rb') as fhdl: raw_email = fhdl.read() ep = eml_parser.EmlParser(include_raw_body=True) parsed_eml = ep.decode_email_bytes(raw_email) @@ -35,7 +35,6 @@ def get_text(name): "attachement type": attachmenttypes } return(email_content["content"]) - return content def delete_header(text): diff --git a/pyproject.toml b/pyproject.toml index 8cc7f76..baee28e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ version = "0.0.1" dependencies = [ "spacy", "transformers", + "eml_parser" ] [project.optional-dependencies]