Use two options and less surprising behaviour. Notes:
* a recognised suffix on the output file name can set the format
* but --output-format always wins
* -o - means stdout
* currently these are command-specific options on balance, print, register
* later, --output-file should become a global option
* and --output-format should be available at least on all commands which
support multiple formats. Each command may support a different set of
output formats, which should be listed in its command line help.
Previously, a depth:0 query produced an empty report (since there are no
level zero accounts). Now, it aggregates all data into one summary item
with account name "...".
This makes it easier to see the kind of data Gwern was looking for from
register-csv (net worth over time). Eg this shows one line per month
summarising the total of assets and liabilities:
hledger register-csv -- -MHE ^assets ^liabilities depth:0
Single and multi-column balance reports behave similarly.
hledger has represented quantities with floating point (Double) until
now. While this has been working fine in practice, the time has come to
upgrade our number representation to something more principled: Decimal,
for now. As a bonus, this brings a ~30% speed boost to most reports.
We'll keep the old representation(s) around for a while, selectable via
hledger-lib cabal flag, for research/testing/benchmarking purposes. To
build with the old Double representation: cabal install -fdouble
hledger-lib hledger hledger-web
When posting amounts or the running total contain more than one
commodity, register-csv now prints them comma-separated on one line,
instead of on multiple lines breaking the CSV output.
This is may not be ideal for CSV consumers; alternatives include
failing with an error, adding columns for additional commodities,
ignoring all but one commodity.
hledger-register-csv.hs now accepts the same -H, -A and -r flags that
register does (but not -w, which wouldn't make sense).
Note: remember, when running add-ons with the hledger executable, most
add-on command flags must be preceded by --. So it's:
$ hledger register-csv -- -H
Fed up with GHC/cabal constantly assaulting me like Cato in a Pink
Panther movie, here are some shell tests to give me some
warning/reassurance about the dev setup on various machines.
Thou Shalt Not Reimplement Autoconf, but perhaps a little cross-platform
test suite focussed on my needs is a reasonable idea.
The -A flag now enables -E, so that with a report interval the averages
are always per-period and not per-report-line. (Without a report
interval, -E is already the default).