>>>>> "JS" == Joel Swanson <[email protected]> writes:

JS> Hmm, I just ran across your older post describing ledger's architecture
JS> (https://groups.google.com/d/topic/ledger-cli/RSSCsSLEhwc/discussion), and
JS> I'm wondering if my external Python script for calculating FIFO gain/loss
JS> for commodities is perhaps too complex of a solution.

Sounds like something I'd have intended Python support to allow. :)

JS> Would one define new valexpr vocabulary via Python functions as you
JS> mentioned within one's ledger file?

Every object and scope can introduce new verbs, by defining a `lookup` method.

JS> Where in ledger's source code can I find out about existing valexpr
JS> vocabulary?

It's in several files: account.cc, item.cc, post.cc, report.cc, global.cc,
etc.

JS> I'm wondering if I could define sufficient valexpr vocabulary to build
JS> reporting filters to calculate and display the booking and clearing of
JS> commodities lots. I've built the logic in an external Python script, but
JS> haven't yet got it running without errors.

It should certainly be possible. In report.h you'll see how the current
reports are defined in terms of valexprs.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to