本文整理汇总了Python中sphinx.builders.html.StandaloneHTMLBuilder.write方法的典型用法代码示例。如果您正苦于以下问题:Python StandaloneHTMLBuilder.write方法的具体用法?Python StandaloneHTMLBuilder.write怎么用?Python StandaloneHTMLBuilder.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sphinx.builders.html.StandaloneHTMLBuilder
的用法示例。
在下文中一共展示了StandaloneHTMLBuilder.write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: write
# 需要导入模块: from sphinx.builders.html import StandaloneHTMLBuilder [as 别名]
# 或者: from sphinx.builders.html.StandaloneHTMLBuilder import write [as 别名]
def write(self, build_docnames, updated_docnames, method='update'):
names = build_docnames and updated_docnames and \
build_docnames + updated_docnames or \
build_docnames or updated_docnames
if 'index' not in names:
names.append('index')
for docname in names:
doctree = self.env.get_doctree(docname)
nodes = doctree.traverse(addnodes.toctree)
if nodes:
self.toctrees[docname] = nodes
StandaloneHTMLBuilder.write(
self, build_docnames, updated_docnames, method=method
)