From 79634cb9449372082754921adb14152ab61e378f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Thu, 1 Jun 2023 03:31:04 +0300 Subject: [PATCH] Add README.md --- README.md | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..49b5458 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +Metrify +======= +Metrify is a tool for converting commonly-used non-metric units to metric. + +Usage +----- +Simplest way to use metrify is to invoke it with an expression in terms of +non-metric units as its arguments: + + metrify 1.4 short tons + +The expression can contain several number + unit sequences, which are summed +together if the units are compatible: + + metrify 5′8″ + metrify 1 acre 15 square feet + +You can also invoke metrify without arguments, in which case it will give you a +prompt to type the expression into. + +Result display +-------------- +Metrify will pick the appropriate prefix for the given result and unit +automatically. The value is rounded so that results <1 have 4 digits, <10 3 +digits, <100 2 digits, <1000 1 digit and ≥1000 no digits after the decimal +point. The digits before the decimal point are grouped into groups of three. + + 0.4929 ml + 1.609 km + 28.35 g + 907.2 kg + 28 317 cm³ + +Supported units +--------------- + +### Length units based on the international yard + +* inch (in) +* foot (ft) +* yard (yd) +* mile (mi) + +### Mass units based on the international pound + +* ounce (oz) +* pound (lb) +* stone (st) +* short ton +* long ton + +### Temperature + +* Degrees Fahrenheit (°F) + +### Area units based on the international yard + +* square inch (in²) +* square foot (ft²) +* acre (ac) +* square mile (mi²) + +### Volume units based on the international yard + +* cubic inch (in³) +* cubic foot (ft³) + +### Imperial fluid volume units + +* imperial fluid ounce (imp fl oz) +* imperial pint (imp pt) +* imperial quart (imp qt) +* imperial gallon (imp gal) + +### US customary fluid volume units + +* US teaspoon (tsp) +* US tablespoon (tbsp) +* US fluid ounce (us fl oz) +* US cup (cup) +* US pint (us pt) +* US quart (us qt) +* US gallon (us gal) + +Why should I use metrify instead of units(1)? +--------------------------------------------- +Metrify is more special-purpose than units(1), which allows it to present the +user a nicer interface for the purposes it does support. For example with +metrify you do not need to explicitly tell it the unit you are converting to, +because due to its requirements (conversion is always from non-metric to metric) +it can automatically pick the correct one. + +Building and installation +------------------------- +You can build and test out metrify with `cargo run`. If you want to install it +locally, you can use `cargo install --path .` in the source directory. + +License +------- +Metrify is under Creative Commons Zero 1.0.