def command(target, sources): for quadkey in walk(): source = sources[len(quadkey)] source_file = source + quadkey + ".png" target_file = target + quadkey + ".png" print target_file, source_file copy(source_file, target_file)
def command(source, target, factor): for quadkey in walk(): source_file = source + quadkey + ".png" target_file = target + quadkey + ".png" if not isfile(source_file): continue print source_file, target_file darken.command(source_file, target_file, factor)
def command(a, b, target): for quadkey in walk(): a_file = a + quadkey + ".png" b_file = b + quadkey + ".png" target_file = target + quadkey + ".png" if not isfile(a_file) or not isfile(b_file): continue print target_file over.command(a_file, b_file, target_file)
#!/usr/bin/env python from tiles import walk import sys if len(sys.argv) > 1: scales = range(int(sys.argv[1])+1) else: scales = None for quadkey in walk(scales = scales): print quadkey