clean up logging + move to magick

This commit is contained in:
2025-07-12 12:47:46 -07:00
parent b9ad37d6ef
commit b119c73610

5
pub.py
View File

@@ -55,7 +55,6 @@ def current_keys():
def upload_file(filename, overwrite=True): def upload_file(filename, overwrite=True):
if not overwrite and filename in current_keys(): if not overwrite and filename in current_keys():
print('Skipping existing key {}'.format(filename))
return return
print('Uploading {} to {}/{}'.format(filename, BUCKET, filename)) print('Uploading {} to {}/{}'.format(filename, BUCKET, filename))
@@ -101,11 +100,9 @@ def thumbnail_bench(src):
output = "img/bench/{}.{}.{}".format(filename, size, image_type) output = "img/bench/{}.{}.{}".format(filename, size, image_type)
if not os.path.exists(output): if not os.path.exists(output):
print("Thumbnailing {}...".format(output)) print("Thumbnailing {}...".format(output))
subprocess.run(["convert", "img/bench/{}".format(src), subprocess.run(["magick", "convert", "img/bench/{}".format(src),
"-resize", "{}x".format(size), "-resize", "{}x".format(size),
"-quality", "40", output], check=True) "-quality", "40", output], check=True)
else:
print("Thumbnail {} exists".format(output))
def make_bench(): def make_bench():
imgs = os.listdir('img/bench') imgs = os.listdir('img/bench')