You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
629 B
Python
20 lines
629 B
Python
3 months ago
|
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())
|
||
|
|