|
|
|
|
|
|
|
|
shutil.copytree(style_path, 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): |
|
|
def generate_index(output_path, galleries): |
|
|
index_path = os.path.join(output_path, "index.html") |
|
|
index_path = os.path.join(output_path, "index.html") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("Generating style folder... ", end="") |
|
|
print("Generating style folder... ", end="") |
|
|
generate_style(output_path) |
|
|
generate_style(output_path) |
|
|
print("✔️") |
|
|
print("✔️") |
|
|
|
|
|
print("Generating scripts folder... ", end="") |
|
|
|
|
|
generate_scripts(output_path) |
|
|
|
|
|
print("✔️") |
|
|
print("Generating index file... ", end="") |
|
|
print("Generating index file... ", end="") |
|
|
generate_index(output_path, galleries) |
|
|
generate_index(output_path, galleries) |
|
|
print("✔️") |
|
|
print("✔️") |