Crates.io | aspect-ratio-cli |
lib.rs | aspect-ratio-cli |
version | 0.2.0 |
created_at | 2025-04-26 04:51:35.965697+00 |
updated_at | 2025-05-04 15:23:56.016375+00 |
description | A simple Rust library to calculate aspect ratio |
homepage | https://github.com/anhkhoakz/some-rust-scripts/tree/main/aspect-ratio |
repository | https://github.com/anhkhoakz/some-rust-scripts/tree/main/aspect-ratio |
max_upload_size | |
id | 1649887 |
size | 40,390 |
aspect-ratio-cli is a fast, simple CLI tool written in Rust for reducing width and height values to their simplest aspect ratio form. It supports multiple input formats and is designed for efficient use in the terminal.
<width> <height>
, <width>x<height>
, or <width>:<height>
git clone https://github.com/anhkhoakz/some-rust-scripts.git
cd some-rust-scripts/aspect-ratio
just build
System-wide (optional, requires sudo):
just install
Or from crates.io:
cargo install aspect-ratio-cli
just uninstall
# or, if installed via Cargo:
cargo uninstall aspect-ratio-cli
aspect-ratio-cli [COMMAND]
convert
: Convert an aspect ratio to a target width or height.info
: Show info about an aspect ratio.completions
: Generate shell completions for popular shells.calc
: Reduce an aspect ratio to its simplest form.-h, --help
: Print help for the tool or command.-V, --version
: Print the version of the tool.aspect-ratio-cli calc 1920 1080
If you provide invalid input, the tool will print an error and usage instructions.
Contributions are welcome! Please open issues or pull requests on GitHub. See the root CONTRIBUTING.md
for guidelines.
This project is licensed under the GNU General Public License v2.0. See the LICENSE file for details.