|
|
@@ -28,7 +28,8 @@ def list_galleries_in(path): |
|
|
|
gallery = { |
|
|
|
"name": gallery_dir.name, |
|
|
|
"path": gallery_dir.path, |
|
|
|
"url": gallery_dir.name, |
|
|
|
"output_path": gallery_dir.name, |
|
|
|
"url": f"{gallery_dir.name}.html", |
|
|
|
"num_photos": len(photos), |
|
|
|
"photos": photos, |
|
|
|
"cover_photo": photos[cover_index], |
|
|
@@ -93,7 +94,7 @@ def generate_gallery(output_path, gallery): |
|
|
|
|
|
|
|
|
|
|
|
def generate_gallery_index(output_path, gallery): |
|
|
|
gallery_index_path = os.path.join(output_path, f"{gallery['name']}.html") |
|
|
|
gallery_index_path = os.path.join(output_path, f"{gallery['url']}") |
|
|
|
|
|
|
|
theme_path = os.path.join(os.curdir, THEME) |
|
|
|
jinja_env = Environment( |
|
|
@@ -113,7 +114,7 @@ def generate_gallery_index(output_path, gallery): |
|
|
|
|
|
|
|
|
|
|
|
def generate_gallery_dir(output_path, gallery): |
|
|
|
gallery_output_path = os.path.join(output_path, gallery["name"]) |
|
|
|
gallery_output_path = os.path.join(output_path, gallery["output_path"]) |
|
|
|
if not os.path.isdir(gallery_output_path): |
|
|
|
os.mkdir(gallery_output_path) |
|
|
|
|