Ah, I missed `--raw`, thank you! I had an additional problem too, I was
doing this:
2015/2/1 initial balance
Assets $20
Income
2015/2/4 Checkpoint
Assets = $20
In this case `ledger print --raw --empty` would still fail to display the
checkpoint, but when I change to:
2015/2/1 initial balance
Assets $20
Income
2015/2/4 Checkpoint
Assets $0 = $20
Then it works. Maybe worthy of a minor bug, or maybe my original syntax
isn't legal. In any case I can proceed, thank you!
Mike.
On Monday, 27 April 2015 10:06:36 UTC-4, Michael Iles wrote:
>
> (Background: in the process of moving from GnuCash; my main draw to ledger
> is #1 the balance assertions, and #2 that it fits into a typical Linux
> toolchain, especially that I can use source control for data files.)
>
> I don't know if this is best practice (feedback welcome!) but my current
> approach to import new transactions is to put them in a file which includes
> my previous ledger file, and then do 'ledger -f old.ledger --sort d --empty
> print > new.ledger' to create a new ledger with everything in the right
> order.
>
> I'm using a lot of balance assertions because I frequently refactor old
> transactions. I found that balance assertions require the ledger to be
> fully sorted, so I can't avoid this rewriting step. I found this
> refactoring to be very painful in GnuCash precisely because it doesn't have
> the ability to do balance assertions, so anytime the current balance didn't
> line up I would have to do a laborious binary search through the account
> history to figure out where things went wrong.
>
> My problem now is that balance assertions aren't preserved when using
> 'print'... so my rewriting step doesn't work because it doesn't preserve
> all the information in the ledger.
>
> What should I do? Is there a flag similar to '--empty' that will tell
> ledger to preserve the balance assertions? This would actually be a
> showstopper for me, if I was unable to import new transactions and still
> preserve old transactions.
>
> Thanks,
> Mike.
>
>
>
--
---
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.