Polished up documentation

This commit is contained in:
Cian Hughes
2023-11-07 13:43:26 +00:00
parent 4c59e9a607
commit e0e23c7b9b
16 changed files with 356 additions and 9 deletions

32
scripts/docs.py Normal file
View File

@@ -0,0 +1,32 @@
import subprocess
README_FILES = (
("", "docs/index.md"),
("Installation", "docs/installation.md"),
("Usage", "docs/usage.md"),
("Deployment", "docs/deployment.md"),
)
def create_readme():
with open("README.md", "wt") as r:
for header, file in README_FILES:
r.write(f"\n\n## {header}\n\n")
with open(file, "rt") as f:
r.write(f.read())
def update_license():
with open("LICENSE", "rt") as source, open("docs/license.md", "wt") as target:
target.write(source.read())
def create_docs():
subprocess.run("mkdocs build", shell=True, check=True)
def main():
create_readme()
update_license()
create_docs()