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


Python apidoc.main方法代碼示例

本文整理匯總了Python中sphinx.ext.apidoc.main方法的典型用法代碼示例。如果您正苦於以下問題:Python apidoc.main方法的具體用法?Python apidoc.main怎麽用?Python apidoc.main使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sphinx.ext.apidoc的用法示例。


在下文中一共展示了apidoc.main方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.apidoc import main [as 別名]
def run_apidoc(_):
    """This method is required by the setup method below."""
    import os
    dirname = os.path.dirname(__file__)
    ignore_paths = [os.path.join(dirname, '../../aaf2/model'),]
    # https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/apidoc.py
    argv = [
        '--force',
        '--no-toc',
        '--separate',
        '--module-first',
        '--output-dir',
        os.path.join(dirname, 'api'),
        os.path.join(dirname, '../../aaf2'),
     ] + ignore_paths

    from sphinx.ext import apidoc
    apidoc.main(argv) 
開發者ID:markreidvfx,項目名稱:pyaaf2,代碼行數:20,代碼來源:conf.py

示例6: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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.ext import apidoc [as 別名]
# 或者: from sphinx.ext.apidoc import main [as 別名]
def run_apidoc(_):
    sys.path.insert(0, apidoc_output_folder)

    # delete api-doc files before generating them
    if os.path.exists(apidoc_output_folder):
        shutil.rmtree(apidoc_output_folder)

    for pkg in PACKAGES:
        argv = ['-e',
                '-o', apidoc_output_folder,
                os.path.join(PATH_ROOT, pkg),
                '**/test_*',
                '--force',
                '--private',
                '--module-first']

        apidoc.main(argv) 
開發者ID:PyTorchLightning,項目名稱:pytorch-lightning,代碼行數:19,代碼來源:conf.py

示例10: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.apidoc import main [as 別名]
def run_apidoc(_):
    import os
    import sys
    from sphinx.ext import apidoc


    sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
    cur_dir = os.path.abspath(os.path.dirname(__file__))
    module = '../elektronn3'
    output_path = os.path.join(cur_dir, 'source')

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

    apidoc.main(argv)  # Requires sphinx>=1.7.1 
開發者ID:ELEKTRONN,項目名稱:elektronn3,代碼行數:23,代碼來源:conf.py

示例11: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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

示例12: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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

示例13: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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

示例14: RunSphinxAPIDoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.apidoc import main [as 別名]
def RunSphinxAPIDoc(app):
  """Runs sphinx-apidoc to auto-generate documentation.

  Args:
    app (sphinx.application.Sphinx): Sphinx application. Required by the
        the Sphinx event callback API.
  """
  current_directory = os.path.abspath(os.path.dirname(__file__))
  module_path = os.path.join(current_directory, '..', 'plaso')
  api_directory = os.path.join(current_directory, 'sources', 'api')
  apidoc.main(['-o', api_directory, module_path, '--force']) 
開發者ID:log2timeline,項目名稱:plaso,代碼行數:13,代碼來源:conf.py

示例15: run_apidoc

# 需要導入模塊: from sphinx.ext import apidoc [as 別名]
# 或者: from sphinx.ext.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


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