No description
Find a file
2016-08-24 17:24:58 -04:00
src Add units for query 2016-08-24 17:24:58 -04:00
tests Add some basic unit tests 2016-08-22 19:20:49 -04:00
Cargo.toml Compile in definitions.units by default 2016-08-22 12:03:00 -04:00
datepatterns.txt Add dedicated date patterns file, improve dates 2016-08-22 14:53:33 -04:00
definitions.units Rename some commonly confused units 2016-08-24 12:23:15 -04:00
LICENSE-GPL Switch to MPL 2016-08-22 10:46:22 -04:00
LICENSE-MPL Switch to MPL 2016-08-22 10:46:22 -04:00
README.md Compile in definitions.units by default 2016-08-22 12:03:00 -04:00

Rink

A unit conversion tool in Rust. The name is a subset of frink, another unit conversion tool, to indicate that this tool implements a subset of frink's features.

Select features:

  • High-precision bignum rational arithmetic
  • Detailed error messages
  • IRC bot

Install

cargo install rink

Examples

> kWh/year -> W
approx. 0.1140795 W (power)
> W -> J
Conformance error
   Left side: 1 watt (power)
  Right side: 1 joule (energy)
  Suggestion: multiply left side by time
              multiply right side by frequency
> gallon gasoline -> kWh
approx. 36.63388 kWh (energy)
> googol^100
1.0e10000 (dimensionless)

Library Usage

Add this to your Cargo.toml:

[dependencies]
rink = "0.2"

and this to your crate root:

extern crate rink;

License

Rink source code is licensed under the Mozilla Public License, version 2. See LICENSE-MPL for details.

The data file definitions.units is licensed under the GNU General Public License, version 3. See LICENSE-GPL for details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work will grant the rights lined out in the MPL, including larger works with secondary licenses.

Changelog

0.2.0

  • Errors for division by zero
  • Better conversion (->) output
  • Bignum arithmetic
  • API docs
  • IRC bot
  • Addition

0.1.1

  • Search for units.txt in standard directories
  • Rustyline

0.1.0

  • Initial release