ソースを参照

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()





読み込み中…
キャンセル
保存