Commit 8bc44bb5 authored by berumuron's avatar berumuron
Browse files

add: Display the generation time

parent 306c94ed
...@@ -4,6 +4,7 @@ import os ...@@ -4,6 +4,7 @@ import os
import sys import sys
import distutils.dir_util import distutils.dir_util
import locale import locale
import time
import boop.environment as environment import boop.environment as environment
import boop.configuration as config import boop.configuration as config
...@@ -15,6 +16,8 @@ locale.setlocale(locale.LC_ALL, "") ...@@ -15,6 +16,8 @@ locale.setlocale(locale.LC_ALL, "")
def main(environment): def main(environment):
start = time.perf_counter()
# Make sure ./_site folder is empty # Make sure ./_site folder is empty
output_path = os.path.join(os.curdir, "_site") output_path = os.path.join(os.curdir, "_site")
utils.init_output_folder(output_path) utils.init_output_folder(output_path)
...@@ -125,6 +128,9 @@ def main(environment): ...@@ -125,6 +128,9 @@ def main(environment):
distutils.dir_util.copy_tree(static_dirpath, output_path) distutils.dir_util.copy_tree(static_dirpath, output_path)
print(f"Static files copied") print(f"Static files copied")
ellapsed = time.perf_counter()
print(f"Generated in {ellapsed - start:.2f}s")
if __name__ == "__main__": if __name__ == "__main__":
environment = environment.load_from_argv(sys.argv) environment = environment.load_from_argv(sys.argv)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment