Update README with better sterling-conf.yml example

This commit is contained in:
Zachary Dziura 2018-05-17 10:13:24 -04:00
parent abfb69e82d
commit f7a6ec53a0

View file

@ -48,21 +48,21 @@ sterling --full 1p 36g 12e 82s 469c // 64 silver, 89 copper
// Convert one platinum, thirty-six gold, twelve electrum, eighty-two silver, and four hundred // Convert one platinum, thirty-six gold, twelve electrum, eighty-two silver, and four hundred
// sixty-nine copper coins, printing the full names of the coins, using the custom config file // sixty-nine copper coins, printing the full names of the coins, using the custom config file
// detailed below, including optional currencies // detailed below, including optional currencies
sterling --full -o -c "~/Documents/D&D/sterling-conf.yml" 1p 36g 12e 82s 469c // 27 sterling, 9 farthing sterling --full -o -c "~/Documents/D&D/sterling-conf.yml" 1p 36g 12e 82s 469c // 7 guilders, 6 sterling, 25 pence
``` ```
## Adding and Subtracting Currency Examples ## Adding and Subtracting Currency Examples
``` ```
// Add together ten and twenty pense, using the custom config file detailed below // Add together ten and twenty pense, using the custom config file detailed below
sterling add "10p" "20p" // 1s, 10p sterling add "10p" "20p" // 30p
// Subtract two sterling and ten pence from one florin // Subtract two sterling and ten pence from one florin
sterling sub "1F" "2s 10p" --full // 33 sterling, 10 pence sterling sub "1F" "2s 10p" --full // 2 sterling, 10 pence
// Subtract one florin from two sterling and ten pence. Note that, regardless of order, the smaller // Subtract one florin from two sterling and ten pence. Note that, regardless of order, the smaller
// value is ALWAYS subtracted from the larger value. // value is ALWAYS subtracted from the larger value.
sterling sub "2s 10p" "1F" --full // 33 sterling, 10 pence sterling sub "2s 10p" "1F" --full // 2 sterling, 10 pence
``` ```
Note that `sterling` doesn't allow for negative currencies. Therefore, when subtracting currencies, Note that `sterling` doesn't allow for negative currencies. Therefore, when subtracting currencies,
@ -80,23 +80,29 @@ within my own campaign!
``` ```
- -
name: "florin" name: "note"
rate: 8640 rate: 143360
alias: "F" alias: "N"
optional: true optional: true
- -
name: "sterling" name: "eagle"
rate: 240 rate: 17920
alias: "e"
-
name: "guilder"
rate: 896
alias: "g"
plural: "guilders"
-
name: "shilling"
rate: 32
alias: "s" alias: "s"
plural: "sterling"
- -
name: "penny" name: "penny"
rate: 12 rate: 1
alias: "p" alias: "p"
plural: "pence" plural: "pence"
-
name: "farthing"
rate: 1
alias: "f"
``` ```
Please note that the `rate` value is defined as the number of copper coins that goes into one of Please note that the `rate` value is defined as the number of copper coins that goes into one of