17
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 đ.
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 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
Both tech and non-tech audiences can use it with a lil bit of guidance.
Python 3+ installed on your machine
-
Git clone or download the repository on to your machine
-
Obtain Trello token + Key + board_id
- SignIn/SignUp in trello
- Create a Board in Trello
- Post board creation obtain the board_id by going inside the board and modifying the URL to add .json at the end. Example > https://trello.com/b/PxEQPoMz/reports**.json**
- Obtain API key
- Get Token based on API key
Update the config file with your details.
âââ 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
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.
Lets get down to business of creating the trello dashboards for better life going forward.
Open the clone or downloaded git repo in your fav IDE, mine is Pycharm Visual Studio Code works too.
-
Open terminal tab inside the IDE
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
- Linux/MacOS
>
-
Start the newly created virtualenv
- Linux/MacOS
source trelloPlanner/bin/activate
- Windows
.\trelloPlanner\Scripts\activate
- Linux/MacOS
-
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.
- We saved 70% of our time that would have gone if done manually.
- We learnt about Trello API's + Python.
- What we learnt in the process is Automation helps a lot in accomplishing the desired goals faster, better and less error prone manner
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.
17