feat: copy favicon to target dir

This commit is contained in:
thomasabishop 2024-11-17 15:34:44 +00:00
parent a0bdb0de99
commit 1e62e1ca7f
2 changed files with 10 additions and 5 deletions

1
.gitignore vendored
View file

@ -14,7 +14,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/

View file

@ -1,3 +1,4 @@
import glob
import shutil
from termcolor import colored
@ -16,12 +17,17 @@ def transfer_files(target_dir, source_dir):
# Copy images to /static
print(colored("INFO Copying static files...", "light_blue"))
shutil.copytree(
f"{source_dir}/img",
f"{target_dir}/static",
)
shutil.copytree(f"{source_dir}/img", f"{target_dir}/static", dirs_exist_ok=True)
print(colored("SUCCESS Static files transferred", "light_green"))
# Copy favicon
[
shutil.copy2(f, f"{target_dir}/static")
for f in glob.glob(
f"{source_dir}/.neuron-generator/templates/favicon/favicon*"
)
]
print(colored("INFO Copying zettels...", "light_blue"))
# Copy notes