From e9c2e4d6fa49205b2bdfb20eac2d6d19ed520c65 Mon Sep 17 00:00:00 2001 From: arkohut <39525455+arkohut@users.noreply.github.com> Date: Sat, 14 Sep 2024 18:48:17 +0800 Subject: [PATCH] feat(command): list folders scannning --- memos/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/memos/commands.py b/memos/commands.py index 0809332..e87b694 100644 --- a/memos/commands.py +++ b/memos/commands.py @@ -157,7 +157,7 @@ async def loop_files(library_id, folder, folder_path, force, plugins): tasks = [] for root, _, files in os.walk(folder_path): with tqdm( - total=len(files), desc=f"Scanning {folder_path}", leave=False + total=len(files), desc=f"Scanning {root}", leave=True ) as pbar: candidate_files = [] for file in files: @@ -309,6 +309,7 @@ async def loop_files(library_id, folder, folder_path, force, plugins): ) ) pbar.update(len(batch)) + pbar.set_postfix({"Candidates": len(tasks)}, refresh=True) # Process all tasks after they've been created for future in tqdm(