Skip to content

Temperature conversion tool for the command line written in Go

License

Notifications You must be signed in to change notification settings

solbero/tempconv

Repository files navigation


Logo

Temperature conversion tool for the command line written in Go.

Release Build Tests Codecov License

Demo

Demo

About

Tempconv supports conversion between the following temperature scales:

  • Kelvin
  • Celsius
  • Fahrenheit
  • Rankine
  • Delisle
  • Newton
  • Réaumur
  • Rømer

Installation

Binary

Download the latest release for your platform from the releases page and place it somewhere in your PATH.

Go

If you have Go installed, you can install tempconv with the following command:

go install github.com/solbero/tempconv@latest

Usage

tempconv [-d -u <int> | -v | -h] temp from_scale to_scale

Arguments

  • temp: Temperature to convert
  • from_scale: Scale to convert temperature from
  • to_scale: Scale to convert temperature to

If temperature is negative, it must be prefixed with '--' to avoid being interpreted as a flag.

Options

  • -d <int>: Number of decimal places [default: 2, min: 0, max: 12]
  • -h: Show help and exit
  • -u: Include temperature unit
  • -v: Show version and exit