coreutils/docs/create_docs.py
2022-01-21 20:18:36 +01:00

12 lines
No EOL
437 B
Python

# 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/SUMMARY.md', 'w') as summary:
summary.write("# Summary\n\n")
summary.write("[Introduction](index.md)\n")
summary.write("* [Contributing](contributing.md)\n")
for d in sorted(os.listdir('../src/uu')):
summary.write(f"* [{d}](utils/{d}.md)\n")