output files to same input dir
This commit is contained in:
parent
adf5512106
commit
087566a737
@ -14,9 +14,10 @@ import email
|
||||
from email import policy
|
||||
from multiprocessing import Pool
|
||||
import sys
|
||||
import re
|
||||
|
||||
EXTENSION = "eml"
|
||||
OUTPATH = ""
|
||||
OUTREGEX = ".*\\\\"
|
||||
|
||||
def extract(filename):
|
||||
print(filename)
|
||||
@ -24,7 +25,8 @@ def extract(filename):
|
||||
Try to extract the attachments from all files in cwd
|
||||
"""
|
||||
# ensure that an output dir exists
|
||||
od = "output"
|
||||
filepath = re.findall(OUTREGEX, filename)
|
||||
od = (filepath[0] or "") + "/output"
|
||||
os.path.exists(od) or os.makedirs(od)
|
||||
output_count = 0
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user