瀏覽代碼

een aantal excepties toegevoegd voor missende bestanden en blijkbaar missende taken

master
Wouter Horlings 5 年之前
父節點
當前提交
e5e35fabe0
共有 3 個檔案被更改,包括 8 行新增4 行删除
  1. +5
    -1
      createfile.py
  2. +1
    -1
      myTodoist.py
  3. +2
    -2
      taskcheck.py

+ 5
- 1
createfile.py 查看文件

@@ -1,11 +1,15 @@
from datetime import date from datetime import date
from os import path


def createfile(): def createfile():
filenames = ["1Start","2Middle","3End"] filenames = ["1Start","2Middle","3End"]
todaystr = date.today().strftime("%y%m%d") todaystr = date.today().strftime("%y%m%d")
if date.today().weekday() < 5: if date.today().weekday() < 5:
for filename in filenames: for filename in filenames:
with open("journal/"+todaystr+"_"+filename,"w") as fh:
try:
with open("journal/"+todaystr+"_"+filename,"x") as fh:
pass
except:
pass pass


if __name__ == '__main__': if __name__ == '__main__':


+ 1
- 1
myTodoist.py 查看文件

@@ -125,7 +125,7 @@ class TodoItemList:
try: try:
self.items_by_id.get(str(todoNote.item_id)).addNote(todoNote) self.items_by_id.get(str(todoNote.item_id)).addNote(todoNote)
except: except:
continue
pass




##@brief magic method definition to so this object can be used as a list. ##@brief magic method definition to so this object can be used as a list.


+ 2
- 2
taskcheck.py 查看文件

@@ -11,8 +11,8 @@ def main():
# return # return
todoist = TodoProject("Master Assignment") todoist = TodoProject("Master Assignment")
# getattr(todoist, sys.argv[1])() # getattr(todoist, sys.argv[1])()
todoist.checktaskstoday(3)
todoist.checkTasksWithoutNotes()
# todoist.checktaskstoday(3)
# todoist.checkTasksWithoutNotes()
todoist.checkTasksOverDue() todoist.checkTasksOverDue()
todoist.openTasksWithoutNotes() todoist.openTasksWithoutNotes()
error = logcheck.logcheck() error = logcheck.logcheck()


Loading…
取消
儲存