/ckconv

Commandline unit converter for Bethesda games.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Bethesda Engine Unit Converter


GitHub tag (latest by date)  GitHub all releases

This is a commandline utility that converts between common length measurement units & Bethesda's eponymous Unit

Features

  • Cross-Platform:
    • Windows
    • Linux
    • macOS
  • Supports Metric, Imperial, and Creation Kit measurement units
  • Can be embedded in other programs

If you're new to using CLI programs, see the beginners guide.

Installation

No formal installation is required, simply place the executable somewhere and call it from your preferred shell.

If you want to be able to use the program no matter your shell's current working directory, you'll need to place the executable in a location found in your PATH environment variable.

The program is small enough to embed within another executable, for an example see this synthesis patcher.

Adding to your PATH variable

Linux

Place the executable in /usr/local/bin to add to your path, or add export PATH='$PATH;<PATH_TO_DIRECTORY>' to the end of ~/.bashrc

Windows

See this stackoverflow answer

macOS

I genuinely have no idea as I have never owned or used a mac, but I assume it's similar to Linux.

Usage

Use ckconv -h or ckconv --help to see a usage guide, and documentation on all of the available options.

Use ckconv --units to see a list of all recognized units.
When specifying units, you can use the values in the Symbol or Name columns.

Examples

Simple conversions, and pipe operators:

Multiple conversions at once:

Converting 5 picometers to units, printed in standard notation:

With v6.0.0 comes less-strict syntax support. That means you can use expressions like 260m u or 260 m u instead of the more strict <UNIT> <VALUE> <OUTPUT_UNIT> syntax required by previous versions.