mirror of
https://codeberg.org/angestoepselt/imagestack.git
synced 2026-03-21 22:32:17 +00:00
14 lines
293 B
Python
14 lines
293 B
Python
import typst
|
|
import json
|
|
|
|
|
|
|
|
def compile_pdf(data: dict):
|
|
data = {"computer": json.dumps(data)}
|
|
try:
|
|
res = typst.compile(input="files/main.typ", sys_inputs=data)
|
|
except RuntimeError as e:
|
|
print(e)
|
|
print("Error compiling")
|
|
return False
|
|
print(res)
|