obus/docs/build.py

13 lines
452 B
Python
Raw Normal View History

2021-07-31 01:29:37 +00:00
import glob
import os
# https://tex.stackexchange.com/questions/101717/converting-markdown-to-latex-in-latex/246871#246871
outfilename = '/tmp/out.md'
with open(outfilename, 'w') as outfile:
for filepath in glob.iglob('../src/modules/*/doc/index.md'):
with open(filepath) as infile:
outfile.write(infile.read())
outfile.write("\n\\newpage{}\n")
os.system(f"pandoc --from=markdown --output=docs.pdf {outfilename} --highlight-style=espresso")