Weekly Planner with Trello + python

Forming a new habit is hard especially the good ones, if you don't agree with me then we can't be friends.

Many well known people have written books on how to create a new habit and stick to it , my favorite one is Atomic habits do read it will change the way you think.

Little introduction about myself , I am a Software Engineer working majorly in the Data Engineering domain. I enjoy doing some side projects for myself and sometimes indulge in freelancing , that 🍣 ain't getting cheap 😜.

Motivation 🔥 🔥

I have struggled in the past with habit formation and following up with a daily constant routine, what worked for me most of the time was if I had my to-dos for any given day.
My productivity would increase and was able get more things done.
This led to my quest for a creating my daily/weekly/monthly todo list , but the tools that I used required manual entry of all the Tasks and I hated it when I had to it for months.
I am lazy

Here lies a problem and Trello came as a savior with its magic API's.

Trello and Python to the rescue 🐍

Trello is task management tool used by startups and individuals to track the tasks and their progress, to be put up simply.
Trello exposes it API's to do CRUD operations on trello boards and that's exactly what I did with a little help of Python

Talk is cheap. Show me the code -- Linus Trovalds

Pre-requisites

Both tech and non-tech audiences can use it with a lil bit of guidance.

Configuration File Walk-through

├── config.yaml     <- Config file to be updated
│   ├── planner      <- tag not be messed up
│       ├── trello:
│                         token: abc123 <- trello token obtained in previous step
│                         key: zyx123  <- trello API key obtained in previous step
│                         board_id: zyx123  <- trello baord _id obtained in previous step
│       ├── dates:
│                        start_date: 2021-08-09 <- user specific start date from where the 
                                                                           planning is to be started
│                        end_date: 2021-12-30 <- user specific end date from where the 
                                                                           planning is to end

Structure of the Daily Planner

Below file contains details about how the actual day-day to-do's can be configured for weekly/half-yearly basis as per our needs
File can be found inside the repo: week_planner.json

{
  "LISTS": [
    {
      "MONDAY": {
        "CARDS": [
          {
            "name": "4:45 AM Wake UP",
            "desc": "To wake up everyday to exercise at 5 AM",
            "pos": "top",
            "due": "",
            "idList": ""
          },
          {
            "name": "10:30 PM  SLEEP",
            "desc": "Wind off the day and sleep",
            "due": "",
            "idList": ""
          }
        ]
      }},{"TUESDAY": {
        "CARDS": [
          {
            "name": "4:45 AM Wake UP",
            "desc": "To wake up everyday to exercise at 5 AM",
            "pos": "top",
            "due": "",
            "idList": ""
          },
          {
            "name": "7 AM - 8 AM household chores",
            "desc": "To do some household chores",
            "due": "",
            "idList": ""
          },      
        ]
      }},{"WEDNESDAY": {
        "CARDS": [
          {
            "name": "4:45 AM Wake UP",
            "desc": "To wake up everyday to exercise at 5 AM",
            "pos": "top",
            "due": "",
            "idList": ""
          }   
      ]}
    }
  ]
}

One needs to update the actual file with their respective tasks or habits that they want to build over time and have them as their day-to-day tasks on trello.

Next steps

Lets get down to business of creating the trello dashboards for better life going forward.

Let the hacking begin 💻 🔐
terminal.gif

Run below cmd in your respective terminal

  • Set up virtual env for your project
    • Linux/MacOS > python3 -m venv trelloPlanner
    • Windows > python -m venv trelloPlanner
  • Start the newly created virtualenv

    • Linux/MacOS source trelloPlanner/bin/activate
    • Windows .\trelloPlanner\Scripts\activate
  • Install all the required packages/dependencies

    • > pip install -r requirements.txt
  • Once started execute the below cmd and the let the magic unfold

    python main.py

Now sit back and relax and watch your life get organized by day in front of you.

Learnings & Benefits

  1. We saved 70% of our time that would have gone if done manually.
  2. We learnt about Trello API's + Python.
  3. What we learnt in the process is Automation helps a lot in accomplishing the desired goals faster, better and less error prone manner

Going Forward

I would recommend all of you lovely folks reading this blog to go through Trello boards and let me know what else would you like in your tasks
and create Issues/Feature Requests in my github repo so that I can add them in next iteration.

11