diff options
Diffstat (limited to 'create_report.py')
| -rw-r--r-- | create_report.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/create_report.py b/create_report.py index c70b094..b3c0e70 100644 --- a/create_report.py +++ b/create_report.py @@ -4,6 +4,7 @@ import argparse parser = argparse.ArgumentParser(prog='test_report_manager') parser.add_argument('executable', help="executable to parse") +parser.add_argument('-o', '--out', help="output file (default: report.html)", default="report.html") args = parser.parse_args() data, stats = parse_data(args.executable) @@ -16,7 +17,7 @@ template = env.get_template("template.html") html_output = template.render(data=data, stats=stats) # Save the generated HTML to a file -with open("report.html", "w", encoding="utf-8") as f: +with open(args.out, "w", encoding="utf-8") as f: f.write(html_output) -print("Report generated: report.html") \ No newline at end of file +print(f"Report generated: {args.out}") \ No newline at end of file |