Give me money! A CLI program to help you allocate money.
gmmis abbr of "give me money".
gmm [total to be allocated] [money of each participant, can use "=" to specify name]example:
gmm 100 40 70result:
Total to be allocated: $100.00
+----------+----------+-----------+
| No./Name | Original | Allocated |
+----------+----------+-----------+
| 1 | 40 | $36 |
+----------+----------+-----------+
| 2 | 70 | $64 |
+----------+----------+-----------+
This program also support named participants by using name=amount format. Consider the following example:
gmm 100 30 bar=20 foo=40 50
it will print:
Total to be allocated: $100.00
+----------+----------+-----------+
| No./Name | Original | Allocated |
+----------+----------+-----------+
| 1 | 30 | $21 |
+----------+----------+-----------+
| bar | 20 | $14 |
+----------+----------+-----------+
| foo | 40 | $29 |
+----------+----------+-----------+
| 4 | 50 | $36 |
+----------+----------+-----------+
Currently, we provide pre-compiled binaries for the following targets (target triple format):
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
Download from GitHub Release page or run
(replace x86_64-unknown-linux-gnu with your target):
wget -O gmm $(curl -s https://api.github.com/repos/hms5232/givememoney/releases/latest | grep "browser_download_url" | grep "x86_64-unknown-linux-gnu" | awk '{ print $2 }' | sed 's/"//g')then chmod +x gmm if not executable.
- Clone this repo and ensure the device has cargo installed.
cdinto project dir and- run
cargo run -- [total to be allocated] [each participant]. - run
cargo build --releaseto build binary.
- run
Copyright © 2023 hms5232
Licensed under Apache 2.0.