|
feisty meow concerns codebase 2.140
|
Functions | |
| file_exists (f) | |
| save_file (fn, cont) | |
| construct_name (id, fn) | |
| disqo (s) | |
| disgra (s) | |
| pullout (m, key) | |
| extract (msgfile, key) | |
| clean_header (h) | |
| caption (origin) | |
Variables | |
| str | startdirname = "Email" |
| int | num = 1 |
| nam = i[:-4] | |
| str | path = "./" + startdirname + str(num) + "/" + nam |
| f = open(i, "r") | |
| emailDict = extract(f, f.name) | |
| str | textFile = "" |
| froms = emailDict["from"] | |
| tos = emailDict["to"] | |
| subject = emailDict["subject"] | |
| parts = emailDict["parts"] | |
| date = emailDict["date"] | |
| txt = emailDict["text"] | |
| html = emailDict["html"] | |
| list | files = [] |
| wf = open("./" + startdirname + str(num) + "/" + nam + "/" + "txt_" + nam + ".txt", "w") | |
started from free license script posted on stackexchange: https://softwarerecs.stackexchange.com/questions/28138/converter-that-converts-eml-files-to-plain-text?newreg=48fb884924fd4d909777e5fccc8af2eb Chris Koeritz: added processing to fix headers and to turn html parts into text 2023-11-08.
| eml_to_txt.caption | ( | origin | ) |
| eml_to_txt.clean_header | ( | h | ) |
Definition at line 109 of file eml_to_txt.py.
Referenced by caption().
| eml_to_txt.construct_name | ( | id, | |
| fn | |||
| ) |
Definition at line 24 of file eml_to_txt.py.
Referenced by pullout().
| eml_to_txt.disgra | ( | s | ) |
Definition at line 35 of file eml_to_txt.py.
Referenced by pullout().
| eml_to_txt.disqo | ( | s | ) |
Definition at line 29 of file eml_to_txt.py.
Referenced by pullout().
| eml_to_txt.extract | ( | msgfile, | |
| key | |||
| ) |
Definition at line 99 of file eml_to_txt.py.
| eml_to_txt.file_exists | ( | f | ) |
Definition at line 16 of file eml_to_txt.py.
Referenced by pullout().
| eml_to_txt.pullout | ( | m, | |
| key | |||
| ) |
Definition at line 40 of file eml_to_txt.py.
References construct_name(), disgra(), disqo(), file_exists(), pullout(), and save_file().
| eml_to_txt.save_file | ( | fn, | |
| cont | |||
| ) |
| eml_to_txt.date = emailDict["date"] |
Definition at line 153 of file eml_to_txt.py.
Definition at line 144 of file eml_to_txt.py.
| eml_to_txt.f = open(i, "r") |
Definition at line 143 of file eml_to_txt.py.
| list eml_to_txt.files = [] |
Definition at line 157 of file eml_to_txt.py.
| eml_to_txt.froms = emailDict["from"] |
Definition at line 149 of file eml_to_txt.py.
| eml_to_txt.html = emailDict["html"] |
Definition at line 155 of file eml_to_txt.py.
| eml_to_txt.nam = i[:-4] |
Definition at line 138 of file eml_to_txt.py.
| int eml_to_txt.num = 1 |
Definition at line 127 of file eml_to_txt.py.
| eml_to_txt.parts = emailDict["parts"] |
Definition at line 152 of file eml_to_txt.py.
| str eml_to_txt.path = "./" + startdirname + str(num) + "/" + nam |
Definition at line 139 of file eml_to_txt.py.
| str eml_to_txt.startdirname = "Email" |
Definition at line 126 of file eml_to_txt.py.
| eml_to_txt.subject = emailDict["subject"] |
Definition at line 151 of file eml_to_txt.py.
| str eml_to_txt.textFile = "" |
Definition at line 147 of file eml_to_txt.py.
| eml_to_txt.tos = emailDict["to"] |
Definition at line 150 of file eml_to_txt.py.
| eml_to_txt.txt = emailDict["text"] |
Definition at line 154 of file eml_to_txt.py.
| eml_to_txt.wf = open("./" + startdirname + str(num) + "/" + nam + "/" + "txt_" + nam + ".txt", "w") |
Definition at line 172 of file eml_to_txt.py.