makedoc.py

This script builds documentation for the project.

source code
 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
29
30
31
32
33
"""
makedoc.py
++++++++++

Generates the documentation of this project

Usage:

.. code-block:: bash
 
 python makedoc.py

| Author: shmakovpn <shmakovpn@yandex.ru>
| Date: 2020-01-13
"""
import os
# The path to the folder of this script
SCRIPT_DIR: str = os.path.dirname(os.path.abspath(__file__))


def run_sphinx() -> None:
    """Executes *sphinx-build* command"""
    docs_dir: str = os.path.join(SCRIPT_DIR, 'docs')
    docs_source_dir: str = os.path.join(docs_dir, 'source')
    build_dir: str = os.path.join(docs_dir, 'build')
    html_dir: str = os.path.join(build_dir, 'html')
    cmd: str = f'sphinx-build -b html "{docs_source_dir}" "{html_dir}"'
    os.system(cmd)
    print('__END__')


if __name__ == '__main__':
    run_sphinx()

Autodoc documentation

makedoc.py

Generates the documentation of this project

Usage:

python makedoc.py
Author: shmakovpn <shmakovpn@yandex.ru>
Date: 2020-01-13
makedoc.run_sphinx() → None[source]

Executes sphinx-build command