Small CLI utility to facilitate tracking the time it takes to do different activities (at work, for consultants, or whatever!).
Timetrack Jr. logs the start and end times of different activities to a local sqlite database and can export summaries of those time logs as csv, json, a text summary, or an .ical file (that you could pull into your favorite calendar tool).
* 1. Features * 2. Usage * 2.1. Using CLI & help * 2.2. Setting Up Your Timetrack Jr. Database * 2.3. Record Some Times! * 2.4. Generate Handy Exports of Logged Times * 2.5. Editing and Amending Logged Times * 3. Building
```sh
ttjr show-config --help
)$ ttjr --help
Usage: ttjr [OPTIONS]
Commands:
show-config Set up DB and configure options Show config options and currently-registered-categories
add-category Create a new category that you can use for time tracking
delete-category Delete a category
set-option Set a global option
unset-option Remove an option
start-timing Start timing an activity - stops timing any currently running activities
stop-timing End timing
amend-time
delete-time
export Export the DB to a more friendly format for analysis
help Print this message or the help of the given subcommand(s)
Options:
--db-path
```sh
$ ttjr add-category project-for-client-a $ ttjr add-category project-for-client-b
$ ttjr set-option end-of-day 17:00 $ ttjr show-config { "options": { "dbversion": "0.1.0", "end-of-day": "17:00" }, "categories": [ "project-for-client-a", "project-for-client-b" ] }
$ ls ttjr.sqlite3
$ ttjr --db-path ~/.ttjr.sqlite3
```sh
start-timing
commands to global keyboard shortcuts$ ttjr start-timing project-for-client-a --notify
$ ttjr start-timing project-for-client-b
$ ttjr stop-timing
$ ttjr start-timing project-for-client-a ```
```sh
$ ttjr export --format summary --start-time "14 days ago" Tabulating results starting on/after Fri, 28 Oct 2022 19:18:02 -0400 Logged 3 activites for a total of 03:00 project-for-client-a: 2 logs, 01:00 cumulative, 33.33% of total project-for-client-b: 1 logs, 02:00 cumulative, 66.67% of total
$ ttjr export --format json [ { "id": 1, "category": "project-for-client-a", "starttime": 1667307600, "endtime": 1667311200 }, { "id": 2, "category": "project-for-client-b", "starttime": 1667311200, "endtime": 1667318400 }, { "id": 3, "category": "project-for-client-a", "starttime": 1667322000, "endtime": null } ]
$ ttjr export --format ical --outfile ~/my_times.ical --listen ```
```sh
$ ttjr amend-time 2 -s "2022-11-01 10:00" -e "2022-11-01 12:00"
$ ttjr delete-time 3 ```
sh
$ cargo build --release
$ cp target/release/ttjr <wherever you keep your bins>