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