Skip to content

Commit

Permalink
added 'hey reports' to list custom reports
Browse files Browse the repository at this point in the history
  • Loading branch information
masukomi committed Aug 1, 2023
1 parent 87d2210 commit 2319a4e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ Hey is a command line tool that tracks your time spent on various projects that

``` text
Usage:
bin/hey start [<start_args> ...] -- Start a new timer
bin/hey stop [<stop_args> ...] -- stop an existing timer
bin/hey log <number> <duration> -- see a log of recent timers
bin/hey today -- see a log of today's timers
bin/hey log interrupts <number> <duration> -- see a log of recent interruptions
bin/hey summarize timers <number> <duration>
bin/hey running -- lets you know if there are any timers running & what they are for
bin/hey <name> [<start_args> ...] -- Record an interruption
bin/hey kill timer <id> -- Remove an unwanted timer.
bin/hey tag <id> [<tags> ...] -- add tags to a specific event, by id
bin/hey nevermind -- Cancel & delete the most recent running timer
bin/hey kill <name> -- Remove an unwanted person / thing from interruptions
bin/hey projects -- lists all the projects
bin/hey run <name> [<pass_throughs> ...] -- Run a custom report
hey start [<start_args> ...] -- Start a new timer
hey stop [<stop_args> ...] -- stop an existing timer
hey log <number> <duration> -- see a log of recent timers
hey today -- see a log of today's timers
hey log interrupts <number> <duration> -- see a log of recent interruptions
hey summarize timers <number> <duration>
hey running -- lets you know if there are any timers running & what they are for
hey <name> [<start_args> ...] -- Record an interruption
hey kill timer <id> -- Remove an unwanted timer.
hey tag <id> [<tags> ...] -- add tags to a specific event, by id
hey nevermind -- Cancel & delete the most recent running timer
hey kill <name> -- Remove an unwanted person / thing from interruptions
hey projects -- lists all the projects
hey reports -- List available custom reports
hey run <name> [<pass_throughs> ...] -- Run a custom report
[<start_args> ...] optional time adjustment, project(s), & optional tags
[<stop_args> ...] optional id, and optional time adjustments (e.g. 4 minutes ago)
Expand Down
9 changes: 8 additions & 1 deletion bin/hey
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,14 @@ multi sub MAIN("projects") {
say(find-x-names("projects", $connection).join("\n"));
}


#| List available custom reports
multi sub MAIN("reports") {
my $path = IO::Path("$*HOME/.local/bin/hey/scripts/");
say("Available reports...");
for $path.dir -> $file {
say "* " ~ $file.basename.Str;
}
}
#| Run a custom report
multi sub MAIN("run",
Str $name, #= Name of the script to run
Expand Down

0 comments on commit 2319a4e

Please sign in to comment.