add: loading bar on regen
This commit is contained in:
parent
26c60c5216
commit
c7c2cf6409
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user