#!/usr/bin/env python # SPDX-License-Identifier: NONE # written 2016 by David Lamparter, placed in Public Domain. import sys, markdown template = """
%s """ md = markdown.Markdown(extensions=["extra", "toc"]) for fn in sys.argv[1:]: with open(fn, "r") as ifd: with open("%s.html" % (fn), "w") as ofd: ofd.write( (template % (md.convert(ifd.read().decode("UTF-8")))).encode("UTF-8") )