-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkdoc.py
More file actions
28 lines (27 loc) · 701 Bytes
/
mkdoc.py
File metadata and controls
28 lines (27 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import shlex
import subprocess
import sys
if __name__ == "__main__":
action = sys.argv[1]
py = sys.executable
command = [py]
if action == "toc":
command.extend(
[
"tools/mktoc.py",
"--placeholder",
"[TOC]",
"README_draft.md",
"-o",
"README.md",
]
)
elif action == "typedoc":
command.extend(
["tools/mktypedoc.py", "--action", "save", "--output-file", "tmp.md"]
)
else:
print("Invalid action")
sys.exit(1)
print("Running command: ", shlex.join(command))
sys.exit(subprocess.call(command))