MCPcopy Create free account
hub / github.com/DFHack/dfhack / SphinxOutputFormat

Class SphinxOutputFormat

docs/build.py:10–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8import sys
9
10class SphinxOutputFormat:
11 def __init__(self, name, pre_args):
12 self.name = str(name)
13 self.pre_args = tuple(pre_args)
14
15 @property
16 def args(self):
17 output_dir = os.path.join('docs', self.name)
18 artifacts_dir = os.path.join('build', 'docs', self.name) # for artifacts not part of the final documentation
19 os.makedirs(artifacts_dir, mode=0o755, exist_ok=True)
20 return [
21 *self.pre_args,
22 '.', # source dir
23 output_dir,
24 '-d', artifacts_dir,
25 '-w', os.path.join(artifacts_dir, 'sphinx-warnings.txt'),
26 ]
27
28OUTPUT_FORMATS = {
29 'html': SphinxOutputFormat('html', pre_args=['-b', 'html']),

Callers 1

build.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected