The Kino is a project to know about myself through Quantified Self, automate things to repeat and improve the quality of life.
From http://quantifiedself.com/
List of Kino series
The last post (Skill & Scheduler) was in the process of preparing Kino to working as I wanted. Now I want to talk about the goal of this project, Quantified Self. It’s the process of collecting data about myself, viewing data as the charts, giving feedback to myself, and improving the quality of life through it.
I’m going to talk about Task today. I like Todoist very much. So I upgraded to premium and I am using it. There are mobile and desktop apps, so i can easily manage my To do list anytime, anywhere. But i need more features. I wanted to know how much time it took, how much I concentrated on this task, how I spent the time of day.
It was not enough to use Todoist to meet my needs. So I started to look for the services I need. Toggl was well made service for measuring time and Trello's KANBAN board was the easiest tool to start and finish a task. At this time, the list of boards is managed simply by ‘Task’, ‘Doing’, ‘Done’, ‘Break’.
T3 is the integration of the services i talked about.That is, T3 = Todoist + Toggle + Trello.
Below are the Skills for T3.
Let’s take a look at how T3 works with an example of my day :D
The sun is rising and it is morning. When the alarm goes off and i get up and connect to Slack, Kino says hello.
kino track sleep time and tell today’s weather
At this time, letting me know the weather of the day and initialize Kanban board and sync with Todoist tasks (kanban_init + kanban_sync).
Trello — KANBAN board
Checking today’s weather and getting ready to go to work. At 8 o’clock, Kino briefs me on the schedule today.
Skill : today_briefing
Usually I am reading the book on the subway. Before read the book, turn on Trello and move the Book card in the Task list to Doing list. Kino let me know the timer starts!
About an hour later, I arrived at the transit station. Turn on Trello and move the card in Doing list to Done list. Kino asks how much i focused on the reading book!
Skill : toggl_timer, attention_question
I actually gave it 82 points because I fell asleep a little. Kino has done the job on Todoist, too. Good job :D
When I arrived at the company and work in the company, I move Trello cards and concentrate on my work.
I was concentrating too much in the afternoon. I was working more than an hour and a half. Oh, Kino tells me to take a break. I take a break.
Skill: toggl_checker
…
Now I leave work and arrive home and finish the day. At 10 o’clock in the evening, Kino tell me remain tasks. Oh, there was a job that I forgot.
Skill : todoist_remain
So at 11 o’clock .. Kino gives me a day to finish!
Skill : todoist_feedback
Skill : total_chart
Skill : toggl_report
I completed almost Todoist tasks and focused well! :D
I saw the toggl task chart and spent a good day! i’m proud of myself. LOL Prepare for the tomorrow, add the Deep Learning Study Task and go to sleep.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
This is the scenario that I manage the task of the day. All I’m doing is moving Trello’s cards. Isn’t it simple?
The most important thing of a Quantified Self is that it can easily collect data and chart it to provide easy-to-see feedback. In that sense, T3 is a very simple and useful feature! And because the task data is stored in the Toggl, i can export the data at any time and do analysis.
Next, I will briefly cover the development side.
Using the packages wrapped service in Python, you can easily create your own custom skills. All you need to do is to prepare and connect TOKEN, ACCESS_KEY, etc., which are required for each service.
The other part that needs to be implemented is Webhook. You can use Trello in IFTTT, but basically IFTTT is not real time. But to manage tasks with Trello it need to react in real time. It’s too uncomfortable for the Toggl Timer to work 10 minutes after you put Doing list on it.
Trello supports Webhook. To handle the Webhook, you need a server that handles callbacks. Buying a server to handle this callback is a waste. This case can be handled simply by using Serverless Framework. After you finish setting up AWS, define a function for callback, and then deploy it, you will see that the AWS API Gateway + Lambda is set up automatically.
def kanban_webhook(event, context):input_body = json.loads(event['body'])
action = input\_body\["action"\]
action\_type = action\["type"\]
if action\_type == "createCard":
list\_name, card\_name = get\_create\_card(action\["data"\])
elif action\_type == "updateCard":
list\_name, card\_name = get\_update\_card(action\["data"\])
kanban\_list = \["DOING", "BREAK", "DONE"\]
if list\_name in kanban\_list:
payload = make\_payload(action=list\_name, msg=card\_name)
r = send\_to\_kino({"text": payload})
...
Here kanban_webhook is implemented. (kino-webhook) Now that i’ve implemented Webhook, Kino’s handling of this Webhook is over! Below are codes of the handle with the Skills according to the movement of the cards.
def KANBAN_handle(self, event):toggl_manager = TogglManager()
action = event\['action'\]
description = event\['msg'\]
if action.endswith("DOING"):
toggl\_manager.timer(
description=description,
doing=True,
done=False)
elif action.endswith("BREAK"):
toggl\_manager.timer(doing=False, done=False)
elif action.endswith("DONE"):
toggl\_manager.timer(doing=False, done=True)
## connect with Todoist
In this post, i have covered the services and various functions of the Kino, so that Kino can easily manage the tasks and provide charts.
I am collecting daily data for task. Later on, I will be able to do various analyzes of what I focus on, what time I focus on.
So, I gather data about Task every day so I can concentrate on which task I am working on, and what time I concentrate on it and etc. After a lot of data is accumulated, it will be analyzed. :D
All code can be found here. Anyone who helps make Kino smarter is always welcome :)
Next, I’ll take a look at the Feed NC feature, which tells you the latest feeds and classify the feed that i read in detail automatically save to pocket.