forked from kaldi-asr/kaldi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
102 lines (89 loc) · 2.18 KB
/
conf.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# -*- coding: utf-8 -*-
import sphinx_rtd_theme
import textwrap
project = 'Kaldi'
copyright = '2009-2020, Kaldi Authors'
author = 'Kaldi Authors'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'breathe',
'exhale',
]
source_suffix = '.rst'
html_theme = 'sphinx_rtd_theme'
pygments_style = 'sphinx'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
smartquotes = False
html_show_sourcelink = True
html_theme_options = {
'collapse_navigation': False,
}
# Setup the breathe extension
breathe_projects = {'Kaldi': './xml'}
breathe_default_project = 'Kaldi'
doc_dirs = [
'base'
# 'chain',
# 'cudadecoder',
# 'cudafeat',
# 'cudamatrix',
# 'decoder',
# 'fstext',
# 'gmm',
# 'hmm',
# 'itf',
# 'ivector',
# 'kws',
# 'lat',
# 'lm',
# 'matrix'
# 'nnet',
# 'nnet2',
# 'nnet3',
# 'online',
# 'online2',
# 'probe',
# 'rnnlm',
# 'sgmm2',
# 'tfrnnlm',
# 'transform',
# 'tree',
# 'util',
]
doc_exclude_patterns = []
for d in doc_dirs:
pattern = '{0}/*.cc {0}/*-inl.h {0}/*test.cc'.format(d)
doc_exclude_patterns.append(pattern)
doc_dirs.append('doc')
# yapf: disable
# Setup the exhale extension
exhale_args = {
# These arguments are required
'containmentFolder': './api',
'rootFileName': 'api.rst',
'rootFileTitle': 'Kaldi C++ API',
'doxygenStripFromPath': '../src',
# Suggested optional arguments
'createTreeView': True,
# TIP: if using the sphinx-bootstrap-theme, you need
# 'treeViewIsBootstrap': True,
'exhaleExecutesDoxygen': True,
'exhaleDoxygenStdin': textwrap.dedent('''
INPUT = {doc_dirs}
EXCLUDE = {doc_exclude_patterns}
EXAMPLE_PATH = doc
EXTRACT_ALL = yes
'''.format(doc_dirs=' '.join(doc_dirs),
doc_exclude_patterns=' '.join(doc_exclude_patterns)))
}
# yapf: enable
# Tell sphinx what the primary language being documented is.
primary_domain = 'cpp'
# Tell sphinx what the pygments highlight language should be.
highlight_language = 'cpp'