timet-rs

Crates.iotimet-rs
lib.rstimet-rs
version0.2.0
sourcesrc
created_at2024-02-12 15:24:25.180325
updated_at2024-02-29 21:26:29.19129
descriptionAutomate your Timet fetching
homepagehttps://github.com/sondr3/timet-rs
repositoryhttps://github.com/sondr3/timet-rs
max_upload_size
id1137086
size40,564
Sondre Aasemoen (sondr3)

documentation

https://github.com/sondr3/timet-rs

README

timet-rs

GitHub Actions Status Crates

Automate your hours

  • Simple: timet --init to create a config
  • Handy: timet to fetch your hours for the current month

Usage

Simply 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

Configuration

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.

Completion

If your method of installation didn't include shell completion, you can manually source or save them with the timet --completion <shell> command.

Help

$ 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

Installation

Currently, the package is available a couple of places, including Homebrew, AUR and Nix.

Cargo
cargo install --locked timet-rs
Homebrew
  1. brew tap sondr3/homebrew-taps
  2. brew install sondr3/homebrew-taps/timet

Release pages

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.

LICENSE

WTFPL

Commit count: 0

cargo fmt