Compare commits
2 Commits
7013c5b0a0
...
6a5d57915f
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a5d57915f | |||
| c9145e6106 |
5
2025/d01.py
Normal file
5
2025/d01.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from lib import get_data
|
||||||
|
|
||||||
|
data = get_data(__file__)
|
||||||
|
print(data)
|
||||||
|
|
||||||
1
2025/lib.py
Symbolic link
1
2025/lib.py
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../lib.py
|
||||||
2
lib.py
2
lib.py
@@ -276,7 +276,7 @@ def extract_year_and_date(scriptname) -> tuple[str, str]:
|
|||||||
def get_data(filename):
|
def get_data(filename):
|
||||||
path, file = os.path.split(filename)
|
path, file = os.path.split(filename)
|
||||||
year = path[-4:]
|
year = path[-4:]
|
||||||
day = file.replace("d", "").replace(".py", "")
|
day = file.replace("d0", "").replace("d", "").replace(".py", "")
|
||||||
txt_file = f"d{day}.txt"
|
txt_file = f"d{day}.txt"
|
||||||
|
|
||||||
if os.path.isfile(txt_file):
|
if os.path.isfile(txt_file):
|
||||||
|
|||||||
Reference in New Issue
Block a user