good night...
This commit is contained in:
@@ -18,7 +18,7 @@ def sort_pictures(images:list, dst:str, logger:logging.Logger):
|
||||
|
||||
print(f"Start sorting {image_total} images\n")
|
||||
progress_bar.start()
|
||||
start_timer = time.process_time()
|
||||
start_timer = time.time()
|
||||
for image in images:
|
||||
image:ExifData
|
||||
path = os.path.join(dst, str(image.make), str(image.year), str(image.month), str(image.day))
|
||||
@@ -27,13 +27,11 @@ def sort_pictures(images:list, dst:str, logger:logging.Logger):
|
||||
stat_info = os.stat(image.path)
|
||||
shutil.move(src=image.path, dst=f"{path}/{image.name}")
|
||||
# os.chmod(path=f"{path}/{image.name}", mode=stat_info.st_mode)
|
||||
# logging_infos.append(f"Moved {image.path} -> {path}/{image.name}")
|
||||
logger.info(f"Moved {image.path} -> {path}/{image.name}")
|
||||
|
||||
progress_bar.update(image_counter)
|
||||
image_counter += 1
|
||||
|
||||
end_timer = time.time()
|
||||
progress_bar.finish()
|
||||
print(f"\nDone\nSorted {image_total} images in {round(start_timer, 2)} seconds")
|
||||
print(f"\nDone\nSorted {image_total} images in {round(end_timer - start_timer, 2)} seconds")
|
||||
|
||||
return logging_infos
|
||||
|
||||
Reference in New Issue
Block a user