autogenerated mdbook documentation

This commit is contained in:
Terts Diepraam 2022-01-20 16:46:49 +01:00
parent 951035e49c
commit cf42008150
118 changed files with 781 additions and 179 deletions

20
docs/create_docs.py Normal file
View file

@ -0,0 +1,20 @@
# Simple script to create the correct SUMMARY.md and other files
# for the mdbook documentation.
# Note: This will overwrite the existing files!
import os
with open('src/utils/index.md', 'w') as index:
with open('src/SUMMARY.md', 'w') as summary:
summary.write("# Summary\n\n")
summary.write("* [Introduction](introduction.md)\n")
summary.write("* [Contributing](contributing.md)\n")
summary.write("* [Utils](utils/index.md)\n")
index.write("# Utils\n\n")
for d in sorted(os.listdir('../src/uu')):
with open(f"src/utils/{d}.md", 'w') as f:
f.write(f"# {d}\n\n")
f.write(f"{{{{ #include ../../_generated/{d}-help.md }}}}\n")
print(f"Created docs/src/utils/{d}.md")
summary.write(f" * [{d}](utils/{d}.md)\n")
index.write(f"* [{d}](./{d}.md)\n")