X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/525c815cc400bc49881144bcd7e7b717bbc1af5d..dbadd856ba0537110338cfe58256b152d01388c0:/filters/html-converters/md2html diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html index 138713d..59f43a8 100755 --- a/filters/html-converters/md2html +++ b/filters/html-converters/md2html @@ -1,5 +1,12 @@ -#!/bin/sh -cat <<_EOF +#!/usr/bin/env python3 +import markdown +import sys +import io +from pygments.formatters import HtmlFormatter +from markdown.extensions.toc import TocExtension +sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8') +sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') +sys.stdout.write(''' -_EOF -echo "