1
6
Fork
You've already forked whats
0
Command line tool for getting answers to everyday questions like whats 2 meters in feet or more importantly whats 1.21 gigawatts in watts https://xn--gckvb8fzb.com/whats-1-21-gigawatts-in-watts/
  • Zig 100%
Find a file
2026年02月10日 18:02:45 +09:00
.github Update setup-zig version, temporarily remove Windows 2026年02月10日 18:02:45 +09:00
.README.md Update gif 2025年04月16日 19:50:31 -05:00
src Implement first shot on velocity 2026年02月10日 17:52:37 +09:00
.gitignore Trying out GoReleaser for Zig 2025年04月14日 19:36:19 -05:00
.goreleaser.yaml Update setup-zig version, temporarily remove Windows 2026年02月10日 18:02:45 +09:00
build.zig Refactor args parsing, update Zig version to 0.15.0+ 2026年02月10日 17:29:07 +09:00
build.zig.zon Refactor args parsing, update Zig version to 0.15.0+ 2026年02月10日 17:29:07 +09:00
LICENSE Initial commit 2025年04月14日 18:23:50 -05:00
README.md Implement first shot on velocity 2026年02月10日 17:52:37 +09:00

whats

whats

Command line tool for getting answers to everyday questions like:

whats 2 meters in feet

... or more importantly:

whats 1.21 gigawatts in watts

This tool is in its very early stages and right now primarily a finger exercise for me while getting into Zig.

