clean up logging + move to magick
This commit is contained in:
5
pub.py
5
pub.py
@@ -55,7 +55,6 @@ def current_keys():
|
||||
|
||||
def upload_file(filename, overwrite=True):
|
||||
if not overwrite and filename in current_keys():
|
||||
print('Skipping existing key {}'.format(filename))
|
||||
return
|
||||
|
||||
print('Uploading {} to {}/{}'.format(filename, BUCKET, filename))
|
||||
@@ -101,11 +100,9 @@ def thumbnail_bench(src):
|
||||
output = "img/bench/{}.{}.{}".format(filename, size, image_type)
|
||||
if not os.path.exists(output):
|
||||
print("Thumbnailing {}...".format(output))
|
||||
subprocess.run(["convert", "img/bench/{}".format(src),
|
||||
subprocess.run(["magick", "convert", "img/bench/{}".format(src),
|
||||
"-resize", "{}x".format(size),
|
||||
"-quality", "40", output], check=True)
|
||||
else:
|
||||
print("Thumbnail {} exists".format(output))
|
||||
|
||||
def make_bench():
|
||||
imgs = os.listdir('img/bench')
|
||||
|
||||
Reference in New Issue
Block a user