From 6a5d57915ffcff83f8cfc4970f522fb5a854b7a0 Mon Sep 17 00:00:00 2001 From: Felix Martin Date: Sat, 13 Dec 2025 20:27:47 -0500 Subject: [PATCH] Setup for 2025 --- 2025/d01.py | 5 +++++ 2025/lib.py | 1 + lib.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 2025/d01.py create mode 120000 2025/lib.py diff --git a/2025/d01.py b/2025/d01.py new file mode 100644 index 0000000..5cfc6fd --- /dev/null +++ b/2025/d01.py @@ -0,0 +1,5 @@ +from lib import get_data + +data = get_data(__file__) +print(data) + diff --git a/2025/lib.py b/2025/lib.py new file mode 120000 index 0000000..c1b5c82 --- /dev/null +++ b/2025/lib.py @@ -0,0 +1 @@ +../lib.py \ No newline at end of file diff --git a/lib.py b/lib.py index ef421f8..475c62b 100644 --- a/lib.py +++ b/lib.py @@ -276,7 +276,7 @@ def extract_year_and_date(scriptname) -> tuple[str, str]: def get_data(filename): path, file = os.path.split(filename) year = path[-4:] - day = file.replace("d", "").replace(".py", "") + day = file.replace("d0", "").replace("d", "").replace(".py", "") txt_file = f"d{day}.txt" if os.path.isfile(txt_file):