From e11c14d3828077ca0286ebfb44ce45d16c6ff665 Mon Sep 17 00:00:00 2001 From: Audrey Aaliyah Jensen Date: Mon, 30 Oct 2023 10:43:42 -0500 Subject: [PATCH] Revert "allows passing an input path as argument" This reverts commit af712a22ab447be76d1b2a4bd32794a604017008. --- Sandbox Scripts/extract.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Sandbox Scripts/extract.py b/Sandbox Scripts/extract.py index c302116..19fcee6 100644 --- a/Sandbox Scripts/extract.py +++ b/Sandbox Scripts/extract.py @@ -13,15 +13,20 @@ import os import email from email import policy from multiprocessing import Pool +<<<<<<< HEAD import sys import re EXTENSION = "eml" OUTREGEX = ".*\\\\" INREGEX = ".*\\\\$" +======= + +EXTENSION = "eml" + +>>>>>>> parent of af712a2 (allows passing an input path as argument) def extract(filename): - print(filename) """ Try to extract the attachments from all files in cwd """ @@ -58,6 +63,7 @@ def extract(filename): if __name__ == "__main__": +<<<<<<< HEAD path = "" if len(sys.argv) > 1: path = sys.argv[1] @@ -68,9 +74,11 @@ if __name__ == "__main__": path += "\\\\" else: path = "./" +======= +>>>>>>> parent of af712a2 (allows passing an input path as argument) # let's do this in parallel, using cpu count as number of threads pool = Pool(None) - res = pool.map(extract, glob.iglob("%s*.%s" % (path, EXTENSION))) + res = pool.map(extract, glob.iglob("*.%s" % EXTENSION)) # need these if we use _async pool.close() pool.join()