doc: update

This commit is contained in:
Ferrari Martino Giordano
2024-03-20 16:06:04 +01:00
parent 6ea27eb5ab
commit 1bf403a339
6 changed files with 78 additions and 18 deletions
+10 -8
View File
@@ -53,6 +53,7 @@ def __doc_application__(label, app):
def document(fname, args, config):
"""Document MARTe object."""
doc.set_path(os.path.join(args.destination, fname))
doc.set_config(args)
if not os.path.isdir(doc.path()):
os.mkdir(doc.path())
now = datetime.now() # current date and time
@@ -79,11 +80,12 @@ def document(fname, args, config):
logging.info(f"Saving markdown: {fpath}")
with open(fpath, "w") as file:
file.write(mddoc)
logging.info(f"Generating html: {outpath}.html")
os.system(
f"pandoc --css pandoc/styling.css --resource-path={doc.path()} --embed-resource --to html5 -s {fpath} -o {outpath}.html"
)
logging.info(f"Generating pdf: {outpath}.pdf")
os.system(
f"pandoc -H pandoc/disable_float.tex --resource-path={doc.path()} -s {fpath} -o {outpath}.pdf"
)
if doc.build():
logging.info(f"Generating html: {outpath}.html")
os.system(
f"pandoc --css pandoc/styling.css --resource-path={doc.path()} --embed-resource --to html5 -s {fpath} -o {outpath}.html"
)
logging.info(f"Generating pdf: {outpath}.pdf")
os.system(
f"pandoc -H pandoc/disable_float.tex --resource-path={doc.path()} -s {fpath} -o {outpath}.pdf"
)