On Wednesday, September 23, 2015 at 12:52:05 AM UTC-7, John Wiegley wrote:
>
> >>>>> Michael Toomim <[email protected] <javascript:>> writes: 
>
> > Now I have to give up on Ledger. I can't store my transactions in it, 
> > because I can't get them out when I need to calculate capital gains. I 
> have 
> > to write my own ledger alternative. I have to manually re-enter a lot of 
> > data. :( 
>
> > **I'd love to be proven wrong, but I failed exporting with everything I 
> > tried: (1) ledger register, (2) ledger csv, (3) python "import ledger", 
> and 
> > (4) ledger lisp. I didn't try (5) xml because xml is gross. 
>
> I'm not sure what you mean by "can't get them out".  You can export every 
> single detail of a transaction.  Can you give me an example of a single 
> transaction, and the exported data you'd like to see from it? 
>
> John 
>

Sure, I gave examples at the beginning of this thread 
<https://groups.google.com/forum/#!topic/ledger-cli/5De9q-QXxZM>. I want to 
get a transaction out, but the csv and register commands will only give me 
postings.

Here's a transaction:

2014-1-1 sold bitcoin
   Assets:bitcoin    4 btc @ $250
   Assets:cash       -$1,000

CSV export will currently give you:

"2014/01/01","","sold bitcoin","Assets:bitcoin","btc","4","",""
"2014/01/01","","sold bitcoin","Assets:cash","$","-1000","",""

But there's no way to group those two lines back into the single 
transaction they came from. To calculate capital gains, we need to find all 
*transactions* where one posting is in cash, and the other is in bitcoin.

At the beginning of this thread I gave details on everything I tried to get 
this information out of Ledger.

-- 

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