A simple program to keep track of working hours.
Colors are customizable through arguments on the
report
command. Installing completions is highly recommended to customize the table as there are a lot of options.
By default, punchcard requires nightly to support SIMD. Must be compiled using the nightly version defined in the toolchain file.
```shell
cargo install punchcard --no-default-features --features stable
cargo install punchcard ```
If you are using stable Rust, compile with --no-default-features --features stable
. The MSRV for stable builds is 1.65.0
. There is no MSRV policy because this program mainly targets nightly, so the MSRV can change at any time.
Print the completions file with punchcard completions <your shell>
and pipe it to the appropriate folder for your shell.
```shell
cargo run --no-default-features --features debug --
./dev.sh --
``` $ punchcard --help A CLI tool for tracking work-from-home hours.
Usage: punchcard [OPTIONS]
Commands: in Clock in out Clock out toggle Clock either in or out status Check the current status report Interpret the times and generate a report completions Generate completions for the given shell generate-data Generate test data help Print this message or the help of the given subcommand(s)
Options:
-d, --data-folder
NOTE: The generate-data
subcommand is only available with the feature flag generate_test_data
.
This flag is enabled by the debug
feature flag, but can be enabled in release builds as well.
When using the in
, out
, toggle
, and status
subcommands, the -o
option can be used to specify an offset from the current time.
Some examples of valid inputs:
The in
prefix is optional; by default, the offset is added to the current time.
The offset is parsed by the humantime
crate. It accepts a variety of formats. The suffixes do not have to be single letters, but they must be separated by whitespace. For example, you may use 1hours
, 1hour
, 1hr
, or 1h
to specify 1 hour.
For a list of all the suffixes, see the documentation for the humantime
crate:
https://docs.rs/humantime/latest/humantime/fn.parse_duration.html