summaryrefslogtreecommitdiffstats
path: root/md2html.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-05-26 02:22:24 -0700
committerPinapelz <yukais@pinapelz.com>2026-05-26 02:22:24 -0700
commit93e24bf2218eb7aaba5b23220f9586e85848f330 (patch)
tree48ad66200ce6660f67b50ef4a7cd2e4328e18bf3 /md2html.py
parentd2f4b5723b3d52ea8eab4dbf541d0bdfae08b895 (diff)
add md2html scriptmain
Diffstat (limited to 'md2html.py')
-rw-r--r--md2html.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/md2html.py b/md2html.py
new file mode 100644
index 0000000..af45a46
--- /dev/null
+++ b/md2html.py
@@ -0,0 +1,21 @@
+kk#!/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.codehilite",
+ "markdown.extensions.tables",
+ "markdown.extensions.def_list",
+ "markdown.extensions.toc",
+ "markdown.extensions.sane_lists",
+ "markdown.extensions.attr_list",
+ "markdown.extensions.md_in_html",
+ "markdown.extensions.nl2br",
+ ]
+)
+sys.stdout.buffer.write(b"</div>")
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage