about summary refs log tree commit diff stats
path: root/create_report.py
diff options
context:
space:
mode:
authorChristian Krinitsin <christian.krinitsin@iqmine.de>2025-04-08 14:19:41 +0200
committerChristian Krinitsin <christian.krinitsin@iqmine.de>2025-04-08 14:19:41 +0200
commitab279cd88d6367f3572dd244d50b04dcebfff099 (patch)
tree7a7989e0e6b2570447ddfbd7f7ef33d912ed5569 /create_report.py
parent1ccdd8e0afc48f50deb8002fc717256bb2d99536 (diff)
downloadtestreport-ab279cd88d6367f3572dd244d50b04dcebfff099.tar.gz
testreport-ab279cd88d6367f3572dd244d50b04dcebfff099.zip
create a report out of parsed data, use the template.html
Diffstat (limited to 'create_report.py')
-rw-r--r--create_report.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/create_report.py b/create_report.py
index 6a95a14..107f62c 100644
--- a/create_report.py
+++ b/create_report.py
@@ -1,22 +1,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")
 
-# Data to be passed into the template
-data = {
-    "title": "My Report",
-    "items": ["Apple", "Banana", "Cherry"]
-}
-
-data["items"].append("hello")
-
 # Render the template with data
-html_output = template.render(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")
+print("Report generated: report.html")
\ No newline at end of file