Time Tracking With Watson
Today I would like to introduce a command-line tool that I have been using for some months for time tracking. Until Ubuntu 18.04 I always used the hamster applet, which was great. But under 20.04 this applet does not work anymore. So I looked around for alternatives and ended up with Watson – a command-line tool. Time tracking with Watson is different from the Hamster applet, but let’s have a look at the installation first.
Watson is a Python program and is best installed using the Python package manager pip:
$ sudo apt install python3-pip $ sudo pip3 install td-watson
To make it easier to use, we will also install the Bash auto-complete:
$ cd /etc/bash_completion.d/ $ wget https://raw.githubusercontent.com/TailorDev/Watson/master/watson.completion
For the auto-completion to work, you have to restart the terminal.
How to use Watson
There are several commands to help you keep track of time, display summaries, or manage individual projects. The most important ones I will introduce now:
Tracking the time of a project
$ watson start project name +keyword1 +keyword2
In the background, a “frame” or time segment is created for the project including the two keywords. With keywords, you can e.g. record the time for subprojects/subtasks.
$ watson stop
you can finish the time tracking for the project.
Other helpful commands
Sometimes it happens that I forget to execute “watson stop”. With
$ watson edit
you can edit the last frame:
To restart the last project, enter:
$ watson restart
To see a summary of my projects I can use the following commands:
$ watson report // last 7 days $ watson report -m // current month $ watson report -f "2020-08-01" -t "2020-08-31" // Report from 01.08. to 31.08.2020 $ watson aggregate // shows a summary of the last 7 days (for each day separately)
You can get a list of all commands with
$ watson --help $ watson command --help
Watson is a really easy to use command-line tool. I like the time tracking with Watson, although I also found the hamster applet very handy. Some community projects around Watson improve the work with it, e.g. a GUI and other nice little things. One feature that is still missing in my opinion is the possibility to add notes to a frame. There is a Pull Request for this, but it is not merged in the project yet.
Which tool do you use for time tracking?