This commit is contained in:
dovbaeb committed 2026-11-06 11:42:52 +01:00
1 parent f16a20c580
commit e7d74c85ec
1 file changed
+6 -6
+6 -6
View File
@@ -34,8 +34,7 @@ def upload_folder():
if folder_path:
global image_files
if not any(
f.lower().endswith((".png", ".jpg", ".jpeg", ".bmp", ".gif"))
for f in listdir(folder_path)
f.lower().endswith((".png", ".jpg", ".jpeg")) for f in listdir(folder_path)
):
popup = tk.Toplevel(parent)
popup.title("Attention")
@@ -48,11 +47,12 @@ def upload_folder():
image_files = [
f
for f in listdir(folder_path)
if f.lower().endswith((".png", ".jpg", ".jpeg", ".bmp", ".gif"))
if f.lower().endswith((".png", ".jpg", ".jpeg"))
]
print(f" {len(image_files)} images trouvées dans {folder_path}:")
for image_file in image_files:
print(image_file)
print(image_files)
open_button.pack_forget()
@@ -65,9 +65,9 @@ def upload_folder():
popup.after(2000, popup.destroy)
def order_pages():
global image_files
image_files.sort(key=lambda x: int(x.split(".")[0]))
# def order_pages():
# global image_files
# image_files.sort(key=lambda x: int(x.split(".")[0]))
# d'abord faire un dialogue →