Add new idea for docs

This commit is contained in:
redfast00 2021-07-31 03:29:37 +02:00
parent 81c3966627
commit 5b63d93df3
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C
2 changed files with 13 additions and 0 deletions

1
docs/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
docs.pdf

12
docs/build.py Normal file
View file

@ -0,0 +1,12 @@
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")