Browse Source

feat: more verbose logs

Signed-off-by: QuentinN42 <quentin@lieumont.fr>
master
QuentinN42 5 months ago
parent
commit
b57565c2b2
Signed by untrusted user: number42 GPG Key ID: 2CD7D563712B3A50
  1. 13
      builder/__main__.py

13
builder/__main__.py

@ -45,6 +45,7 @@ def process_templates() -> None:
args = get_arguments()
files = get_files_to_process()
for file in files:
print(f'┃ Templating {file}...')
write_output(
render(
file,
@ -63,18 +64,26 @@ def process_static() -> None:
"""Copy all static files."""
mkdir(OUT_DIR + STATIC_FOLDER)
for file in list_static_files():
shutil.copy(STATIC_FOLDER + file, OUT_DIR + STATIC_FOLDER + file)
print(f'┃ Copying {file}...')
shutil.copytree(STATIC_FOLDER + file, OUT_DIR + STATIC_FOLDER + file)
def main():
"""Script entrypoint."""
print('┏ Clearing output directory...')
try:
shutil.rmtree(OUT_DIR)
print('┃ Output directory deleted.')
except FileNotFoundError:
pass
print('┃ Output directory does not exist.')
mkdir(OUT_DIR)
print('┗ Done.')
print('┏ Processing templates...')
process_templates()
print('┗ Done.')
print('┏ Copying static files...')
process_static()
print('┗ Done.')
if __name__ == "__main__":

Loading…
Cancel
Save