Browse Source

Add support for scripts

master
Marien Fressinaud 5 years ago
parent
commit
db087f39b8
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      boop.py

+ 11
- 0
boop.py View File

@@ -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…
Cancel
Save