blob: 107f62c729bec868550047412b9f07a4d5ed2276 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from parse_data import data, stats
from jinja2 import Environment, FileSystemLoader
# 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")
|