Mixed positive and negative balances were confusing things. Now, the chart
will omit any balances which do not match the sign of the first balance.
Various other size/font/colour tweaks.
Charts are now red for positive balances (like expense accounts) and green
for negative balances (like income accounts). This is fun, but falls down
for eg assets and liabilities.. better ideas welcome.
We now do data filtering/massage as late as possible, not just once at
startup. This should work better for multiple commands, as with web or ui.
The basic benchmark seems at least as good as before thanks to laziness.
This patch fixes broken layout of some commands when there is Unicode
text in the ledger file.
I substituted System.IO functions with System.IO.UTF8. Now all strings
are Unicode internally, and take's and length's work correctly.
In particular, add, balance, hist, print and register commands seem
to work correctly; ui is still broken for me, I didn't try web.
I decode command line arguments from UTF8 forcefully, to permit
searches for accounts and descriptions with Unicode (otherwise, it
does not work).
The patch adds an additional dependency: utf8-string.
This patch does not include new test cases.
This renames RawTransaction -> Posting and Entry -> LedgerTransaction,
plus a bunch more cleanups for consistency. So while ledger 3 has
transactions containing postings, and so do we when speaking to users,
internally we call ledger 3's transactions LedgerTransaction, and we keep
our old Transaction type as well, because it's useful and used all over
the place. To review:
- ledger 2 had Entrys containing Transactions.
- hledger 0.4 had Entrys containing RawTransactions, and Transactions
which are a RawTransaction with its parent Entry's info added.
Transactions are what we most work with when reporting and are
ubiquitous in the code and docs.
- ledger 3 has Transactions containing Postings.
- hledger 0.5 now has LedgerTransactions containing Postings, with
Transactions kept as before (a Posting plus it's parent's info). These
could be named PartialTransactions or TransactionPostings, but it gets
too verbose and obscure for devs and users.