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


Python osutil.make_filename函数代码示例

本文整理汇总了Python中sphinx.util.osutil.make_filename函数的典型用法代码示例。如果您正苦于以下问题:Python make_filename函数的具体用法?Python make_filename怎么用?Python make_filename使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: setup

def setup(app):
    app.setup_extension('sphinx.builders.html')
    app.add_builder(AppleHelpBuilder)

    app.add_config_value('applehelp_bundle_name',
                         lambda self: make_filename(self.project), 'applehelp')
    app.add_config_value('applehelp_bundle_id', None, 'applehelp', string_classes)
    app.add_config_value('applehelp_dev_region', 'en-us', 'applehelp')
    app.add_config_value('applehelp_bundle_version', '1', 'applehelp')
    app.add_config_value('applehelp_icon', None, 'applehelp', string_classes)
    app.add_config_value('applehelp_kb_product',
                         lambda self: '%s-%s' % (make_filename(self.project), self.release),
                         'applehelp')
    app.add_config_value('applehelp_kb_url', None, 'applehelp', string_classes)
    app.add_config_value('applehelp_remote_url', None, 'applehelp', string_classes)
    app.add_config_value('applehelp_index_anchors', False, 'applehelp', string_classes)
    app.add_config_value('applehelp_min_term_length', None, 'applehelp', string_classes)
    app.add_config_value('applehelp_stopwords',
                         lambda self: self.language or 'en', 'applehelp')
    app.add_config_value('applehelp_locale', lambda self: self.language or 'en', 'applehelp')
    app.add_config_value('applehelp_title', lambda self: self.project + ' Help', 'applehelp')
    app.add_config_value('applehelp_codesign_identity',
                         lambda self: environ.get('CODE_SIGN_IDENTITY', None),
                         'applehelp'),
    app.add_config_value('applehelp_codesign_flags',
                         lambda self: shlex.split(environ.get('OTHER_CODE_SIGN_FLAGS', '')),
                         'applehelp'),
    app.add_config_value('applehelp_indexer_path', '/usr/bin/hiutil', 'applehelp')
    app.add_config_value('applehelp_codesign_path', '/usr/bin/codesign', 'applehelp')
    app.add_config_value('applehelp_disable_external_tools', False, None)
开发者ID:LeoHuckvale,项目名称:sphinx,代码行数:30,代码来源:applehelp.py

示例2: setup

def setup(app):
    app.add_builder(TexinfoBuilder)

    app.add_config_value('texinfo_documents',
                         lambda self: [(self.master_doc, make_filename(self.project).lower(),
                                        self.project, '', make_filename(self.project),
                                        'The %s reference manual.' %
                                        make_filename(self.project),
                                        'Python')],
                         None)
    app.add_config_value('texinfo_appendices', [], None)
    app.add_config_value('texinfo_elements', {}, None)
    app.add_config_value('texinfo_domain_indices', True, None, [list])
    app.add_config_value('texinfo_show_urls', 'footnote', None)
    app.add_config_value('texinfo_no_detailmenu', False, None)
开发者ID:LeoHuckvale,项目名称:sphinx,代码行数:15,代码来源:texinfo.py

示例3: setup

def setup(app):
    app.add_builder(LaTeXBuilder)
    app.connect('builder-inited', validate_config_values)

    app.add_config_value('latex_documents',
                         lambda self: [(self.master_doc, make_filename(self.project) + '.tex',
                                        self.project, '', 'manual')],
                         None)
    app.add_config_value('latex_logo', None, None, string_classes)
    app.add_config_value('latex_appendices', [], None)
    app.add_config_value('latex_keep_old_macro_names', True, None)
    # now deprecated - use latex_toplevel_sectioning
    app.add_config_value('latex_use_parts', False, None)
    app.add_config_value('latex_toplevel_sectioning', None, None, [str])
    app.add_config_value('latex_use_modindex', True, None)  # deprecated
    app.add_config_value('latex_domain_indices', True, None, [list])
    app.add_config_value('latex_show_urls', 'no', None)
    app.add_config_value('latex_show_pagerefs', False, None)
    # paper_size and font_size are still separate values
    # so that you can give them easily on the command line
    app.add_config_value('latex_paper_size', 'letter', None)
    app.add_config_value('latex_font_size', '10pt', None)
    app.add_config_value('latex_elements', {}, None)
    app.add_config_value('latex_additional_files', [], None)
    app.add_config_value('latex_docclass', {}, None)
    # now deprecated - use latex_elements
    app.add_config_value('latex_preamble', '', None)
