Hi! I'm trying to compute capital gains on some ledger files, so I'm
exporting them to CSV for a python script to analyze. I export CSV with
this:
ledger csv everything.ledger --prepend-format
'"%(filename)","%(display_amount)","%(xact.id)","%(lot_price(amount,amount))",'
> tmp.csv
However, the resulting data has automatic balanced amounts filled in. For
instance, with this original ledger souce:
2016-02-22 Loaned mark 1.5 btc
Liabilities:mark 1.5 btc @@ $150
Assets:mike
The data I get out of the CSV export fills in that balance in dollars:
2016-02-22 Loaned mark 1.5 btc
Liabilities:mark 1.5 btc @@ $150
Assets:mike $-150
That's not right for my analysis, because it was actually btc that should
be subtracted, not dollars.
So I want to know when this automatic balancing happens. Is there any way
to distinguish automatically-generated amounts from actually-entered
amounts? For instance, is there a way to get the original source text for
that line, so that I can compare it with what ledger is telling me?
--
---
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.