4 releases

0.2.0 Feb 29, 2024
0.1.2 Feb 29, 2024
0.1.1 Feb 29, 2024
0.1.0 Feb 12, 2024

#222 in Template engine

Download history 2/week @ 2024-07-25 2/week @ 2024-09-26 2/week @ 2024-10-03

80 downloads per month

WTFPL license

13KB
218 lines

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

Dependencies

~7–19MB
~197K SLoC