clock-cli

Crates.ioclock-cli
lib.rsclock-cli
version0.1.1
sourcesrc
created_at2020-09-23 07:13:09.241089
updated_at2020-10-10 22:50:22.208014
descriptionClock utilities (stopwatch, timer) on the command line with TUI (text user interface)
homepage
repositoryhttps://github.com/TianyiShi2001/clock-cli-rs
max_upload_size
id291996
size422,417
Tianyi Shi (TianyiShi2001)

documentation

https://docs.rs/clock-cli

README

clock-cli-rs

Command line clock utilities, with TUI interfaces, implemented in Rust. Currently, these features are implemented:

  • Stopwatch
    • start/pause/stop: ✅
    • lap time (similar to iOS's stopwatch's behaviour): ✅
    • report of all pause/start/lap instances (moments): WIP
  • (Countdown) Timer
    • basics: ✅

Installation

If you are a Rustacean 🦀️, just cargo install clock-cli.

Other installation methods: WIP

Usage

Stopwatch:

simply run:

clock
  • Press Space to pause/resume.
  • Press l to lap. Mouse-scroll or press arrow keys to view more.
  • Press return to finish.

Countdown Timer:

Specify the duration (in natual language) to run a countdown.

Examples:

clock 3 minutes
clock 4h3m
clock 1 day
  • Press Space to pause/resume.
  • Press return to cancel.

Compatibility

Currently only works on Linux and MacOS.

Acknowledgement

The TUI is based on the cursive crate made by Alexandre Bury (@glycos), who also helped me a lot during the development of this crate (see glycose/cursive/#503)

Commit count: 14

cargo fmt