• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python osutil.make_filename函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setup

def setup(app):
    # type: (Sphinx) -> Dict[unicode, Any]
    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_namespace', None, 'html', string_classes)
    app.add_config_value('qthelp_theme', 'nonav', 'html')
    app.add_config_value('qthelp_theme_options', {}, 'html')

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


示例17: setup

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

    # config values
    app.add_config_value('epub_basename', lambda self: make_filename(self.project), None)
    app.add_config_value('epub_version', 3.0, 'epub')  # experimental
    app.add_config_value('epub_theme', 'epub', 'epub')
    app.add_config_value('epub_theme_options', {}, 'epub')
    app.add_config_value('epub_title', lambda self: self.project, 'epub')
    app.add_config_value('epub_author', lambda self: self.author, 'epub')
    app.add_config_value('epub_language', lambda self: self.language or 'en', 'epub')
    app.add_config_value('epub_publisher', lambda self: self.author, 'epub')
    app.add_config_value('epub_copyright', lambda self: self.copyright, 'epub')
    app.add_config_value('epub_identifier', 'unknown', 'epub')
    app.add_config_value('epub_scheme', 'unknown', 'epub')
    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_css_files', lambda config: config.html_css_files, 'epub')
    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', 'epub')
    app.add_config_value('epub_use_index', lambda self: self.html_use_index, 'epub')
    app.add_config_value('epub_description', 'unknown', 'epub')
    app.add_config_value('epub_contributor', 'unknown', 'epub')
    app.add_config_value('epub_writing_mode', 'horizontal', 'epub',
                         ENUM('horizontal', 'vertical'))

    # event handlers
    app.connect('config-inited', convert_epub_css_files)
    app.connect('builder-inited', validate_config_values)

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


示例18: setup

def setup(app):
    # type: (Sphinx) -> None
    app.add_builder(LaTeXBuilder)
    app.connect('builder-inited', validate_config_values)

    app.add_config_value('latex_engine',
                         lambda self: 'pdflatex' if self.language != 'ja' else 'platex',
                         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', 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)

    japanese_default = {'manual': 'jsbook',
                        'howto': 'jreport'}
    app.add_config_value('latex_docclass',
                         lambda self: japanese_default if self.language == 'ja' else {},
                         None)
    # now deprecated - use latex_elements
    app.add_config_value('latex_preamble', '', None)

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


示例19: setup

def setup(app):
    app.add_config_value('mobi_basename',lambda self: make_filename(self.project), None)
    app.add_config_value('mobi_theme','mobi', 'html')
    app.add_config_value('mobi_title',lambda self: self.html_title, 'html')
    app.add_config_value('mobi_author','unknown', 'html')
    app.add_config_value('mobi_language',lambda self: self.language or 'en', 'html')
    app.add_config_value('mobi_publisher','unknown', 'html')
    app.add_config_value('mobi_copyright',lambda self: self.copyright, 'html')
    app.add_config_value('mobi_identifier','unknown', 'html')
    app.add_config_value('mobi_scheme','unknown', 'html')
    app.add_config_value('mobi_uid','unknown', 'env')
    app.add_config_value('mobi_cover',(), 'env')
    app.add_config_value('mobi_pre_files',[], 'env')
    app.add_config_value('mobi_post_files',[], 'env')
    app.add_config_value('mobi_exclude_files',[], 'env')
    app.add_config_value('mobi_tocdepth',3, 'env')
    app.add_config_value('mobi_tocdup',True, 'env')
    app.add_config_value('mobi_add_visible_links',True, 'env')

    app.add_builder(MobiBuilder)
开发者ID:Voronenko,项目名称:projectdocs,代码行数:20,代码来源:mobi.py


示例20: _get_epub_emissions

def _get_epub_emissions(env, target, srcinfo):
    epubPreFiles = srcinfo.config.get('epub_pre_files', [])
    epubPostFiles = srcinfo.config.get('epub_post_files', [])
    epubCover = srcinfo.config.get('epub_cover', (None, None))

    sources = []
    sources.extend(srcinfo.sources)
    sources.extend([srcinfo.srcroot.File(os_path(f[0])) for f in epubPreFiles])
    sources.extend([srcinfo.srcroot.File(os_path(f[0])) for f in epubPostFiles])
    if not (epubCover[0] is None or epubCover[0] == ''):
        sources.append(srcinfo.srcroot.File(os_path(epubCover[0])))
    if not (epubCover[1] is None or epubCover[1] == ''):
        sources.append(srcinfo.srcroot.File(os_path(epubCover[1])))

    t = srcinfo.config.get('epub_basename',
                        srcinfo.config.get('project',
                                         'Python'))

    targets = [target[0].File("%s.epub" % make_filename(t))]

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python osutil.os_path函数代码示例发布时间:2022-05-27
下一篇:
Python osutil.ensuredir函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap