completed task stats

This commit is contained in:
aaron-jack-manning
2022-08-25 09:15:15 +10:00
parent fef199cd52
commit f17f9622c6
3 changed files with 39 additions and 3 deletions

View File

@@ -109,10 +109,16 @@ enum Command {
#[derive(clap::Subcommand, Debug, PartialEq, Eq)]
enum StatsCommand {
/// View time tracked per tag recently.
Tracked {
#[clap(short, long, default_value_t=7)]
days : u16,
},
/// View recently completed tasks.
Completed {
#[clap(short, long, default_value_t=7)]
days : u16,
},
}
#[derive(clap::Subcommand, Debug, PartialEq, Eq)]
@@ -281,6 +287,9 @@ fn program() -> Result<(), error::Error> {
match command {
Tracked { days } => {
stats::time_per_tag(days, vault_folder)?;
},
Completed { days } => {
stats::completed_tasks(days, vault_folder)?;
}
}
},