From 92f710554dac6fb75e0c3b4bcf4a0305ee4df4c3 Mon Sep 17 00:00:00 2001 From: jwansek Date: Thu, 3 Mar 2022 18:13:24 +0000 Subject: started working on rendering junitxml's nicely to pdfs --- mark.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mark.py') diff --git a/mark.py b/mark.py index bb1ad62..720553b 100644 --- a/mark.py +++ b/mark.py @@ -28,8 +28,12 @@ def main(**kwargs): elif kwargs["format"] == "json": strout = json.dumps(output, indent = 4) else: - with open(os.path.join("templates", "%s.jinja2" % kwargs["format"]), "r") as f: - jinja_template = jinja2.Template(f.read()) + fp = os.path.join("templates", "%s.jinja2" % kwargs["format"]) + if kwargs["format"] == "tex": + jinja_template = misc_classes.latex_jinja_env.get_template("tex.jinja2") + else: + with open(fp, "r") as f: + jinja_template = jinja2.Template(f.read()) strout = jinja_template.render(**output, **jinja_helpers._get_helpers(), **kwargs) -- cgit v1.2.3