From 93fcb1e428a1d21a4b19b3e611e03e47399a5557 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 30 May 2019 16:24:41 +0100 Subject: Add output --- scripts/convert.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/convert.py b/scripts/convert.py index a1e68ca..0552367 100755 --- a/scripts/convert.py +++ b/scripts/convert.py @@ -5,7 +5,7 @@ from bs4 import BeautifulSoup import csv import re -def main(file_): +def main(file_, output): with open(file_, "r") as f: file_contents = f.read() @@ -22,10 +22,10 @@ def main(file_): vals = map(lambda l: map(lambda s: re.sub(r"Failed", r"1", s), l), vals) vals = map(lambda l: map(lambda s: re.sub(r"Passed", r"0", s), l), vals) - with open("out.csv", "w") as f: + with open(output, "w") as f: wr = csv.writer(f) wr.writerow(headers) wr.writerows(vals) if __name__ == '__main__': - main(sys.argv[1]) + main(sys.argv[1], sys.argv[2]) -- cgit