Skip to content
Snippets Groups Projects
Commit ea172dfe authored by Daniel Schulte's avatar Daniel Schulte
Browse files

Updated compile.py and renamed template

compile.py now calls pdflatex for you
renamed template file to handout.tex.template
parent 3bbbfd71
No related branches found
No related tags found
No related merge requests found
Pipeline #
handout.pdf.processed handout.tex
venv/ venv/
#!/usr/bin/env python3 #!/usr/bin/env python3
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
import subprocess
if __name__ == "__main__": if __name__ == "__main__":
registration = dict() registration = dict()
...@@ -11,7 +12,7 @@ if __name__ == "__main__": ...@@ -11,7 +12,7 @@ if __name__ == "__main__":
sticks = [] sticks = []
env = Environment(loader=FileSystemLoader(".")) env = Environment(loader=FileSystemLoader("."))
template = env.get_template("handout.tex") template = env.get_template("handout.tex.template")
with open("handout.tex.processed","w") as fd: with open("handout.tex","w") as fd:
fd.write(template.render({"registration":registration,"sticks":sticks,"cleanhandout":True})) fd.write(template.render({"registration":registration,"sticks":sticks,"cleanhandout":True}))
subprocess.call("pdflatex handout.tex", shell=True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment