Add script for reviewing previous years’ activities

This commit is contained in:
mez 2024-08-25 16:34:59 +01:00
parent 3d283da0f7
commit e6043132f8
2 changed files with 28 additions and 5 deletions

19
otd.py Normal file
View file

@ -0,0 +1,19 @@
import datetime,os
year = int(datetime.datetime.strftime(datetime.datetime.today(),"%Y"))
monthstring = datetime.datetime.strftime(datetime.datetime.today(),"%m")
datestring = datetime.datetime.strftime(datetime.datetime.today(),"%d")
fileplace = "/home/mdd/Documents/drive/org/journal/"
thisyear = year
while year > 1993:
year -= 1
target = fileplace + str(year) + "/" + monthstring + "/" + str(year) + "-" + monthstring + "-" + datestring + ".org"
if os.path.exists(target):
if year < thisyear -1:
print("Press enter to continue")
input()
print(open(target,"r").read())