Giter VIP home page Giter VIP logo

mytasks's People

Contributors

parezcoydigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mytasks's Issues

Tasks not showing

I upgraded to the newest version of your script:

  • All list show up but Lists with no Tasks show up with only the listname
  • Lists with Tasks there is printed "No Tasks"

No handlers could be found for logger "oauth2client.client" Authentication has failed: invalid_client

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

Multiple indentation is not displayed

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.'

Add ability to specify time for a new task

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.