Code Monkey home page Code Monkey logo

tod0's People

Contributors

dependabot[bot] avatar devzeb avatar eight04 avatar kiblee avatar saskiakeil avatar shejialuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

tod0's Issues

Getting Key error 'value' while running

Running any command results in value error:

tod0
Traceback (most recent call last):
  File "c:\program files\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\user5\AppData\Roaming\Python\Python36\Scripts\tod0.exe\__main__.py", line 4, in <module>
  File "C:\Users\user5\AppData\Roaming\Python\Python36\site-packages\todocli\interface.py", line 80, in <module>
    load_folders()
  File "C:\Users\hamza\AppData\Roaming\Python\Python36\site-packages\todocli\interface.py", line 63, in load_folders
    folder_data = auth.list_and_update_folders()
  File "C:\Users\user5\AppData\Roaming\Python\Python36\site-packages\todocli\auth.py", line 125, in list_and_update_folders
    contents = parse_contents(o)
  File "C:\Users\user5\AppData\Roaming\Python\Python36\site-packages\todocli\auth.py", line 92, in parse_contents
    return json.loads(response.content.decode())["value"]

KeyBindings Import Error

Describe the bug
Following the installation procedure in Windows Subsystem for Linux and I get the following error attempting to run "tod0":

Traceback (most recent call last):
  File "/usr/local/bin/tod0", line 11, in <module>
    load_entry_point('tod0==0.6.1', 'console_scripts', 'tod0')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.7/dist-packages/tod0-0.6.1-py3.7.egg/todocli/interface.py", line 4, in <module>
ImportError: cannot import name 'KeyBindings' from 'prompt_toolkit.key_binding' (/usr/lib/python3/dist-packages/prompt_toolkit/key_binding/__init__.py)

Support Windows

It would be great if somebody could help with making this work in Windows.
I think the current problem is due to file paths that assume Unix and can be fixed easily.

Related issues: #11

Sometimes the prompt doesn't accept the value after pressing enter

This often happens when the computer is lagging.

  1. In any prompt (e.g. after pressing n to input a task name)
  2. Press enter
  3. The prompt doesn't accept the text but create a new line. I have to press backspace and press enter again.

I wonder if this is a bug in prompt_toolkit.

GET_KEY.md requires light updating

Microsoft Azure expectedly continues development. With this in mind, at least one of the steps in the GET_KEY.md file seems outdated. In step three it's no longer clear how one selects "Platform configuration: Client Application" - this selection seems missing on the "Register an application" page. I've not have tod0 working in recent history, so that's all I can say for now. Thanks!

Login prompt issue while creating a new task

When I tried to create a new task, tod0 asked me to go login.microsoftonline.com and login.

However, I was not able to paste redirected URL back to tod0. It seems that it stuck at the loading animation and didn't respond to stdin:
image

Unify tod0 api

There are currently two tod0 apis for the terminal GUI and CLI. Remove old API and use new one.

Works great but -i for interactive mode is always on

Excellent CLI utility, want to invoke in Windows 11 batch file, but it prompts for additional action after entering task correctly into the default list. The -i option in the readme returns 'todocli: error: unrecognized arguments: -i', as far as I can tell it's invoked in interactive mode to begin with and I can't switch that off.

Can't change users

Describe the bug
No way to change logged in account

A command to logout is necessary to change users.

Create/Delete folders

Is your feature request related to a problem? Please describe.
Can't create or delete folders

Describe the solution you'd like
Add option to create/delete folders

can not connect to localhost

Dear community,
I am trying to use Tod0 but after registering the app in azure, write the command todocli ls in the terminal, it gives me an url to authorize which does not work. Is there any other step that I am missing?

Indicate that API key is needed on first run

Is your feature request related to a problem? Please describe.
The script simply states that API key needs to be in keys.yml but it doesn't show how to get API keys.

Describe the solution you'd like
Printing a link to https://github.com/kiblee/tod0#getting-your-own-api-key would be helpful.

ModuleNotFoundError on odata_system_query

Describe the bug
ModuleNotFoundError on v0.6.0.

To Reproduce
On tod0 v0.6.0:

โฏ todocli
Traceback (most recent call last):
  File "/temp-venv/bin/todocli", line 5, in <module>
    from todocli.cli import main
  File "/temp-venv/lib/python3.9/site-packages/todocli/cli.py", line 5, in <module>
    import todocli.todo_api as todo_api
  File "/temp-venv/lib/python3.9/site-packages/todocli/todo_api.py", line 9, in <module>
    from todocli import api_urls
  File "/temp-venv/lib/python3.9/site-packages/todocli/api_urls.py", line 1, in <module>
    from odata_system_query import ODataSystemQuery
ModuleNotFoundError: No module named 'odata_system_query'

Check for updates

Describe the solution you'd like
Indicate that there is an update available.

Cannot specify task as complete

Describe the bug

First of all this is an amazing concept and cool cli tool. ๐Ÿ‘๐Ÿผ

When marking task as complete I get the following error:

/opt/homebrew/lib/python3.9/site-packages/todocli/utils/datetime_util.py:163: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
  local_dt = tz.localize(dt, is_dst=None)

The error shows with todocli or tod0 regardless.

the task is marked as complete but the error pops up.

Sign in with new credentials fails

I followed the steps illustrated in the documentation for registering a new token and such and triple-checked it, but when pasting it into my terminal I get an error:

Traceback (most recent call last):
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/oauth.py", line 75, in get_token
    with open(os.path.join(config_dir, "token.pkl"), "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/eric/.config/tod0/token.pkl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/eric/.local/bin/tod0", line 5, in <module>
    from todocli.interface import run
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/interface.py", line 74, in <module>
    load_folders()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/interface.py", line 57, in load_folders
    lists = todo_api.query_lists()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/todo_api.py", line 154, in query_lists
    result = RestRequestGet(api_urls.all_lists()).execute()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/rest_request.py", line 40, in execute
    outlook = get_oauth_session()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/oauth.py", line 128, in get_oauth_session
    token = get_token()
  File "/home/eric/.local/lib/python3.8/site-packages/todocli/graphapi/oauth.py", line 92, in get_token
    token = outlook.fetch_token(
  File "/home/eric/.local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 366, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
    validate_token_parameters(params)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 438, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/errors.py", line 405, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client) AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '********-****-****-****-************'.
Trace ID: 48208d5a-4290-4158-896d-64e5c9f90f00
Correlation ID: 084ce5e8-c493-4027-a58d-420883ce39f1
Timestamp: 2022-06-13 22:04:14Z

Not really sure how to troubleshoot this further, let me know what I can do to help, I'd love to be able to use this!

Support for Recurring Task

Is your feature request related to a problem? Please describe.
Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Cannot create a list

Describe the bug

I cannot create a list, everything else seems to work:

$ todocli newl "foo"
Traceback (most recent call last):
  File "/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.10/bin/todocli", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/todocli/cli.py", line 267, in main
    namespace.func(namespace)
  File "/opt/homebrew/lib/python3.10/site-packages/todocli/cli.py", line 138, in newl
    todo_api.create_list(args.list_name)
  File "/opt/homebrew/lib/python3.10/site-packages/todocli/todo_api.py", line 137, in create_list
    return request.execute()
  File "/opt/homebrew/lib/python3.10/site-packages/todocli/rest_request.py", line 49, in execute
    return self.evaluateResult(o)
  File "/opt/homebrew/lib/python3.10/site-packages/todocli/rest_request.py", line 15, in evaluateResult
    o.raise_for_status()
  File "/opt/homebrew/lib/python3.10/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/me/todo/lists

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.