本文整理汇总了Python中sphinx.writers.html.HTMLTranslator.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python HTMLTranslator.__init__方法的具体用法?Python HTMLTranslator.__init__怎么用?Python HTMLTranslator.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sphinx.writers.html.HTMLTranslator
的用法示例。
在下文中一共展示了HTMLTranslator.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, *args, **kwargs):
HTMLTranslator.__init__(self, *args, **kwargs)
self.section_count = 0
self.body_stack = []
self.current_slide = None
self.slide_data = []
示例2: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, builder, *args, **kwds):
"""
constructor
"""
HTMLTranslator.__init__(self, builder, *args, **kwds)
for name, f1, f2 in builder._function_node:
setattr(self.__class__, "visit_" + name, f1)
setattr(self.__class__, "depart_" + name, f2)
示例3: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, builder, document, *args, **kwargs):
HTMLTranslator.__init__(self, builder, document, *args, **kwargs)
self._title = None # section title
self.parent = None
self.add_to_toc = False
self.order = 0
self.add_permalinks = False
self.css = ['main.css']
self._images = set()
示例4: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, builder, *args, **kwargs):
HTMLTranslator.__init__(self, builder, *args, **kwargs)
self.comment_class = 'sphinx-has-comment'
示例5: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, *args, **kwargs):
HTMLTranslator.__init__(self, *args, **kwargs)
self.section_count = 0
示例6: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, builder, *args, **kwds):
HTMLTranslator.__init__(self, builder, *args, **kwds)
self.initial_header_level = 1
示例7: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, builder, *args, **kwds):
HTMLTranslator.__init__(self, builder, *args, **kwds)
builder.templates.environment.filters['get_type'] = _getType
builder.templates.environment.tests['index'] = _isIndex
self.highlightlinenothreshold = 0
示例8: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, *args, **kwargs):
HTMLTranslator.__init__(self, *args, **kwargs)
self.xref_close = 0
示例9: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, *args, **kwargs):
builder = FakeBuilder()
HTMLTranslator.__init__(self, builder, *args, **kwargs)
示例10: __init__
# 需要导入模块: from sphinx.writers.html import HTMLTranslator [as 别名]
# 或者: from sphinx.writers.html.HTMLTranslator import __init__ [as 别名]
def __init__(self, builder, *args, **kwds):
HTMLTranslator.__init__(self, builder, *args, **kwds)
self.highlighter = ConfluencePygmentsBridge()