mirror of
https://github.com/Cian-H/I-Form_Server_Node_Deployer.git
synced 2025-12-23 06:32:08 +00:00
Polished up documentation
This commit is contained in:
32
scripts/docs.py
Normal file
32
scripts/docs.py
Normal 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()
|
||||
Reference in New Issue
Block a user