blob: c70b094a5a2f32e13808818e03f0d70ef3764ba3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
from parse_data import parse_data
from jinja2 import Environment, FileSystemLoader
import argparse
parser = argparse.ArgumentParser(prog='test_report_manager')
parser.add_argument('executable', help="executable to parse")
args = parser.parse_args()
data, stats = parse_data(args.executable)
# Load the template from the current directory
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template("template.html")
# Render the template with data
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:
f.write(html_output)
print("Report generated: report.html")
|