From 43a511094da107141c574b541c5c48935a0a9002 Mon Sep 17 00:00:00 2001 From: timo Date: Mon, 6 Nov 2023 13:01:35 +0100 Subject: [PATCH] Add folder path check --- tools/generate_stammtisch_events.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/generate_stammtisch_events.py b/tools/generate_stammtisch_events.py index 5c6c7a1..07b298b 100644 --- a/tools/generate_stammtisch_events.py +++ b/tools/generate_stammtisch_events.py @@ -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)