Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eckyputrady/ttrack
Command-line utility for time tracking and reporting
https://github.com/eckyputrady/ttrack
command-line command-line-tool productivity rust time-tracking
Last synced: 3 months ago
JSON representation
Command-line utility for time tracking and reporting
- Host: GitHub
- URL: https://github.com/eckyputrady/ttrack
- Owner: eckyputrady
- License: apache-2.0
- Created: 2020-04-25T13:02:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-05T08:57:11.000Z (about 4 years ago)
- Last Synced: 2024-07-08T19:18:42.508Z (4 months ago)
- Topics: command-line, command-line-tool, productivity, rust, time-tracking
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-starred - eckyputrady/ttrack - Command-line utility for time tracking and reporting (rust)
README
# ttrack
[Crate in crates.io](https://crates.io/crates/ttrack)
Command-line utility for time tracking and reporting.
## Features
1. Start time tracking
2. Stop time tracking
3. Edit tracked activities
4. Remove tracked activities
5. Tagging
6. Reporting## Installation
Assuming you have [rust toolchain](https://www.rust-lang.org/tools/install) installed, run the following command:
```
$ cargo install ttrack
```## Usage
For showing help:
```
$ ttrack help
$ ttrack --help
```Example usage:
```
$ ttrack start "Setup ubuntu server" -t client:BigCo -t "project:BigCo Homepage"
edfb7ef7 2020-04-25T15:00:06+08:00 - ......................... 00:00:00 Setup ubuntu server............................... [client:BigCo] [project:BigCo Homepage]$ ttrack stop
edfb7ef7 2020-04-25T15:00:06+08:00 - 2020-04-25T15:01:14+08:00 00:01:08 Setup ubuntu server............................... [client:BigCo] [project:BigCo Homepage]$ ttrack start "Setup CI pipeline" -t client:BigCo -t "project:BigCo Homepage"
e09c79d4 2020-04-25T15:03:30+08:00 - ......................... 00:00:00 Setup CI pipeline................................. [client:BigCo] [project:BigCo Homepage]$ ttrack history
e09c79d4 2020-04-25T15:03:30+08:00 - ......................... 00:00:33 Setup CI pipeline................................. [client:BigCo] [project:BigCo Homepage]
edfb7ef7 2020-04-25T15:00:06+08:00 - 2020-04-25T15:01:14+08:00 00:01:08 Setup ubuntu server............................... [client:BigCo] [project:BigCo Homepage]$ ttrack edit e09c79d4 -n "Setup CI/CD pipeline" -d client:BigCo -a project:ttrack -a client:myself
e09c79d4 2020-04-25T15:03:30+08:00 - ......................... 00:00:33 Setup CI/CD pipeline.............................. [client:myself] [project:BigCo Homepage] [project:ttrack]
```Output format:
```
-
```The tool can also generate a report that contains time spent broken down by tags:
```
$ ttrack report
00:33:42 project:ttrack
00:32:28 client:personal
00:01:19 untagged
00:00:14 client:Big Co
```## Commands
### Start Tracking
```
$ ttrack start --help
Start tracking an activityUSAGE:
ttrack start [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-t, --tag ... Activity tags. You can supply multiple values for this flagARGS:
Activity name
```### Stop Tracking
```
$ ttrack stop --help
Finish tracking current activityUSAGE:
ttrack stopFLAGS:
-h, --help Prints help information
-V, --version Prints version information
```### Edit Tracked Activity
```
$ ttrack edit --help
Edit tracked activityUSAGE:
ttrack edit [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-e, --end-time Edit the activity end time
-n, --name Edit the activity name
-s, --start-time Edit the activity start time
-a, --tags-to-add ... Tags to be added. You can supply multiple values for this tag
-d, --tags-to-del ... Tags to be removed. You can supply multiple values for this tagARGS:
ID of the activity to be changed. e.g. `6aed4521`. You can get IDs from running `history`
command
```### Show History
```
$ ttrack history --help
Show the list of tracked activities, starting from recent onesUSAGE:
ttrack history [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-e, --end-time [default: 3000-01-01T00:00:00+00:00]
-p, --page [default: 0]
-n, --page-size [default: 20]
-s, --start-time [default: 1970-01-01T00:00:00+00:00]
```### Report
```
$ ttrack report --help
Show report of total activities duration broken down by tagUSAGE:
ttrack report [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-e, --end-time [default: 3000-01-01T00:00:00+00:00]
-s, --start-time [default: 1970-01-01T00:00:00+00:00]
```## Exporting Data
The application data is stored in these folders:
|Platform | Value | Example |
| ------- | ---------------------------------------- | ---------------------------------------- |
| Linux | `$XDG_DATA_HOME` or `$HOME`/.local/share/ttrack/ttrack.db | /home/alice/.local/share/ttrack/ttrack.db |
| macOS | `$HOME`/Library/Application\ Support/ttrack/ttrack.db | /Users/Alice/Library/Application\ Support/ttrack/ttrack.db |
| Windows | `{FOLDERID_LocalAppData}`\ttrack\ttrack.db | C:\Users\Alice\AppData\Local\ttrack\ttrack.db |`ttrack.db` is a SQLite file.