コード例 #1
0
ファイル: hooks.py プロジェクト: chripo/acrylamid
def advanced(pool, pattern, force, normalize, action, translate, ns, path):
    """
    :param force: re-run task even when the source has not been modified
    :param pattern: a regular expression to match the original path
    :param func: function to run
    :param translate: path translation, e.g. /images/*.jpg -> /images/thumbs/*.jpg
    """
    if not re.match(pattern, normalize(path), re.I):
        return

    if force or modified(path, translate(path)):
        if isinstance(action, string_types):
            action = partial(run, action)
        pool.add_task(action, ns, path, translate(path))
    else:
        log.skip('skip  %s', translate(path))
コード例 #2
0
ファイル: hooks.py プロジェクト: ra2003/acrylamid
def advanced(pool, pattern, force, normalize, action, translate, ns, path):
    """
    :param force: re-run task even when the source has not been modified
    :param pattern: a regular expression to match the original path
    :param func: function to run
    :param translate: path translation, e.g. /images/*.jpg -> /images/thumbs/*.jpg
    """
    if not re.match(pattern, normalize(path), re.I):
        return

    if force or modified(path, translate(path)):
        if isinstance(action, string_types):
            action = partial(execute, action)
        pool.add_task(action, ns, path, translate(path))
    else:
        log.skip('skip  %s', translate(path))
コード例 #3
0
ファイル: helpers.py プロジェクト: zeitschlag/acrylamid
 def identical(self, path):
     log.skip("identical  %s", path)
コード例 #4
0
ファイル: helpers.py プロジェクト: zeitschlag/acrylamid
 def skip(self, path):
     log.skip("skip  %s", path)
コード例 #5
0
ファイル: helpers.py プロジェクト: MagicSword/acrylamid
 def identical(self, path):
     """:param path: path"""
     log.skip("identical  %s", path)
コード例 #6
0
ファイル: helpers.py プロジェクト: MagicSword/acrylamid
 def skip(self, path):
     """:param path: path"""
     log.skip("skip  %s", path)
コード例 #7
0
 def identical(self, path):
     """:param path: path"""
     log.skip("identical  %s", path)
コード例 #8
0
 def skip(self, path):
     """:param path: path"""
     log.skip("skip  %s", path)