소스 검색

added function that opens all tasks without notes

master
Wouter Horlings 6 년 전
부모
커밋
a0de3c9df2
2개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +9
    -0
      myTodoist.py
  2. +1
    -0
      taskcheck.py

+ 9
- 0
myTodoist.py 파일 보기

@@ -49,6 +49,8 @@ class TodoProject:
self.project == None
self.items = TodoItemList(None,self.api)

##@brief synchronize data from Todoist with the api object.
# @return response of server
def sync(self):
return self.api.sync()

@@ -67,6 +69,13 @@ class TodoProject:
self.sendnotification("TASKS","There is one task over due!")
elif _overdueItems>1:
self.sendnotification("TASKS","There are " + str(_overdueItems) + " tasks over due!")

def openTasksWithoutNotes(self):
for item in self.items.itemsClosedWithoutNotes():
item_handle = item.api.items.get_by_id(item.id)
item_handle.uncomplete()
self.api.commit()

def sendnotification(self,title,body):
Application = Gio.Application.new("todoist.tasks", Gio.ApplicationFlags.FLAGS_NONE)


+ 1
- 0
taskcheck.py 파일 보기

@@ -12,6 +12,7 @@ def main():
todoist.checktaskstoday(3)
todoist.checkTasksWithoutNotes()
todoist.checkTasksOverDue()
todoist.openTasksWithoutNotes()





불러오는 중...
취소
저장