Example #1
0
 def add(self, text, created=None):
     # created = created or str(time()).replace('.', '-')
     newitem = {
         'title': text,
     }
     # self.items[created] = newitem
     quickstart.save_g_task(newitem, 'maybe_someday')
Example #2
0
 def add(self, text, created=None):
     """Add new Inbox item."""
     # created = created or str(time()).replace('.', '-')
     item = {
         'title': text,
     }
     # self.items[created] = item
     quickstart.save_g_task(item, 'inbox')
Example #3
0
 def add(self, text, title=None, created=None, next_actions=[]):
     # created = created or str(time()).replace('.', '-')
     pp = pprint.PrettyPrinter()
     newitem = {
         'title': text,
         'notes': pp.pprint(next_actions) if next_actions else ''
     }
     if title:
         newitem['title'] = f'[{title}] ' + text
     # self.items.append(newitem)
     quickstart.save_g_task(newitem, 'projects')
Example #4
0
 def save_all_g_tasks(self):
     print('about to save g tasks')
     list = 'next_actions'
     for _, item in self.d[list].items.items():
         print('saving item...')
         print(item['text'])
         # due = parser.parse(item['due']).isoformat() + '-04:00'
         task = {
             'title': item['text']
             # 'title': item['text'] + ' from ' + item['who']
         }
         quickstart.save_g_task(task, list)
Example #5
0
 def add(self, text, who=None, due=None, created=None):
     created = created or str(time()).replace('.', '-')
     try:
         due = due.isoformat()
     except TypeError:
         pass
     newitem = {
         'title': text + ' from ' + who,
     }
     if due:
         newitem['due'] = due
     # self.items[created] = newitem
     quickstart.save_g_task(newitem, 'waiting_for')
Example #6
0
 def add(self, text, created):
     # created = created or str(time()).replace('.', '-')
     newitem = {'title': text}
     # self.items[created] = newitem
     quickstart.save_g_task(newitem, 'next_actions')