aboutsummaryrefslogtreecommitdiffstats
path: root/md2html.py
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-09-17 18:20:38 +0200
committerLeonard Kugis <leonard@kug.is>2025-09-17 18:20:38 +0200
commitc48fbfb7b85d9c5264be1d68063b8ac3af9e2899 (patch)
tree97c7d27e07392ba8ce303d0e917ee44972e94233 /md2html.py
downloadcgithub-c48fbfb7b85d9c5264be1d68063b8ac3af9e2899.tar.gz
Initial commit
Diffstat (limited to 'md2html.py')
-rwxr-xr-xmd2html.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/md2html.py b/md2html.py
new file mode 100755
index 0000000..ddb87dc
--- /dev/null
+++ b/md2html.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+
+import markdown
+import sys
+
+sys.stdout.buffer.write(b"<div class=\"markdown-body\">")
+markdown.markdownFromFile(
+ output_format="html",
+ extensions=["markdown.extensions.fenced_code",
+ "markdown.extensions.def_list",
+ "markdown.extensions.tables"]
+)
+sys.stdout.buffer.write(b"</div>")