From c7c2cf6409acd8548299e45b9bb152ea4bbe9246 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Tue, 6 May 2025 23:11:54 +0200 Subject: [PATCH] add: loading bar on regen --- src/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 101eeb0..f60b2ad 100644 --- a/src/main.py +++ b/src/main.py @@ -99,12 +99,15 @@ def gen_bulk(bulk_path: Path): def regen(bulk_path: Path, is_thumb: bool, is_small: bool): - for page in scan_pages(bulk_path.get_dirs()): + pages: list[BulkPage] = scan_pages(bulk_path.get_dirs()) + with Bar("Generating albums...", max=len(pages)) as bar: + for page in pages: for picture in page.get_pictures(): if is_thumb: picture.gen_thumb() if is_small: picture.gen_small() + bar.next() def gen_home(site_path: Path) -> None: home_path = Path(site_path, "index.html")