Bartib
Bartib is an easy to use time tracking tool for the command line. It saves a log of all tracked activities as a plaintext file and allows you to create flexible reports.
Contents
Tutorial
Alice is not chasing white rabbits any more. She has a real job now with real clients and project managers. Therefore, she has to keep track of how she uses the hours of her working day. See how Alice uses Bartib for this and learn how you can use it, too.
At 8:00 a.m. Alice arrives at the office. She got an email from her project manager who asks her to start working right away on Urgent Task X from Important Project A. So Alice types at the command line:
alice@work: ~ $ bartib start -d "Urgent Task X" -p "Important Project"
And Bartib confirms:
Started activity: "Urgent Task X" (Important Project) at 2021-10-29 08:00
At 8:43 one of her colleagues drops by and they decide to have a coffee. As she cannot bill this time to her clients, Alice stops the running activity in Bartib:
alice@work: ~ $ bartib stop
Stopped activity: "Urgent Task X" (Important Project) started at 2021-10-29 08:00 (43m)
Almost 10 minutes later she is back at her desk and continues work:
alice@work: ~ $ bartib continue
Started activity: "Urgent Task X" (Important Project) at 2021-10-29 08:51
At 10:13 another email arrives: Urgent Task X has to wait! Now More Urgent Task Y from Just Another Project B has to be carried out immediately.
Alice types:
alice@work: ~ $ bartib start -d "More Urgent Task Y" -p "Just Another Project B"
Stopped activity: "Urgent Task X" (Important Project) started at 2021-10-29 09:01 (1h 12m)
Started activity: "More Urgent Task Y" (Just Another Project B) at 2021-10-29 10:13
See how Bartib just stops the running activity when another one starts? No need to stop it manually.
It is a productive morning. After More Urgent Task Y Alice workes on other projects and other tasks, but now it is time for lunch and Alice lets Bartib list all the activities she has tracked today until now:
alice@work: ~ $ bartib list --today
Started Stopped Description Project Duration
08:00 08:43 Urgent Task X Important Project 43m
08:51 10:13 Urgent Task X Important Project 1h 22m
10:13 10:35 More Urgent Task Y Just Another Project B 22m
10:35 10:53 Urgent Task X Important Project 18m
10:53 11:45 Simple Task Z Less Important Project 52m
11:45 12:34 Boring Task XY Internal Project C 49m
After her lunch break Alice wants to continue work on More Urgent Task Y. Instead of typing the task description and the project name again, she asks Bartib for a list of all the tasks she has recently worked on:
alice@work: ~ $ bartib last
# Description Project
[3] More Urgent Task Y Just Another Project B
[2] Urgent Task X Important Project
[1] Simple Task Z Less Important Project
[0] Boring Task XY Internal Project C
And she instructs Bartib to continue task #3:
alice@work: ~ $ bartib continue 3
Started activity: "More Urgent Task Y" (Just Another Project B) at 2021-10-29 12:52
An exciting day at work continues. As it is a Friday Alice decides to already leave work at shortly after seven. She stops her latest activity and asks Bartib for a report:
alice@work: ~ $ bartib report --today
Important Project................................. 2h 43m
Another Task xyz.............................. 15m
Important Call with the Client................ 35m
Urgent Task X................................. 1h 53m
Internal Project C................................ 4h 30m
Another Meeting............................... 45m
Boring Task XY................................ 1h 15m
Long Meeting with Everyone from the Department 2h 30m
Just Another Project B............................ 45m
More Urgent Task Y............................ 45m
Less Important Project............................ 2h 27m
Simple Task No. 5............................. 1h 35m
Simple Task Z................................. 52m
Total............................................. 10h 25m
Alice is happy. This was just another great day at the company and thanks to Bartib tracking her time was a breeze.
Do you want to be as happy as Alice? Use Bartib!
How To ...
How to install Bartib
Simply download a suitable executable from https://github.com/nikolassv/bartib/releases and copy it in some directory that is listed in your PATH
(e.g. ~/bin).
You may also use cargo to install Bartib from crates.io:
How to build Bartib
Bartib is written in rust. You may build it yourself with the help of cargo. Just clone this repository and execute the cargo build
command in its main directory:
How to define in which file to save the log of your activities
You may either specify the absolute path to your log as an extra parameter (--file
or -f
) to your bartib command:
Or you may set the environment variable BARTIB_FILE
to the path of your log. Just add this line to your .profile
file:
If the specified log file does not exist yet Bartib creates it.
How to edit or delete tracked activities
Just open your activitiy log in your favorite text editor to edit or delete former activities. You may even add new activities manually in this file. The format is self explanatory.
Bartib even offers the bartib edit
command which opens the log in the editor defined by your EDITOR
environment variable. If you are unsure whether your edits are readable by bartib, use the bartib check
command. It will inform you about any parsing errors.
How to activate auto completion
Bartib offers a simple auto completion for project names. This saves you from typing out long project names each time you start a new task. Just source the script misc/bartibCompletion.sh in your .bashrc
to enable it.
Command overview
All these commands require that you have set the BARTIB_FILE
environment variable to the file path of your activity log. Otherwise they require an additional -f/--file
parameter between bartib
and the subcommand (see above: How to define in which file to save the log of your activities).
The essentials
Getting Help
Tracking activities
# All numbers used with the following commands refer to the indizees in the list created with `bartib last`
Reporting and listing activities
Doing other stuff