Add folder path check

This commit is contained in:
timo 2023-11-06 13:01:35 +01:00
parent 5a8b06e62c
commit 43a511094d

View file

@ -20,6 +20,9 @@ Es ist wieder Vereins-Stammtisch! Wie immer in allen ganzzahlig durch drei teilb
filename = f"{year}-{month:02d}-{day:02d}_n39_stammtisch.md"
file_path = os.path.join(folder_path, filename)
if not os.path.exists(folder_path):
os.makedirs(folder_path)
with open(file_path, 'w') as file:
file.write(markdown_content)