Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rafatrace/propor
📐 Ratio calculator on your terminal
https://github.com/rafatrace/propor
cli-tool go
Last synced: about 2 months ago
JSON representation
📐 Ratio calculator on your terminal
- Host: GitHub
- URL: https://github.com/rafatrace/propor
- Owner: rafatrace
- Created: 2022-03-12T21:09:03.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-12T21:12:04.000Z (almost 3 years ago)
- Last Synced: 2024-06-20T17:39:06.405Z (7 months ago)
- Topics: cli-tool, go
- Language: Go
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📐 propor
## Instalation
```
$ go get -u github.com/rafaelcanical/propor
```## Documentation
To get the ratio and the percentage between two dimensions. The first one is the the width and the second argument is the height.
```
$ propor 1600 900
```The result for this will be the following:
> The ratio is: 16:9
> The percentage is: 56.25%
To get the opposite dimension of a ratio use the following method. When you want to get a height, send the value after the flag `--width` and then the width and height. To achieve the opposite, send the height value after the `--height` flag.
```
$ propor 1600 900 w 16
```The result for this will be something like this:
> The proportional height is: 9
```
$ propor 1600 900 h 9
```The result for this will be something like this:
> The proportional width is: 16
## Donation
[![Buy me a coffee](https://camo.githubusercontent.com/031fc5a134cdca5ae3460822aba371e63f794233/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/rafmrs)