mirror of
https://github.com/uutils/coreutils.git
synced 2025-08-23 12:04:49 +00:00
autogenerated mdbook documentation
This commit is contained in:
parent
951035e49c
commit
cf42008150
118 changed files with 781 additions and 179 deletions
20
docs/create_docs.py
Normal file
20
docs/create_docs.py
Normal 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")
|
Loading…
Add table
Add a link
Reference in a new issue