TODO

  • Add lazy loading of data based on command (e.g. if no money required don't load)

whats --help

Usage: whats [OPTION]... NUMBER [UNIT] [OPERATOR] [NUMBER] [UNIT]
A command for basic convertion and calculation.
 -h, --help display this help and exit
 -v, --version output version information and exit
Units:
 Symbol Name
--------------------------------------------------------------------------------
MONEY:
 EUR EUR
 RON RON
 PLN PLN
 USD USD
 ILS ILS
 KRW KRW
 MYR MYR
 MXN MXN
 NOK NOK
 JPY JPY
 ISK ISK
 SGD SGD
 BGN BGN
 DKK DKK
 TRY TRY
 ZAR ZAR
 CZK CZK
 CNY CNY
 BRL BRL
 PHP PHP
 NZD NZD
 HKD HKD
 INR INR
 AUD AUD
 IDR IDR
 GBP GBP
 SEK SEK
 THB THB
 CHF CHF
 CAD CAD
 HUF HUF
DATA:
 b bit
 Kb kilobit
 Mb megabit
 Gb gigabit
 Tb terabit
 Pb petabit
 Eb exabit
 Zb zettabit
 Yb yottabit
 B byte
 KB kilobyte
 MB megabyte
 GB gigabyte
 TB terabyte
 PB petabyte
 EB exabyte
 ZB zettabyte
 YB yottabyte
 KiB kibibyte
 MiB mebibyte
 GiB gibibyte
 TiB tebibyte
 PiB pebibyte
 EiB exbibyte
 ZiB zebibyte
 YiB yobibyte
ENERGY:
 J joule
 qJ quectojoule
 rJ rontojoule
 yJ yoctojoule
 zJ zeptojoule
 aJ attojoule
 fJ femtojoule
 pJ picojoule
 nJ nanojoule
 μJ microjoule
 mJ millijoule
 cJ centijoule
 dJ decijoule
 daJ decajoule
 hJ hectojoule
 kJ kilojoule
 MJ megajoule
 GJ gigajoule
 TJ terajoule
 PJ petajoule
 EJ exajoule
 ZJ zettajoule
 YJ yottajoule
 RJ ronnajoule
 QJ quettajoule
 Wh watthour
 kWh kilowatthour
 MWh megawatthour
 GWh gigawatthour
 TWh terawatthour
 PWh petawatthour
 eV electronvolt
 cal calorie
LENGTH:
 m meter
 am attometer
 fm femtometer
 pm picometer
 nm nanometer
 μm micrometer
 mm millimeter
 cm centimeter
 dm decimeter
 dam decameter
 hm hectometer
 km kilometer
 Mm megameter
 Gm gigameter
 Tm terameter
 Pm petameter
 Em exameter
 Å angstrom
 in inch
 ft foot
 yd yard
 mi mile
 nmi nauticalmile
 lea league
 fur furlong
MASS:
 g gram
 qg quectogram
 rg rontogram
 yg yoctogram
 zg zeptogram
 ag attogram
 fg femtogram
 pg picogram
 ng nanogram
 μg microgram
 mg milligram
 cg centigram
 dg decigram
 dag decagram
 hg hectogram
 kg kilogram
 Mg megagram
 Gg gigagram
 Tg teragram
 Pg petagram
 Eg exagram
 Zg zettagram
 Yg yottagram
 Rg ronnagram
 Qg quettagram
 gr grain
 dr drachm
 oz ounce
 lb pound
 st stone
 t ton
 ___ slug
POWER:
 W watt
 qW quectowatt
 rW rontowatt
 yW yoctowatt
 zW zeptowatt
 aW attowatt
 fW femtowatt
 pW picowatt
 nW nanowatt
 μW microwatt
 mW milliwatt
 cW centiwatt
 dW deciwatt
 daW decawatt
 hW hectowatt
 kW kilowatt
 MW megawatt
 GW gigawatt
 TW terawatt
 PW petawatt
 EW exawatt
 ZW zettawatt
 YW yottawatt
 RW ronnawatt
 QW quettawatt
PRESSURE:
 Pa pascal
 qPa quectopascal
 rPa rontopascal
 yPa yoctopascal
 zPa zeptopascal
 aPa attopascal
 fPa femtopascal
 pPa picopascal
 nPa nanopascal
 μPa micropascal
 mPa millipascal
 cPa centipascal
 dPa decipascal
 daPa decapascal
 hPa hectopascal
 kPa kilopascal
 MPa megapascal
 GPa gigapascal
 TPa terapascal
 PPa petapascal
 EPa exapascal
 ZPa zettapascal
 YPa yottapascal
 RPa ronnapascal
 QPa quettapascal
 mbar millibar
 cbar centibar
 dbar decibar
 bar bar
 kbar kilobar
 Mbar megabar
 Gbar gigabar
 at technicalatmosphere
 atm standardatmosphere
 Ba barye
 inH20 inchofwatercolumn
 mmH20 meterofwatercolumn
 inHg inchofmercury
 mmHg meterofmercury
 N/m2 newtonpersquaremeter
 psi poundforcepersquareinch
 Torr torr
TEMPERATURE:
 C celsius
 F fahrenheit
 K kelvin
TIME:
 s second
 qs quectosecond
 rs rontosecond
 ys yoctosecond
 zs zeptosecond
 as attosecond
 fs femtosecond
 ps picosecond
 ns nanosecond
 μs microsecond
 ms millisecond
 cs centisecond
 ds decisecond
 das decasecond
 hs hectosecond
 ks kilosecond
 Ms megasecond
 Gs gigasecond
 Ts terasecond
 Ps petasecond
 Es exasecond
 Zs zettasecond
 Ys yottasecond
 Rs ronnasecond
 Qs quettasecond
 min minute
 hr hour
 d day
 ___ month
 yr year
 ___ decade
 ___ century
 ___ millennium
 tp plancktime
 ___ fortnight
 ___ score
VELOCITY:
 m/s meterpersecond
 km/h kilometerperhour
 mph milesperhour
 ft/s footpersecond
 kn knot
VOLUME:
 L liter
 qL quectoliter
 rL rontoliter
 yL yoctoliter
 zL zeptoliter
 aL attoliter
 fL femtoliter
 pL picoliter
 nL nanoliter
 μL microliter
 mL milliliter
 cL centiliter
 dL deciliter
 daL decaliter
 hL hectoliter
 kL kiloliter
 ML megaliter
 GL gigaliter
 TL teraliter
 PL petaliter
 EL exaliter
 ZL zettaliter
 YL yottaliter
 RL ronnaliter
 QL quettaliter
 min minim
 qt quart
 pt pint
 gal gallon
 floz fluidounce
 fldr usfluiddram
 tsp teaspoon
 tbsp tablespoon
 uspt uspint
 usqt usquart
 pot uspottle
 usgal usgallon
 usfloz usfluidounce
 c uscup
 jig usshot
 gi usgill
 bbl barrel
 ___ oilbarrel
 ___ hogshead
CALCULATION:
 % percent
--------------------------------------------------------------------------------
Note:
 Symbols are case-sensitive, names are not.
Operators:
 in: Conversion, e.g. 2m in feet
 to: Conversion or calculation, e.g. 2m to feet, 10 to 20
 of: Calculation, e.g. 20% of 100, 20 of 100
Math operators:
 plus, + Addition, e.g. 1 plus 2, 1 + 2
 minus, - Subtraction, e.g. 10 minus 6, 10 - 6
 times, x, * Multiplication, e.g. 3 times 2, 3 x 2
 by, divided, / Division, e.g. 15 by 3, 15 divided by 3
 power, ^ Exponentiation, e.g. 10 power 4, 10 ^ 4
The operator is optional when units are present:
 whats 2 m ft
 whats 10% 100
Examples:
 whats 2 meters in feet
 whats 1.21 gigawatts in watts
 whats 8 kg in grams
 whats 1024 KiB in MiB
 whats 3 times 2
 whats 10 + 5
 whats 15.4 divided by 2
 whats 100 km per hour in mph
Compound units can be written as:
 whats 100 km/h in mph
 whats 100 mph in knots
Spaces are optional:
 whats 2m ft
Report bugs at: https://codeberg.org/mrus/whats/issues
Home page: http://xn--gckvb8fzb.com/projects/whats/