Giter Site home page Giter Site logo

davidtkeane / todoist-cli-python-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 349 KB

The Todoist CLI is a Python script that interacts with the Todoist API to provide a command-line interface for managing your Todoist tasks.

Python 100.00%
todolist api-rest todo-list

todoist-cli-python-api's Introduction

ย 

Todoist Badge

Hi, Welcome to Todoist CLI! ๐Ÿ‘‹


Hey, I'm Ranger and I have updated and tested on 29th July 2024.The Script has been testing on Macbook Pro M3 using Python version 3.11.8. This is now a fully working operating deathstar.

DeathStar

ย 

Windows 11 macOS Linux


GitHub last commit GitHub commit activity License

๐Ÿง About

Todoist

Sign up for a Todoist account

Todoist is a powerful task management app that helps you organize your life. With Todoist, you can create tasks and projects, set due dates and priorities, and even assign tasks to others. Todoist syncs across all your devices, so you can manage your tasks wherever you are. It also integrates with many other apps and services, including Gmail, Google Calendar, Slack, Amazon Alexa, and more. Whether you're managing a team, writing an epic screenplay, or just making a grocery list, Todoist is there to help you achieve more every day.

I had an idea if I could connect Todoist to my original todo_list program I made (Not uploaded yet) for Powershell, the Powershell todo_list was finished, and I thought if I could connect my todo_list to Todoist. This script does not do that, this script is to let you control your Todoist from the terminal or command line. This script lets you do most things available with this code. I copied and pasted all the code from the Todoist API guide, and with the help of GitHUb CoPilot we arrived at this script. Please enjoy and upgrade and own it.

The Todoist CLI is a Python script that interacts with the Todoist API to provide a command-line interface for managing your Todoist tasks.

The script uses the todoist-python package to interact with the Todoist API and the python-dotenv package to load environment variables from a .env file. The environment variable TODOIST_API_KEY is used to authenticate with the Todoist API.

When you run the script, it displays a menu of options for managing your Todoist tasks. You can list, add, update, close, reopen, and delete tasks. You can also manage projects and comments. In addition, you can open the Todoist web app to view today's tasks and your active projects.

Here's how it works:

  1. The script loads your Todoist API key from a .env file using python-dotenv.
  2. It creates a TodoistAPI object using your API key.
  3. It displays a menu of options and asks you to choose an option.
  4. Depending on your choice, it calls a function to perform the chosen operation. For example, if you choose to list tasks, it calls the get_tasks method on the TodoistAPI object and then prints the tasks.
  5. If an operation requires user input, such as adding a task, it prompts you to enter the necessary information.
  6. After performing an operation, it goes back to step 3, unless you choose to exit the script.

This script provides a quick and easy way to manage your Todoist tasks from your terminal. It's especially useful if you prefer using the command line over a graphical user interface, or if you want to automate your task management with scripts.

๐Ÿš€ Quick Installation Guide. More Detailed Guide Below.

  1. git clone https://github.com/davidtkeane/todoist-cli-python-api.git
  2. cd todoist-cli-python-api/help_files.
  3. The install.py file is inside the Help_files folder.
  4. The requirements.txt file is inside the Help_files folder.
  5. Extra Help to install Todoist file is inside the Help_files folder. File name is todoist_install_help.md
  6. Get your API key. It's free. Click here to get your Todoist API Key
  7. Add API Key into the .env file 'TODOIST_API_KEY=YourKey'.
  8. Then test the API key with the file todoist_api_test.py which is inside the Help_files folder.
    python todoist_api_test.py
    
    
  9. After everything is installed you can start the script by this comand.
    python todoist.py

๐Ÿฅท Where to get the Todoist API key.

  1. Login with a new account or old account.
  2. Then go to today Todoist Website for the API Key.
  3. Click your profile name and settings.
  4. Click Integrations.
  5. Click Developer.
  6. Copy API Token.
  7. Add to API Key when the install.py asks for it. The .env file will be created if the file is not there.

๐Ÿ’ป Developer API Documentation

  1. Developing with Todoist website
  2. Todoist REST API. This is the link this script uses https://developer.todoist.com/rest/v2/#overview
  3. When in the Todoist settings, you will find the REST API which is the https: link above to communicate over the internet.

๐Ÿš€ Now we are ready to Install and launch

  1. Clone this repository to your local machine.

     git clone https://github.com/davidtkeane/todoist-cli-python-api.git
    
  2. First. Click here for the Todoist Website and get your API Key, then Copy the Key.

  3. The Menu has instructions on how to find the API key shown below.

    1. Login with a new account or old account.
    2. Then go to today https://app.todoist.com/app/today
    3. Click your profile name and settings.
    4. Click Integrations
    5. Click Developer
    6. Copy API Token
    7. Add to .env file
    
  4. Run the install.py file. This will tell you if you have the modules needed installed.

  5. You only need to run install_todoist.py once per install.

    python install.py
    
  6. You will get this menu.

    1722274706166

  7. The script will ask you for the Todoist API key in the terminal, then that is sent into the .env file for you.

  8. It shows you that The following modules are required:

  9. If the modules are installed it will say, if not it will ask you to install them.

1722278365823

  1. If the modules are not installed, it will asked you to install The todoist module is not installed. Do you want to install todoist? This module is safe and used by millions. (y/n)

    • Press y for yes.

    • 1722276030408

      1. The script will then run the todoist_api_test.py file to establish if you are able to connect to Todo

    1722278633930

  2. Press y for yes run the script.

    The Normal way to run the app after the install will be

    python todoist.py
    

    1722276435961

๐Ÿ“– Usage

To use the todoist.py script, you can run the following command in PowerShell or Linux/Mac terminal:

Run the script from your terminal with the following command:

python todoist.py

๐Ÿ“š Available Commands in Program

==============================

  1. List projects
  2. Add project
  3. Delete project
  4. List tasks
  5. Add task
  6. Update task
  7. Close task
  8. Reopen task
  9. Delete task
  10. List comments
  11. Add comment
  12. Update comment
  13. Delete comment
  14. View today's tasks online
  15. View projects online
  16. Exit

๐Ÿ› ๏ธ Functions

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“œ License

This project is licensed under the MIT License.

๐Ÿ“ž Contact

If you have any questions, feel free to reach out to me at [email protected]

todoist-cli-python-api's People

Contributors

davidtkeane avatar

Stargazers

 avatar

Watchers

 avatar

todoist-cli-python-api's Issues

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.