X-debbugs-Cc: [email protected]
Package: units
Version: 2.19-1
Severity: wishlist

Idea:
Let's say we found some mysterious scale, but cannot figure out what
units it is reporting in.

We reach into our pocket and place an e.g., 3.75 gram coin upon it...
Let's say we observe the scale says "0.120". Well running

$ for i in pound dram carat grain oz tailiang kin liang troypound \
 troyounce pennyweight jewelerspoint momme g apscruple;\
 do units --one-line --verbose 3.75g $i; done | sort -k 3n | column -t
3.75g  =  0.00625       kin
3.75g  =  0.0082673348  pound
3.75g  =  0.010047108   troypound
3.75g  =  0.036075643   liang
3.75g  =  0.1           tailiang
3.75g  =  0.1205653     troyounce
3.75g  =  0.13227736    oz
3.75g  =  1             momme
3.75g  =  2.1164377     dram
3.75g  =  2.411306      pennyweight
3.75g  =  2.8935672     apscruple
3.75g  =  3.75          g
3.75g  =  18.75         carat
3.75g  =  57.871344     grain
3.75g  =  1875          jewelerspoint

tells us the scale is probably talking in troyounces!

Problem is: all weight related units are hopelessly scattered around the
units file. We need to find each one by hand.

Well with a new --conformable flag, we could instead do
$ for i in $(units --conformable g); do ...
for the same effect.

$ units --conformable feet
yard km ft m mile ....

$ units --conformable gallon
liter pint gallon ...

Reply via email to