开发者ID:brechtm,项目名称:sphinx,代码行数:27,代码来源:latex.py

示例4: setup

def setup(app):
    app.setup_extension("sphinx.builders.html")
    app.add_builder(QtHelpBuilder)

    app.add_config_value("qthelp_basename", lambda self: make_filename(self.project), None)
    app.add_config_value("qthelp_theme", "nonav", "html")
    app.add_config_value("qthelp_theme_options", {}, "html")
开发者ID:TimKam,项目名称:sphinx,代码行数:7,代码来源:qthelp.py

示例5: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.setup_extension('sphinx.builders.html')
    app.add_builder(EpubBuilder)

    # config values
    app.add_config_value('epub_basename', lambda self: make_filename(self.project), None)
    app.add_config_value('epub_theme', 'epub', 'html')
    app.add_config_value('epub_theme_options', {}, 'html')
    app.add_config_value('epub_title', lambda self: self.html_title, 'html')
    app.add_config_value('epub_author', 'unknown', 'html')
    app.add_config_value('epub_language', lambda self: self.language or 'en', 'html')
    app.add_config_value('epub_publisher', 'unknown', 'html')
    app.add_config_value('epub_copyright', lambda self: self.copyright, 'html')
    app.add_config_value('epub_identifier', 'unknown', 'html')
    app.add_config_value('epub_scheme', 'unknown', 'html')
    app.add_config_value('epub_uid', 'unknown', 'env')
    app.add_config_value('epub_cover', (), 'env')
    app.add_config_value('epub_guide', (), 'env')
    app.add_config_value('epub_pre_files', [], 'env')
    app.add_config_value('epub_post_files', [], 'env')
    app.add_config_value('epub_exclude_files', [], 'env')
    app.add_config_value('epub_tocdepth', 3, 'env')
    app.add_config_value('epub_tocdup', True, 'env')
    app.add_config_value('epub_tocscope', 'default', 'env')
    app.add_config_value('epub_fix_images', False, 'env')
    app.add_config_value('epub_max_image_width', 0, 'env')
    app.add_config_value('epub_show_urls', 'inline', 'html')
    app.add_config_value('epub_use_index', lambda self: self.html_use_index, 'html')

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:Felix-neko,项目名称:sphinx,代码行数:35,代码来源:epub.py

示例6: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.add_builder(LaTeXBuilder)
    app.add_post_transform(CitationReferenceTransform)
    app.add_post_transform(MathReferenceTransform)
    app.connect('config-inited', validate_config_values)
    app.add_transform(FootnoteDocnameUpdater)

    app.add_config_value('latex_engine', default_latex_engine, None,
                         ENUM('pdflatex', 'xelatex', 'lualatex', 'platex'))
    app.add_config_value('latex_documents',
                         lambda self: [(self.master_doc, make_filename(self.project) + '.tex',
                                        self.project, '', 'manual')],
                         None)
    app.add_config_value('latex_logo', None, None, string_classes)
    app.add_config_value('latex_appendices', [], None)
    app.add_config_value('latex_use_latex_multicolumn', False, None)
    app.add_config_value('latex_use_xindy', default_latex_use_xindy, None)
    app.add_config_value('latex_toplevel_sectioning', None, None,
                         ENUM(None, 'part', 'chapter', 'section'))
    app.add_config_value('latex_domain_indices', True, None, [list])
    app.add_config_value('latex_show_urls', 'no', None)
    app.add_config_value('latex_show_pagerefs', False, None)
    app.add_config_value('latex_elements', {}, None)
    app.add_config_value('latex_additional_files', [], None)

    app.add_config_value('latex_docclass', default_latex_docclass, None)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:sam-m888,项目名称:sphinx,代码行数:33,代码来源:__init__.py

