build
This commit is contained in:
parent
7aa86acf9b
commit
e35faf8246
3 changed files with 49 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/out/
|
34
build.py
Executable file
34
build.py
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#! /usr/bin/python3 -B
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
import sphinx
|
||||||
|
|
||||||
|
INPUT = ["cnam"]
|
||||||
|
OUTPUT = "out"
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
file = os.path.realpath(__file__)
|
||||||
|
directory = os.path.dirname(file)
|
||||||
|
output_directory = os.path.join(directory, OUTPUT)
|
||||||
|
shutil.rmtree(output_directory, ignore_errors=True)
|
||||||
|
for doc in INPUT:
|
||||||
|
arguments = [
|
||||||
|
"-E",
|
||||||
|
"-j", "2",
|
||||||
|
"-b", "html",
|
||||||
|
"-D", "project={}".format(doc),
|
||||||
|
"-D", "master_doc={}".format("index"),
|
||||||
|
"-D", "html_theme={}".format("sphinx_rtd_theme"),
|
||||||
|
# "-C",
|
||||||
|
"-c", directory,
|
||||||
|
os.path.join(directory, doc),
|
||||||
|
os.path.join(output_directory, doc),
|
||||||
|
]
|
||||||
|
sphinx.build_main(arguments)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
14
conf.py
Normal file
14
conf.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
extensions = [
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.doctest',
|
||||||
|
'sphinx.ext.todo',
|
||||||
|
'sphinx.ext.imgmath',
|
||||||
|
'sphinx.ext.ifconfig',
|
||||||
|
'sphinx.ext.viewcode',
|
||||||
|
]
|
||||||
|
language = 'en'
|
||||||
|
html_show_sphinx = False
|
||||||
|
html_show_copyright = False
|
||||||
|
html_title = 'ToDo'
|
||||||
|
smartquotes = False
|
||||||
|
todo_include_todos = True
|
Loading…
Add table
Add a link
Reference in a new issue