当前位置: 首页>>代码示例>>Python>>正文


Python apidoc.main方法代码示例

本文整理汇总了Python中sphinx.apidoc.main方法的典型用法代码示例。如果您正苦于以下问题:Python apidoc.main方法的具体用法?Python apidoc.main怎么用?Python apidoc.main使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sphinx.apidoc的用法示例。


在下文中一共展示了apidoc.main方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    here = os.path.dirname(__file__)
    out = os.path.abspath(os.path.join(here, 'apidocs'))
    src = os.path.abspath(os.path.join(here, '..', '{{ cookiecutter.project_slug }}'))

    ignore_paths = []

    argv = [
        "-f",
        "-T",
        "-e",
        "-M",
        "-o", out,
        src
    ] + ignore_paths

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:NLeSC,项目名称:python-template,代码行数:27,代码来源:conf.py

示例2: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    ignore_paths = [
        os.path.join('..', '..', 'pulse2percept', '*', 'tests')
    ]

    argv = [
        "-f",
        "-M",
        "-e",
        "-E",
        "-T",
        "-o", "aaapi",
        os.path.join('..', 'pulse2percept')
    ] + ignore_paths

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:pulse2percept,项目名称:pulse2percept,代码行数:26,代码来源:p2pdocs.py

示例3: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):

    current_dir = os.path.abspath(os.path.dirname(__file__))
    module = os.path.join(current_dir, "..", "dipper")

    argv = [
        "-f",
        "-T",
        "-e",
        "-M",
        "-o", current_dir,
        module
    ]

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:monarch-initiative,项目名称:dipper,代码行数:25,代码来源:conf.py

示例4: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    ignore_paths = []

    argv = [
        "-f",
        "-o", "source",
        ".."
    ] + ignore_paths

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:DIVA-DIA,项目名称:DeepDIVA,代码行数:20,代码来源:conf.py

示例5: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    from sphinx import apidoc

    docs_path = os.path.dirname(__file__)
    apidoc_path = os.path.join(docs_path, "api")
    module_path = os.path.join(docs_path, "..", "semantic_release")

    apidoc.main(
        [
            "--force",
            "--module-first",
            "--separate",
            "-d",
            "3",
            "-o",
            apidoc_path,
            module_path,
        ]
    ) 
开发者ID:relekang,项目名称:python-semantic-release,代码行数:21,代码来源:conf.py

示例6: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    for pkg in PACKAGES:
        argv = ['-e',
                '-o', os.path.join(PATH_HERE, 'api'),
                os.path.join(PATH_HERE, PATH_ROOT, pkg),
                '**/test_*',
                '--force',
                '--private',
                '--module-first']
        try:
            # Sphinx 1.7+
            from sphinx.ext import apidoc
            apidoc.main(argv)
        except ImportError:
            # Sphinx 1.6 (and earlier)
            from sphinx import apidoc
            argv.insert(0, apidoc.__file__)
            apidoc.main(argv) 
开发者ID:Borda,项目名称:BIRL,代码行数:20,代码来源:conf.py

示例7: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    here = os.path.dirname(__file__)
    out = os.path.abspath(os.path.join(here, 'apidocs'))
    src = os.path.abspath(os.path.join(here, '..', 'scriptcwl'))

    ignore_paths = []

    argv = [
        "-f",
        "-T",
        "-e",
        "-M",
        "-o", out,
        src
    ] + ignore_paths

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:NLeSC,项目名称:scriptcwl,代码行数:27,代码来源:conf.py

示例8: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    for pkg in PACKAGES:
        argv = ['-e',
                '-o', os.path.join(PATH_HERE, 'api'),
                os.path.join(PATH_HERE, PATH_ROOT, pkg),
                'tests/*',
                '--force']
        try:
            # Sphinx 1.7+
            from sphinx.ext import apidoc
            apidoc.main(argv)
        except ImportError:
            # Sphinx 1.6 (and earlier)
            from sphinx import apidoc
            argv.insert(0, apidoc.__file__)
            apidoc.main(argv) 
开发者ID:Borda,项目名称:pyImSegm,代码行数:18,代码来源:conf.py

示例9: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    ignore_paths = []

    argv = [
        '-f',
        '-T',
        '-M',
        '-o', './_apidoc',
        '../src/'
    ] + ignore_paths  # yapf: disable

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:rlworkgroup,项目名称:dowel,代码行数:22,代码来源:conf.py

示例10: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    ignore_paths = []

    argv = [
        "-f",
        "-o", "apidoc",
        "./ocs_ci"
    ] + ignore_paths

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:red-hat-storage,项目名称:ocs-ci,代码行数:20,代码来源:conf.py

示例11: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    ignore_paths = [
    ]

    docs_path = os.path.relpath(os.path.dirname(__file__))
    root_path = os.path.relpath(os.path.dirname(os.path.dirname(__file__)))

    argv = [
        '--force',
        '--no-toc',
        '--separate',
        '--module-first',
        '--output-dir', os.path.join(docs_path, 'packages'),
        os.path.join(root_path, 'kopf'),
    ] + ignore_paths

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:zalando-incubator,项目名称:kopf,代码行数:27,代码来源:conf.py

示例12: _sphinx_tree

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def _sphinx_tree(self):
            source_dir = self._get_source_dir()
            cmd = ['apidoc', '.', '-H', 'Modules', '-o', source_dir]
            apidoc.main(cmd + self.autodoc_tree_excludes) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:6,代码来源:builddoc.py

示例13: run_apidoc

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def run_apidoc(_):
    here = os.path.dirname(__file__)
    out = os.path.abspath(os.path.join(here, '_apidoc'))
    src = os.path.abspath(os.path.join(here, '..'))

    ignore_paths = [
        os.path.join(src, 'integration_test'),
        os.path.join(src, 'setup.py'),
        os.path.join(src, 'process_changelog.py'),
        os.path.join(src, 'recipyGui', 'tests'),
        os.path.join(src, 'recipyCommon', 'tests'),
        os.path.join(src, 'recipy', 'tests'),
    ]

    argv = [
        "-f",
        "-l",
        "-e",
        "-M",
        "-o", out,
        src,
    ] + ignore_paths

    print(' '.join(argv))

    try:
        # Sphinx 1.7+
        from sphinx.ext import apidoc
        apidoc.main(argv)
    except ImportError:
        # Sphinx 1.6 (and earlier)
        from sphinx import apidoc
        argv.insert(0, apidoc.__file__)
        apidoc.main(argv) 
开发者ID:recipy,项目名称:recipy,代码行数:36,代码来源:conf.py

示例14: sphinx_api_build

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def sphinx_api_build(source_directory, out_directory):
    """

    :param source_directory:
    :param out_directory:
    :return:
    """

    # delete files of old build
    if os.path.exists(out_directory):
        shutil.rmtree(out_directory)

    apidoc.main(argv=['', '-o', out_directory, source_directory]) 
开发者ID:Trilarion,项目名称:imperialism-remake,代码行数:15,代码来源:build_documentation.py

示例15: gen

# 需要导入模块: from sphinx import apidoc [as 别名]
# 或者: from sphinx.apidoc import main [as 别名]
def gen():
    apidoc.main(["sphinx-autodoc-script.py", "-o", ".", "-f", "--no-toc", join("..", "..", "golismero")])
    with open("index.rst", "wb") as f:
        f.write(index) 
开发者ID:blackye,项目名称:luscan-devel,代码行数:6,代码来源:gen.py


注:本文中的sphinx.apidoc.main方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。