Добавление патча сжатия png, обновление документации

This commit is contained in:
2025-08-28 12:56:50 +03:00
parent 99ef353500
commit 73fa374423
12 changed files with 151 additions and 28 deletions
+5 -3
View File
@@ -1,4 +1,6 @@
# Remove unnecessary files
"""Remove unnecessary files"""
priority = 0
from tqdm import tqdm
import os
import shutil
@@ -9,9 +11,9 @@ def apply(config: dict) -> bool:
if os.path.isfile(item_path):
os.remove(item_path)
print(f'Удалён файл: {item_path}')
tqdm.write(f'Удалён файл: {item_path}')
elif os.path.isdir(item_path):
if item not in config["cleanup"]["keep_dirs"]:
shutil.rmtree(item_path)
print(f'Удалена папка: {item_path}')
tqdm.write(f'Удалена папка: {item_path}')
return True