parezcoydigo / mytasks Goto Github PK
View Code? Open in Web Editor NEWa python command line script for google tasks
a python command line script for google tasks
I upgraded to the newest version of your script:
I'm getting this error message after entering the . Any thoughts?
Thanks
......
Jon-Schulls-MacBook-Pro-2:parezcoydigo-myTasks-06b9769 jonschull$ python myTasks.py
Go to the following link in your browser:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ftasks&redirect_uri=oob&response_type=code&client_id=128296334067.apps.googleusercontent.com&access_type=offline
Enter verification code: 4/xvtrM60qvQnUkVnR-9I9XWjbZ5mc
No handlers could be found for logger "oauth2client.client"
Authentication has failed: invalid_client
It would be nice if tasks with multiple parents (i.e., parents with parents) could be displayed with the correct indentation. I've implemented this using a nasty hack for up to three levels of indentation; it should be possible to make a recursive function to replace what I've written, which would allow any amount of indentation.
Here's my attempt, with each level of recursion manually written:
def tasks(listID):
tasks = service.tasks().list(tasklist=listID).execute()
try:
for task in tasks['items']:
if task['title'] == '': pass
else:
taskName=task['title']
if 'parent' in task.keys():
for maybeParent in tasks['items']:
if maybeParent['title'] == '': pass
else:
if maybeParent['id'] == task['parent']:
if 'parent' in maybeParent.keys():
for maybeParentsParent in tasks['items']:
if maybeParentsParent['title'] == '': pass
else:
if maybeParentsParent['id'] == maybeParent['parent']:
if 'parent' in maybeParentsParent.keys():
print ' '+'• '+task['title'].encode('utf-8')
break
else:
print ' '+'• '+task['title'].encode('utf-8')
break
else:
print ' '+'• '+task['title'].encode('utf-8')
break
else:
print '• '+task['title'].encode('utf-8')
except KeyError: print ' No tasks.'
Indented Task should be printed with a subnumber like :
It should be possible to export the list in .csv format.
Currently we can specify date, e.g.:
./myTasks.py -n "Tasks list" "task3" 2013-09-06
It would be good to specify also time for a new task, e.g.:
./myTasks.py -n "Tasks list" "task3" 2013-09-06 2013-09-06T10:11:12.000Z
User wants to select a mail message from Apple Mail Inbox and select some text/date to create a Task. Possible integration with Apple Mail ToDo items. (Automator / Applescript)
(Note: can imagine that this is out of scope of this script.)
List command should not give an error when list is empty
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.