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


Python Config.lilypond_font_roots方法代码示例

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


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

示例1: _check

# 需要导入模块: from util.config import Config [as 别名]
# 或者: from util.config.Config import lilypond_font_roots [as 别名]
    def _check(self):
        """
        Determine the necessary actions for the font,
        returning a dictionary with boolean values
        """

        # shortcut
        r = self._actions

        # download archive if
        # - font not declared locally
        # - remote is newer
        # - archive is missing locally
        r['download'] = False
        if not Config.local():
            r['download'] = True if (self._local_version == '0' or
                                 self._remote_newer() or
                                 not self._archive_present()) else False

        # extract archive if
        # - it (a new one) was downloaded
        # - the archive is present but not the target font directory
        r['extract'] = True if (r['download'] or
                                (self._archive_present() and not
                                    self._font_dir_present())) else False

        # the font is considered up to date if
        # - it doesn't have to be downloaded or extracted
        # - the font repo matches the links in the installation
        if (r['download'] or r['extract']):
            r['update_links'] = Config.lilypond_font_roots()
        else:
            r['update_links'] = []
            for l in Config.lilypond_font_roots():
                if not self._check_links(l):
                    r['update_links'].append(l)

        self._up_to_date = False if (r['download'] or
            r['extract'] or
            r['update_links']) else True
开发者ID:fedelibre,项目名称:lily-fonts,代码行数:42,代码来源:font.py


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