Crates.io | ttc |
lib.rs | ttc |
version | 0.0.5 |
source | src |
created_at | 2023-04-13 11:27:08.147813 |
updated_at | 2023-04-26 10:23:56.542263 |
description | A fun CLI helps you track your tasks & log the time to a flat file |
homepage | |
repository | |
max_upload_size | |
id | 838191 |
size | 22,202 |
This is a CLI app that helps you track your tasks and time spent on them.
Setup a count down timer per task to help you track time spent on a task
Receive notifications when a task starts or ends - notifications
Log tasks to a flat file - log_tasks
Log tasks to a google sheet - log_tasks
cargo install ttc
Default behavior is to track time spent on a task, the thread will be sleeping for the duration of the task. The thread will be woken up when the task is completed & automatically log the task to a flat file.
ttc -n "task name" -d 1 -u h
- start a task
ttc
is the CLI app name-n "task name"
The flag -n is used to specify the task name-d 1
the flag -d is used to specify the duration of the task -u h
the flag -u is used to specify the unit of time for the duration of the task. The unit can be h for hours, m for minutes or s for secondsUsing the flag -l
will log the task to a flat file without time tracking
ttc -n "task name" -d 1 -u h -l
- start a task
ttc
is the CLI app name
-n "task name"
The flag -n is used to specify the task name
-d 1
the flag -d is used to specify the duration of the task
-u h
the flag -u is used to specify the unit of time for the duration
of the task. The unit can be h for hours, m for minutes or s for seconds
-l
the flag -l is used to specify that you want to log the task to a flat file without time tracking
I wanted to build a CLI app that helps me track my tasks and time spent on them. I also wanted to build a CLI app that I can use to learn more about building CLI apps with Rust.
ttc = "*"
to your Cargo.toml dependencies use ttc::Task;
let t1:Task = Task::new().unwrap_or_else(|err|{
println!("Err: {err}");
std::process::exit(1);
});
t1.start_task();
if let Err(err) = t1.log_task_to_file(){
println!("Err: {:#?}",err);
std::process::exit(1);
}