tiffany352 / rink-rs

Unit conversion tool and library written in rust
https://rinkcalc.app/about
GNU General Public License v3.0
442 stars 28 forks source link

Custom unit definitions #79

Open tiffany352 opened 4 years ago

tiffany352 commented 4 years ago

Add a new command define {name} {expr}. Probably also undef {name} and list-defs as well. They'll need to be mentioned in the manual.

Units should be saved to the config directory and be stored in json format (DefEntry's Serialize/Deserialize impl).

Editing the file directly should let you use additional functionality like defining new substances, categories, base units, prefixes.