This commit is contained in:
penner 2023-10-31 21:23:34 +00:00
parent 84c5467edb
commit aaa12683c8

View file

@ -1,3 +1,4 @@
import re
from datetime import date from datetime import date
from io import BytesIO from io import BytesIO
from typing import cast from typing import cast
@ -91,8 +92,14 @@ async def get_all_image_names(
Bilder "auto" und "manual" zu Tagen zuordnen Bilder "auto" und "manual" zu Tagen zuordnen
""" """
# TODO penner __DIR = "/images_manual"
# "manual"-Bilder erkennen (hier neue variable anlegen) __RE = re.compile(r"\.jpg$", flags=re.IGNORECASE)
manual_image_names = await WebDAV.list_files(directory=__DIR, regex=__RE)
for name in manual_image_names:
zahl = int(__RE.sub(string=name, repl=""))
auto_image_names[zahl] = f"{__DIR}/{name}"
return auto_image_names return auto_image_names