ソースを参照

Do not regenerate existing photos

master
Marien Fressinaud 5年前
コミット
3955dcaf0f
1個のファイルの変更4行の追加2行の削除
  1. 4
    2
      boop.py

+ 4
- 2
boop.py ファイルの表示

@@ -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):

読み込み中…
キャンセル
保存