Bläddra i källkod

Fix generation of output

master
Marien Fressinaud 6 år sedan
förälder
incheckning
b29c985a39
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3
    2
      boop.py

+ 3
- 2
boop.py Visa fil

@@ -52,7 +52,6 @@ def list_photos_in(gallery_dir):

def generate_output_dir():
output_path = os.path.join(os.curdir, OUTPUT_DIR_NAME)
shutil.rmtree(output_path)
if not os.path.isdir(output_path):
os.mkdir(output_path)
return output_path
@@ -61,6 +60,8 @@ def generate_output_dir():
def generate_style(output_path):
style_path = os.path.join(os.curdir, THEME, "style")
style_output_path = os.path.join(output_path, "style")
if os.path.isdir(style_output_path):
shutil.rmtree(style_output_path)
shutil.copytree(style_path, style_output_path)


@@ -101,7 +102,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"])
if os.path.isdir(gallery_output_path):
if not os.path.isdir(gallery_output_path):
os.mkdir(gallery_output_path)

for photo in gallery["photos"]:

Laddar…
Avbryt
Spara