You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
369 B
Python

import json
from jinja2 import Environment, FileSystemLoader
with open("worklist.json","r") as d:
worklist = json.load(d)
fileLoader = FileSystemLoader("templates")
env = Environment(loader=fileLoader)
rendered = env.get_template("worklist.html").render(worklist=worklist,title="Test")
fileName = "works.html"
with open(f"{fileName}","w") as f:
f.write(rendered)