>>>>> "A" == APL  <alan.parker....@gmail.com> writes:

A> Is it possible to embed Python code in a Ledger file and use it to add
A> virtual postings to existing transactions based on tag values?

Yes, that should be possible.

The "python" directive lets you inject arbitrary Python code, such as a
function definition that is then callable from a value expression.

You can pass "xact" to this function, within the value expression used to
match a posting within that xact.

You can then modifying this xact by adding postings to it from the Python
function.

This is entirely untested, but it was intended to be possible when these
features were created.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to