Is it possible to perform multiple commodity conversions in order to
get output in a specific commodity?

I'm trying to  abuse Ledger again (this time for calculating the
power/cooling budget on a server room), and various devices have their
power use ratings given in different ways - for example, in Watts,
Amps, or BTU.   These are all simple multiplicative conversions, so
they can be expressed using Ledger's commodity pricing - for example:

--
; Default commodity is BTU
D 1000 BTU

; 1 W = 3.414 BTU/H
P 2011/01/01    W   3.414 BTU

; 1 Amp at 120V = 120W
P 2012/01/01    A   120 W

2012/01/01
   Rack1:Server1  10A
   UPS1
--

The goal of this exercise was to get a cooling budget in BTU, but
running it against ledger -V, the output is in W.

I assume either that multiple conversions aren't supported, or I'm
misunderstanding the meaning of the default commodity line ("D"),
which I was under the impression provides number format and commodity
when -V is used.

Anyone care to enlighten me as to whether/how this could be done?

(hledger has the same behavior when used with -B, which is it's -V equivalent)

Thanks,
Zack

Reply via email to