Not sure this is helpful but
1. Similar project Beancount will soon (before Christmas, I'm actively
working on revisiting booking from scratch, see branch "booking" if you
want to track progress) have FIFO capability built in, so you definitely
shouldn't have to write your own project from scratch to do this
2. If you want to write your own fifo algorithm right now, you can do it by
setting the booking method for the accounts you're interested in to "NONE"
which replicates the ledger model and disables the requirement that
reducing lots must match a real lot and write a simple Beancount plugin
that resets the fifo lots of reducing lots automatically (by rewriting
transactions). You would leave the booking info of reducing lots to empty
or zero or whatever and have your plugin fill it in

Beancount files convert to ledger files result so you should still be able
to use it if you wish.

Id write a more detailed reply with an example but I'm on vacation in Korea
typing this on a phone. Maybe later at the hotel

Cheers


On Wed, Sep 23, 2015, 16:22 Michael Toomim <[email protected]> wrote:

> To summarize the problem:
>
>    - Ledger itself cannot calculate capital gains for commodities
>    - Ledger cannot** even export the data you need to calculate it
>    yourself!
>
> So your data becomes trapped in Ledger files that you can't use! You can't
> get it out!
>
> 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.
>
> --
>
> ---
> 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.
>

-- 

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