Ledger also doesn't natively export lot prices. We need lot prices to compute 
capital gains. They are locked in my ledger files. How to get them out?

It turns out that if you learn ledger's language for output formatting, and 
learn how to craft a custom --csv-format string, it's possible to make ledger 
export verbose posting amounts (like "4 btc {$359} [12-21-1394]"), but then 
your spreadsheet has that whole string in a column. And you have to parse it to 
get the $359. This is a lot of work just to get my lot price data out of 
ledger. I feel trapped.

It would be much nicer if there was an output code for lot price, and if ledger 
didn't require you to write your own --csv-format string to get it, and just 
put the lot price in its own column in the exported CSV file, and if there was 
an output code for a transaction ID, that ledger exported as a column as well.

The only way I see to get transaction data out of ledger is to do a lisp 
export. I actually implemented a sexpression parser in python in order to parse 
the output and convert it to CSV or JSON. But it crashed my parser. Then I 
tried evaluating the sexpression in emacs, and emacs segfaulted. So I dunno. 
But even if that worked, I'd have had to parse the lot prices from strings.

-- 

--- 
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