cleanup
This commit is contained in:
1 parent
f16a20c580
commit
e7d74c85ec
1 file changed
+6
-6
+6
-6
@@ -34,8 +34,7 @@ def upload_folder():
|
|||||||
if folder_path:
|
if folder_path:
|
||||||
global image_files
|
global image_files
|
||||||
if not any(
|
if not any(
|
||||||
f.lower().endswith((".png", ".jpg", ".jpeg", ".bmp", ".gif"))
|
f.lower().endswith((".png", ".jpg", ".jpeg")) for f in listdir(folder_path)
|
||||||
for f in listdir(folder_path)
|
|
||||||
):
|
):
|
||||||
popup = tk.Toplevel(parent)
|
popup = tk.Toplevel(parent)
|
||||||
popup.title("Attention")
|
popup.title("Attention")
|
||||||
@@ -48,11 +47,12 @@ def upload_folder():
|
|||||||
image_files = [
|
image_files = [
|
||||||
f
|
f
|
||||||
for f in listdir(folder_path)
|
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}:")
|
print(f" {len(image_files)} images trouvées dans {folder_path}:")
|
||||||
for image_file in image_files:
|
for image_file in image_files:
|
||||||
print(image_file)
|
print(image_file)
|
||||||
|
print(image_files)
|
||||||
|
|
||||||
open_button.pack_forget()
|
open_button.pack_forget()
|
||||||
|
|
||||||
@@ -65,9 +65,9 @@ def upload_folder():
|
|||||||
popup.after(2000, popup.destroy)
|
popup.after(2000, popup.destroy)
|
||||||
|
|
||||||
|
|
||||||
def order_pages():
|
# def order_pages():
|
||||||
global image_files
|
# global image_files
|
||||||
image_files.sort(key=lambda x: int(x.split(".")[0]))
|
# image_files.sort(key=lambda x: int(x.split(".")[0]))
|
||||||
|
|
||||||
|
|
||||||
# d'abord faire un dialogue →
|
# d'abord faire un dialogue →
|
||||||
|
|||||||
Reference in new issue
Block a user