Crates.io | timet-rs |
lib.rs | timet-rs |
version | 0.2.0 |
source | src |
created_at | 2024-02-12 15:24:25.180325 |
updated_at | 2024-02-29 21:26:29.19129 |
description | Automate your Timet fetching |
homepage | https://github.com/sondr3/timet-rs |
repository | https://github.com/sondr3/timet-rs |
max_upload_size | |
id | 1137086 |
size | 40,564 |
Automate your hours
timet --init
to create a configtimet
to fetch your hours for the current monthSimply run timet
to get your hours for the current month.
$ timet
If you want to get the hours for a different month, you can use the -m
and -y
flags to specify the month and year.
$ timet -m 1 -y 2021 # Get the hours for January 2021
Get your API key from the Timet console and configure your config file using
timet -i
to create it/get the path for it. Then add the URl and key into the
timet.json
file.
Optionally, you can also create a template by creating a template file and
template
key in the config file. Note that the path is relative to the
config directory. So a "template": "./timet.tmp"
will be read as a file
in the same directory as timet.json
. These files use minijinja
as the templating engine, see here for info about the syntax.
If your method of installation didn't include shell completion, you can manually
source or save them with the timet --completion <shell>
command.
$ timet --help
Usage: timet [OPTIONS] --completions <COMPLETIONS>
Options:
-m, --month <MONTH> Month to get the time entries for, defaults to this month
-y, --year <YEAR> Year to get the time entries for, defaults to this year
-i, --init Create a new config file
--completions <COMPLETIONS> Create shell completions [possible values: bash, elvish, fish, powershell, zsh]
-h, --help Print help
-V, --version Print version
Currently, the package is available a couple of places, including Homebrew, AUR and Nix.
cargo install --locked timet-rs
brew tap sondr3/homebrew-taps
brew install sondr3/homebrew-taps/timet
You can also download the matching release from the release
tab, extracting the archive and
placing the binary in your $PATH
. Note that for Linux the
unknown-linux-musl.tar.gz
is preferred as it is statically linked and thus
should run on any Linux distribution.
WTFPL