1
0

README updated to current arguments structure.

This commit is contained in:
Alexander Andreev 2020-06-07 04:59:51 +04:00
parent f4f026f8b2
commit 0efb129ad3

View File

@ -23,36 +23,26 @@ took by a simple text format.
This is a CLI program that is broken down to three separate programs: This is a CLI program that is broken down to three separate programs:
- `piggybank-put` — puts coins in a piggy bank and create a new one if piggybank [OPTIONS] (COINS in FILE [of CURRENCY] | COINS from FILE
there is no such file; | show FILE [with t(ransactions)])
- `piggybank-take` — takes coins from an existsing piggy bank file;
- `piggybank-show` — shows summarised information on a piggy bank and,
optionally, print a list of transactions.
## Common flags Options:
```bash - `-h,--help` — print this help;
piggybank-* [(-h | --help) | (-v | --version) | (-L | --list-currencies)
| --set-default-currency]
```
These flags are used with every sub-program. - `-v,--version` — print program version;
`--help` to show help. - `-L,--list-currencies` — list supported currencies and a default one;
`--version` to show version of program. - `--set-default-currency` — set currency that'll be used as a default;
`--list-currencies` to show what currencies supported and which one is default.
`--set-default-currency` to set a currency of your choice as default one.
## How to put coins in ## How to put coins in
```bash ```bash
piggybank-put [-r | --reverse] COINS in FILE of CURRENCY piggybank [-r | --reversed] COINS in FILE [of CURRENCY]
``` ```
`--reverse` flag reverses the order of coins. By default they come from least `--reversed` flag reverses the order of coins. By default they come from least
significant face value to the most significant one and as stated above being significant face value to the most significant one and as stated above being
complemented from left so a set shorter than number of coins in a currency, complemented from left so a set shorter than number of coins in a currency,
e.g. 5 8 4 will be interpreted as 0 0 0 5 8 4. And this flag will make it e.g. 5 8 4 will be interpreted as 0 0 0 5 8 4. And this flag will make it
@ -74,14 +64,14 @@ Case-insensitive.
### Examples: ### Examples:
```bash ```bash
piggybank-put 7 4 3 0 5 in example.pb of EUR piggybank 7 4 3 0 5 in example.pb of EUR
piggybank-put -r 0 4 6 in example piggybank -r 0 4 6 in example
``` ```
## How to take coins out ## How to take coins out
```bash ```bash
piggybank-take [-r | --reverse] COINS in FILE piggybank [-r | --reversed] COINS from FILE
``` ```
All the parameters are explained above. All the parameters are explained above.
@ -89,13 +79,13 @@ All the parameters are explained above.
### Examples: ### Examples:
```bash ```bash
piggybank-take -r 0 0 4 from example.pb piggybank -r 0 0 4 from example.pb
``` ```
## How to see what you have in there ## How to see what you have in there
```bash ```bash
piggybank-show FILE [ with (t | transactions)] piggybank show FILE [with t(ransactions)]
``` ```
It will print a summary table of what is stored in a piggy bank. It will print a summary table of what is stored in a piggy bank.
@ -106,7 +96,7 @@ file.
### Examples: ### Examples:
```bash ```bash
piggybank-show example.pb with t piggybank show example.pb with t
``` ```
# Configuration # Configuration