Skip to content

Commit

Permalink
docs: add README for pim CLI tool documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
airRnot1106 committed Dec 16, 2024
1 parent 235165e commit 8d3f1e7
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<div align="center">
<samp>

# pim

## a lightweight and extensible CLI tool for converting between various CSS-related units (e.g., "px", "em", "rem").

</samp>
</div>

![Rust](https://img.shields.io/badge/Rust-1.72.0-orange)
![License](https://img.shields.io/badge/license-MIT-blue.svg)

---

## Installation

### Build from Source

1. **Clone the repository**:
```bash
git clone https://github.com/airRnot1106/pim.git
cd pim
```

2. **Build the binary**:
```bash
cargo build --release
```

3. **Run the tool**:
```bash
./target/release/pim --help
```

### Using `nix`

If you have `nix` installed:
```bash
nix run . -- --help
```

---

## Usage

### Basic Usage

To convert `24px` to other unit:
```bash
pim 24 px
```

**Output**:
```
px: 24px
em: 1.5em
rem: 1.5rem
```

### Custom Root Font Size

Specify a custom root font size using the `-r` option:
```bash
pim 24 px -r 10
```

**Output**:
```
px: 24px
em: 2.4em
rem: 2.4rem
```

## Tests

Run all tests:
```bash
cargo test
```

---

## License

`pim` is licensed under the [MIT License](https://github.com/airRnot1106/pim/blob/main/LICENSE).

0 comments on commit 8d3f1e7

Please sign in to comment.