Add more fields to readme

This commit is contained in:
Austen Adler 2021-05-08 14:15:33 -04:00
parent 27a684e34d
commit b745b0a77c

View File

@ -13,7 +13,8 @@ It uses link:https://github.com/fdehau/tui-rs[tui-rs] for the UI and link:https:
=== Comparison with existing tools === Comparison with existing tools
* Orpie: has more features at the moment. Matrices, units, more default constants * `orpie` (`ocaml`): has more features at the moment. Matrices, units, more default constants, etc, but I don't think it allows for custom macros
* `dc` (`c`): allows for different input/output radix, no TUI and does not show the stack
== Setup == Setup
@ -28,6 +29,18 @@ cargo install --git [this url]
rpn_rs rpn_rs
---- ----
=== Development setup
[source,sh,title='bash']
----
git clone [this url]
cargo build
# For docs
gem install --user-install rouge
asciidoctor REAMDE.adoc
----
== Usage == Usage
* `h`: Help menu - shows all keys * `h`: Help menu - shows all keys
@ -41,6 +54,58 @@ rpn_rs
* `r`: Recall next char's register * `r`: Recall next char's register
* `e`: When entering a number, applies `* 10^` * `e`: When entering a number, applies `* 10^`
=== Custom constants and macros
If you have not done this before, open the calculator and press `<ctrl+s>` to save the basic config.
Edit the config file (in Linux, edit `~/.config/rpn_rs/rpn_rs.toml` and add any constants or macros and press `<ctrl+l>` or reopen the calculator.
Sample Macros:
[toml, title='~/.config/rpn_rs/rpn_rs.toml']
----
# Push a, then b, then c, then mQ
[macros.Q]
macro = 'CalculatorMacro'
help = 'Quadratic Formula'
value = 'RcRbRarbnrb2^4rarc**-v+2ra*/rbnrb2^4rarc**-v-2ra*/'
----
Sample Constants (you can copy paste the ones you want into your config file):
[toml, title='~/.config/rpn_rs/rpn_rs.toml']
----
[constants.E]
macro = 'CalculatorConstant'
help = 'Earth Mass (kg)'
value = 5.972e24
[constants.S]
macro = 'CalculatorConstant'
help = 'Sun Mass (kg)'
value = 1.989e30
[constants.a]
macro = 'CalculatorConstant'
help = '''Avogadro's Number (mol^-1)'''
value = 6.022e23
[constants.G]
macro = 'CalculatorConstant'
help = 'Gravitational Constant (Nm^2kg^-2)'
value = 6.67e-11
[constants.c]
macro = 'CalculatorConstant'
help = 'Speed of light (m/s)'
value = 2.9979e8
[constants.h]
macro = 'CalculatorConstant'
help = 'Planck constant (Js)'
value = 6.626e-34
----
== Lore == Lore
=== Why? === Why?