Skip to content
Snippets Groups Projects
Commit 270070fa authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

prace: Úprava skriptu na generování

parent f449e48d
No related branches found
No related tags found
No related merge requests found
......@@ -185,7 +185,8 @@ def main(build_dir=Path("build_pdf"), link_out=True):
doc = import_md(open(d/"index.md", "r").read(), bibliography=d/"sample.bib")
OutputGenerator(sys.stdout).generate(doc)
with open(build_dir/"input.ast", "w") as f:
OutputGenerator(f).generate(doc)
tp = TransformProcessor(str(d/"index.md"))
tp.add_command_module(formatitko_commands)
......@@ -195,7 +196,8 @@ def main(build_dir=Path("build_pdf"), link_out=True):
e.pretty_print(tracebacklimit=tracebacklimit)
return 1
OutputGenerator(sys.stdout).generate(doc)
with open(build_dir/"transformed.ast", "w") as f:
OutputGenerator(f).generate(doc)
imageProcessor = ImageProcessor({"": ImageProcessorNamespace(str(build_dir/"img_public_dir"), "/", str(build_dir/"img_cache_dir"), [str(d), str(build_dir)], True)})
......@@ -239,6 +241,8 @@ def main(build_dir=Path("build_pdf"), link_out=True):
print(f"VERA PDF-A VALIDATION FAILD (returncode {vera_run.returncode})")
print(f"Details: file://{os.path.abspath(build_dir)}/bakalarka-vera.html")
exit(vera_run.returncode)
else:
print(f"VERA OK")
def __main__():
main()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment