You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
538 B

import glob
from pathlib import Path
import subprocess
specials = ["footer", "todo"]
for filename in specials:
with open(filename+".html", "w") as outfile:
subprocess.run(["pandoc", f"{filename}.md"], stdout=outfile)
for filename in glob.glob("*.md"):
filename = Path(filename).stem
if filename in specials:
continue
with open(filename+".html", "w") as outfile:
subprocess.run(["pandoc", "--toc", "--css=github-pandoc.css", "-A", "footer.html", "--standalone", f"{filename}.md"], stdout=outfile)