本文整理汇总了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