當前位置: 首頁>>代碼示例>>Python>>正文


Python transform.AutoStructify方法代碼示例

本文整理匯總了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.
# 
開發者ID:microsoft,項目名稱:SparseSC,代碼行數:23,代碼來源:conf.py

示例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 
開發者ID:ipfs-shipyard,項目名稱:py-ipfs-http-client,代碼行數:22,代碼來源:conf.py

示例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) 
開發者ID:ipfs-shipyard,項目名稱:py-ipfs-http-client,代碼行數:19,代碼來源:conf.py

示例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 
開發者ID:weecology,項目名稱:DeepForest,代碼行數:25,代碼來源:conf.py

示例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 
開發者ID:zulip,項目名稱:zulip,代碼行數:23,代碼來源:conf.py

示例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. 
開發者ID:jupyterhub,項目名稱:nbgitpuller,代碼行數:25,代碼來源:conf.py

示例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) 
開發者ID:conansherry,項目名稱:detectron2,代碼行數:19,代碼來源:conf.py

示例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) 
開發者ID:awslabs,項目名稱:dynamic-training-with-apache-mxnet-on-aws,代碼行數:31,代碼來源:mxdoc.py

示例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') 
開發者ID:WeBankFinTech,項目名稱:WeBASE-Doc,代碼行數:13,代碼來源:conf.py

示例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') 
開發者ID:WeBankFinTech,項目名稱:WeBASE-Doc,代碼行數:13,代碼來源:conf.py

示例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) 
開發者ID:huge-success,項目名稱:sanic,代碼行數:8,代碼來源:conf.py

示例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) 
開發者ID:neuropsychology,項目名稱:NeuroKit,代碼行數:8,代碼來源:conf.py

示例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 ---------------------------------------------- 
開發者ID:italia,項目名稱:spid-regole-tecniche,代碼行數:12,代碼來源:conf.py

示例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) 
開發者ID:timkpaine,項目名稱:tributary,代碼行數:9,代碼來源:conf.py

示例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) 
開發者ID:dephell,項目名稱:dephell,代碼行數:10,代碼來源:conf.py


注:本文中的recommonmark.transform.AutoStructify方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。