aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Powers <mark@marks.kitchen>2020-11-14 20:09:18 -0600
committerMark Powers <mark@marks.kitchen>2020-11-14 20:09:18 -0600
commite068a64994353437bbf0adb2eea63147ca4d7b5a (patch)
tree68c14c634d010a7f9e9d4f15a9e5f15965d8d984
parent0e58fb890c9b9afe5e438f97c29b6334c0164eda (diff)
Remove leading 0 from Thoreau date
-rw-r--r--on_this_day.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/on_this_day.py b/on_this_day.py
index ca0f8e5..ff4d31d 100644
--- a/on_this_day.py
+++ b/on_this_day.py
@@ -76,9 +76,10 @@ def get_thoreau():
year_int = int(date.today().strftime("%Y")) - 183
year = str(year_int)
year_stop = str(year_int+1)
- month_day1 = date.today().strftime("_%b %d._")
- month_day2 = date.today().strftime("_%b. %d._")
- with open("journal1.txt") as f:
+ month_day1 = date.today().strftime("_%b %-d._")
+ month_day2 = date.today().strftime("_%b. %-d._")
+ filename = config["thoreau"]["journal1"]
+ with open(filename) as f:
lines = f.readlines()
# Find lines that the year lies on