本文整理汇总了Python中recommonmark.transform.AutoStructify方法的典型用法代码示例。如果您正苦于以下问题:Python transform.AutoStructify方法的具体用法?Python transform.AutoStructify怎么用?Python transform.AutoStructify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类recommonmark.transform
的用法示例。
在下文中一共展示了transform.AutoStructify方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.connect('builder-inited', run_apidoc)
app.connect("autodoc-skip-member", skip)
#Allow MarkDown
app.add_config_value('recommonmark_config', {
'url_resolver': lambda url: "build/apidoc/" + url,
'auto_toc_tree_section': ['Contents','Examples'],
'enable_eval_rst': True,
#'enable_auto_doc_ref': True,
'enable_math': True,
'enable_inline_math': True
}, True)
app.add_transform(AutoStructify)
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
示例2: section_property_attrgetter
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def section_property_attrgetter(object, name, default=None):
try:
prop = sphinx.util.inspect.safe_getattr(object, name)
# Try returning the underlying section property class
try:
return sphinx.util.inspect.safe_getattr(prop, "__prop_cls__")
except AttributeError:
pass
# Return object itself
return prop
except AttributeError as e:
pass
# Nothing found: Return default
return default
# app setup hook for reCommonMark's AutoStructify and our own extension
示例3: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
# Ensure we are building with reCommonMark 0.5+
import recommonmark
assert tuple(int(v) for v in recommonmark.__version__.split(".", 2)[0:2]) >= (0, 5)
from recommonmark.transform import AutoStructify
app.add_config_value("recommonmark_config", {
"auto_toc_tree_section": "Contents",
}, True)
app.add_transform(AutoStructify)
# Add special documentation for `Client` class
app.add_autodocumenter(ClientClassDocumenter)
# Allow names to be resolved through the property objects of the client
# class without resorting to lots of name rewriting (as was the case with
# the previous implementation)
app.add_autodoc_attrgetter(object, section_property_attrgetter)
示例4: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app: Any) -> None:
app.add_source_parser(CustomCommonMarkParser)
app.add_config_value(
'recommonmark_config',
{
'enable_eval_rst': True,
# Turn off recommonmark features we aren't using.
'enable_auto_doc_ref': False,
'auto_toc_tree_section': None,
'enable_auto_toc_tree': False,
'enable_math': False,
'enable_inline_math': False,
'url_resolver': lambda x: x,
},
True)
# Enable `eval_rst`, and any other features enabled in recommonmark_config.
# Docs: http://recommonmark.readthedocs.io/en/latest/auto_structify.html
# (But NB those docs are for master, not latest release.)
app.add_transform(AutoStructify)
# overrides for wide tables in RTD theme
app.add_stylesheet('theme_overrides.css') # path relative to _static
示例5: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app: Any) -> None:
app.add_source_parser(CustomCommonMarkParser)
app.add_config_value('recommonmark_config', {
'enable_eval_rst': True,
# Turn off recommonmark features we aren't using.
'enable_auto_doc_ref': False,
'auto_toc_tree_section': None,
'enable_auto_toc_tree': False,
'enable_math': False,
'enable_inline_math': False,
'url_resolver': lambda x: x,
}, True)
# Enable `eval_rst`, and any other features enabled in recommonmark_config.
# Docs: https://recommonmark.readthedocs.io/en/latest/auto_structify.html
# (But NB those docs are for master, not latest release.)
app.add_transform(AutoStructify)
# overrides for wide tables in RTD theme
app.add_css_file('theme_overrides.css') # path relative to _static
示例6: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value(
"recommonmark_config",
{
"url_resolver": lambda url: github_doc_root + url,
"auto_toc_tree_section": "Contents",
},
True,
)
app.add_transform(AutoStructify)
app.add_stylesheet("custom.css")
app.add_javascript("link_gen/link.js")
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
示例7: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
from recommonmark.transform import AutoStructify
app.connect("autodoc-skip-member", autodoc_skip_member)
# app.connect('autodoc-skip-member', autodoc_skip_member)
app.add_config_value(
"recommonmark_config",
{
"url_resolver": url_resolver,
"auto_toc_tree_section": "Contents",
"enable_math": True,
"enable_inline_math": True,
"enable_eval_rst": True,
},
True,
)
app.add_transform(AutoStructify)
示例8: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
# If MXNET_DOCS_BUILD_MXNET is set something different than 1
# Skip the build step
if os.getenv('MXNET_DOCS_BUILD_MXNET', '1') == '1' or _MXNET_DOCS_BUILD_MXNET:
print("Building MXNet!")
app.connect("builder-inited", build_mxnet)
if _DOXYGEN_DOCS:
print("Building Doxygen!")
app.connect("builder-inited", generate_doxygen)
if _SCALA_DOCS or _CLOJURE_DOCS:
print("Building Scala!")
app.connect("builder-inited", build_scala)
if _SCALA_DOCS:
print("Building Scala Docs!")
app.connect("builder-inited", build_scala_docs)
if _CLOJURE_DOCS:
print("Building Clojure Docs!")
app.connect("builder-inited", build_clojure_docs)
if _R_DOCS:
print("Building R Docs!")
app.connect("builder-inited", build_r_docs)
app.connect('source-read', convert_table)
app.connect('source-read', add_buttons)
app.add_config_value('recommonmark_config', {
'url_resolver': lambda url: 'http://mxnet.io/' + url,
'enable_eval_rst': True,
}, True)
app.add_transform(transform.AutoStructify)
示例9: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value('recommonmark_config', {
'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
'enable_auto_doc_ref': True,
}, True)
app.add_transform(AutoStructify)
app.add_stylesheet('css/custom.css')
app.add_javascript('js/readthedocs-analytics.js')
示例10: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value('recommonmark_config', {
'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
'enable_auto_doc_ref': True,
}, True)
app.add_transform(AutoStructify)
app.add_stylesheet('css/custom.css')
app.add_javascript('../_static/js/en-readthedocs-analytics.js')
示例11: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value('recommonmark_config', {
'enable_eval_rst': True,
'enable_auto_doc_ref': False,
}, True)
app.add_transform(AutoStructify)
示例12: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value('recommonmark_config', {
# 'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
}, True)
app.add_transform(AutoStructify)
示例13: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value('recommonmark_config', {
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
'enable_auto_doc_ref': True
}, True)
app.add_transform(AutoStructify)
# -- Options for HTML output ----------------------------------------------
示例14: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
app.add_config_value('recommonmark_config', {
'auto_toc_tree_section': 'Contents',
}, True)
app.add_transform(AutoStructify)
app.connect('builder-inited', run_copyreadme)
app.connect('builder-inited', run_apidoc)
示例15: setup
# 需要导入模块: from recommonmark import transform [as 别名]
# 或者: from recommonmark.transform import AutoStructify [as 别名]
def setup(app):
config = {
# 'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
}
app.add_config_value('recommonmark_config', config, True)
app.add_transform(AutoStructify)