示例7: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.add_builder(LaTeXBuilder)
    app.connect('builder-inited', validate_config_values)

    app.add_config_value('latex_engine', default_latex_engine, None,
                         ENUM('pdflatex', 'xelatex', 'lualatex', 'platex'))
    app.add_config_value('latex_documents',
                         lambda self: [(self.master_doc, make_filename(self.project) + '.tex',
                                        self.project, '', 'manual')],
                         None)
    app.add_config_value('latex_logo', None, None, string_classes)
    app.add_config_value('latex_appendices', [], None)
    app.add_config_value('latex_keep_old_macro_names', False, None)
    app.add_config_value('latex_use_latex_multicolumn', False, None)
    app.add_config_value('latex_toplevel_sectioning', None, None, [str])
    app.add_config_value('latex_domain_indices', True, None, [list])
    app.add_config_value('latex_show_urls', 'no', None)
    app.add_config_value('latex_show_pagerefs', False, None)
    app.add_config_value('latex_elements', {}, None)
    app.add_config_value('latex_additional_files', [], None)

    app.add_config_value('latex_docclass', default_latex_docclass, None)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:nwf,项目名称:sphinx,代码行数:29,代码来源:latex.py

示例8: setup

def setup(app):
    app.add_builder(ManualPageBuilder)

    app.add_config_value('man_pages',
                         lambda self: [(self.master_doc, make_filename(self.project).lower(),
                                        '%s %s' % (self.project, self.release), [], 1)],
                         None)
    app.add_config_value('man_show_urls', False, None)
开发者ID:LeoHuckvale,项目名称:sphinx,代码行数:8,代码来源:manpage.py

示例9: setup

def setup(app):
    app.setup_extension('sphinx.builders.html')
    app.add_builder(HTMLHelpBuilder)

    app.add_config_value('htmlhelp_basename', lambda self: make_filename(self.project), None)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:Felix-neko,项目名称:sphinx,代码行数:11,代码来源:htmlhelp.py

示例10: _get_help_emissions

def _get_help_emissions(env, target, srcinfo, suffixes, basenameConfigKey='project'):
    basename = make_filename(
        srcinfo.config.get(basenameConfigKey, srcinfo.config['project']))

    sources = []
    sources.extend(srcinfo.sources)
    sources.extend(srcinfo.templates)
    sources.extend(srcinfo.statics)

    targets = [target[0].File(basename + s) for s in suffixes]

    return targets, sources
开发者ID:boostorg,项目名称:python,代码行数:12,代码来源:sphinx4scons.py

示例11: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.setup_extension('sphinx.builders.html')
    app.add_builder(DevhelpBuilder)

    app.add_config_value('devhelp_basename', lambda self: make_filename(self.project), None)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:mgeier,项目名称:sphinx,代码行数:12,代码来源:devhelp.py

示例12: setup

def setup(app: Sphinx) -> Dict[str, Any]:
    app.setup_extension('sphinx.builders.html')
    app.add_builder(DevhelpBuilder)
    app.add_message_catalog(__name__, path.join(package_dir, 'locales'))

    app.add_config_value('devhelp_basename', lambda self: make_filename(self.project), None)

    return {
        'version': __version__,
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:lmregus,项目名称:Portfolio,代码行数:12,代码来源:__init__.py

示例13: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.add_builder(TexinfoBuilder)

    app.add_config_value('texinfo_documents',
                         lambda self: [(self.master_doc, make_filename(self.project).lower(),
                                        self.project, '', make_filename(self.project),
                                        'The %s reference manual.' %
                                        make_filename(self.project),
                                        'Python')],
                         None)
    app.add_config_value('texinfo_appendices', [], None)
    app.add_config_value('texinfo_elements', {}, None)
    app.add_config_value('texinfo_domain_indices', True, None, [list])
    app.add_config_value('texinfo_show_urls', 'footnote', None)
    app.add_config_value('texinfo_no_detailmenu', False, None)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:LFYG,项目名称:sphinx,代码行数:22,代码来源:texinfo.py

示例14: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.setup_extension('sphinx.builders.html')
    app.add_builder(HTMLHelpBuilder)

    app.add_config_value('htmlhelp_basename', lambda self: make_filename(self.project), None)
    app.add_config_value('htmlhelp_file_suffix', None, 'html', string_classes)
    app.add_config_value('htmlhelp_link_suffix', None, 'html', string_classes)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:willingc,项目名称:sphinx,代码行数:14,代码来源:htmlhelp.py

示例15: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    app.add_builder(ManualPageBuilder)

    app.add_config_value('man_pages',
                         lambda self: [(self.master_doc, make_filename(self.project).lower(),
                                        '%s %s' % (self.project, self.release), [], 1)],
                         None)
    app.add_config_value('man_show_urls', False, None)

    return {
        'version': 'builtin',
        'parallel_read_safe': True,
        'parallel_write_safe': True,
    }
开发者ID:LFYG,项目名称:sphinx,代码行数:15,代码来源:manpage.py


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