|
@ -83,12 +83,12 @@ def md_to_html(md_pad_content, name): |
|
|
app_root = get_app_root() |
|
|
app_root = get_app_root() |
|
|
template_url = f"{ app_hostname }{ app_root }/{ name }/template.html" |
|
|
template_url = f"{ app_hostname }{ app_root }/{ name }/template.html" |
|
|
md_url = f"{ app_hostname }{ app_root }/{ name }/pad.md" |
|
|
md_url = f"{ app_hostname }{ app_root }/{ name }/pad.md" |
|
|
print(template_url) |
|
|
APP.logger.info("template_url", template_url) |
|
|
print(md_url) |
|
|
APP.logger.info("md_url", md_url) |
|
|
result = subprocess.run(["pandoc", "--from", "markdown", "--to", "html", "--template", f"{ template_url }", md_url], capture_output=True, text=True) |
|
|
result = subprocess.run(["pandoc", "--from", "markdown", "--to", "html", "--template", f"{ template_url }", md_url], capture_output=True, text=True) |
|
|
html = result.stdout |
|
|
html = result.stdout |
|
|
print(result.stderr) |
|
|
APP.logger.info("html", html) |
|
|
print(html) |
|
|
APP.logger.info("result.stderr", result.stderr) |
|
|
|
|
|
|
|
|
# Convert Markdown to HTML, using the default pandoc template |
|
|
# Convert Markdown to HTML, using the default pandoc template |
|
|
# ---------------------------------------------------------------------------------- |
|
|
# ---------------------------------------------------------------------------------- |
|
|