瀏覽代碼

Add support for scripts

master
Marien Fressinaud 5 年之前
父節點
當前提交
db087f39b8
共有 1 個檔案被更改,包括 11 行新增0 行删除
  1. 11
    0
      boop.py

+ 11
- 0
boop.py 查看文件

@@ -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…
取消
儲存