From 123d986f471990da7d2cdbdc5c3ee3933c4d1688 Mon Sep 17 00:00:00 2001 From: Artemy Date: Tue, 18 Apr 2023 13:21:35 +0300 Subject: [PATCH] fix: tqdm for bulk --- processing/bulk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/processing/bulk.py b/processing/bulk.py index 62f685d..ee242f3 100644 --- a/processing/bulk.py +++ b/processing/bulk.py @@ -2,6 +2,7 @@ import ffmpeg import os from processing.utils import generate_name, get_date_text, generate_name_with_file_name from methods.bulk_methods import methods_funcs +from tqdm import tqdm def images_to_video( @@ -30,12 +31,11 @@ def video_to_images(video_path, img_ext): def bulk_processing(directory, out_directory, method): - date = get_date_text() - run_bulk(methods_funcs[method], directory, out_directory, date) + run_bulk(methods_funcs[method], directory, out_directory, get_date_text()) def run_bulk(func, directory, out_directory, date): - for file in os.listdir(directory): + for file in tqdm(os.listdir(directory)): img = func(os.path.join(directory, file)) if out_directory: img_out_path = os.path.join(out_directory, file)