mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 00:03:07 +00:00
Todo 3
This commit is contained in:
parent
84c5467edb
commit
aaa12683c8
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue