Kaynağa Gözat

Add support for scripts

master
Marien Fressinaud 5 yıl önce
ebeveyn
işleme
db087f39b8
1 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 11
    0
      boop.py

+ 11
- 0
boop.py Dosyayı Görüntüle

@@ -120,6 +120,14 @@ def generate_style(output_path):
shutil.copytree(style_path, style_output_path)


def generate_scripts(output_path):
scripts_path = os.path.join(os.curdir, THEME, "scripts")
scripts_output_path = os.path.join(output_path, "scripts")
if os.path.isdir(scripts_output_path):
shutil.rmtree(scripts_output_path)
shutil.copytree(scripts_path, scripts_output_path)


def generate_index(output_path, galleries):
index_path = os.path.join(output_path, "index.html")

@@ -253,6 +261,9 @@ def main():
print("Generating style folder... ", end="")
generate_style(output_path)
print("✔️")
print("Generating scripts folder... ", end="")
generate_scripts(output_path)
print("✔️")
print("Generating index file... ", end="")
generate_index(output_path, galleries)
print("✔️")

Loading…
İptal
Kaydet