Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azzamsa/nai
Measure the duration of meaningful pursuits ⌚
https://github.com/azzamsa/nai
cli time
Last synced: 6 days ago
JSON representation
Measure the duration of meaningful pursuits ⌚
- Host: GitHub
- URL: https://github.com/azzamsa/nai
- Owner: azzamsa
- License: mit
- Created: 2023-06-19T07:59:45.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-07T06:11:08.000Z (5 months ago)
- Last Synced: 2024-12-17T17:17:14.265Z (7 days ago)
- Topics: cli, time
- Language: Rust
- Homepage:
- Size: 103 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Nai (나이)
Measure the duration of meaningful pursuits.
![demo](https://github.com/azzamsa/nai/assets/17734314/b2e720fe-4517-44b6-817f-321b3b0f8289)
---
## Features
- Measure the duration of cherished moments.
- Use any template in your imagination!.
- Fancy error message and colorful output.
- Cross-platform and single binary.## Why?
I want to have a fast way to calculate my family age, how long I have been working for a company, marriage, and other stuff.
## Usage
Create a file named `config.ron` in ~/.config/nai/. If you are on Windows, put it under \AppData\Nai\. Then add your configuration:
```rust
Config(
moments: [
// My birthday
(
start_date: "1980-10-30",
// Currently, only `start_date` and `duration` are available
format: "👶 {{ 'Aragorn II Elessar age (Me)' | cyan | bold }}\nBorn at: {{ start_date | red }}\nAge: {{ duration }}\n",
),
],
)
```To see more configuration, see the `example` directory.
## Installation
### From binaries
The [release page](https://github.com/azzamsa/nai/releases) includes
pre-compiled binaries for GNU/Linux, macOS, and Windows.### From source
Using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
```bash
$ cargo binstall nai
```Using Rust's package manager [cargo](https://github.com/rust-lang/cargo):
```bash
$ cargo install nai
```## Development
```bash
git clone https://github.com/azzamsa/nai# Build
cd nai
cargo build# Run unit tests and integration tests
cargo test# Install
cargo install --path .
```## Contributing
To learn more read [the development guide](docs/dev/README.md)
## Origin of the name
Nai (나이) means "age" in Korean.
## Credits
- [Noto Emoji](https://github.com/googlefonts/noto-emoji)