Files
I-Form_Server_Node_Deployer/scripts/docs.py
2023-11-07 13:43:26 +00:00

32 lines
703 B
Python

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()