Ver código fonte

Do not regenerate existing photos

master
Marien Fressinaud 6 anos atrás
pai
commit
3955dcaf0f
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4
    2
      boop.py

+ 4
- 2
boop.py Ver arquivo

@@ -109,10 +109,12 @@ def generate_gallery_dir(output_path, gallery):

for photo in gallery["photos"]:
photo_output_path = os.path.join(output_path, photo["url"])
shutil.copyfile(photo["path"], photo_output_path)
if not os.path.exists(photo_output_path):
shutil.copyfile(photo["path"], photo_output_path)

thumb_output_path = os.path.join(output_path, photo["thumb_url"])
generate_thumb_file(thumb_output_path, photo)
if not os.path.exists(thumb_output_path):
generate_thumb_file(thumb_output_path, photo)


def generate_thumb_file(output_path, photo):

Carregando…
Cancelar
Salvar