Add new test mode.

This commit is contained in:
Hermann Kraus 2012-08-21 21:23:05 +02:00
parent abc59d2202
commit 020e79f53b

View file

@ -86,14 +86,23 @@ if __name__ == "__main__":
else:
quiet = False
if len(sys.argv) == 2:
files = [{"name": sys.argv[1], "sizes": sizes_few_square}]
print len(sys.argv)
if len(sys.argv) <= 1:
active = files
elif len(sys.argv) == 2:
active = [{"name": sys.argv[1], "sizes": sizes_few_square}]
elif len(sys.argv) > 2:
files = []
for name in sys.argv[1:]:
files.append({"name": name})
active = []
if sys.argv[1] == "-s":
name = sys.argv[2]
for f in files:
if f['name'] == name:
active.append(f)
else:
for name in sys.argv[1:]:
active.append({"name": name})
for f in active:
config = dict(defaults)
config.update(f)
for size in config['sizes']: