Simon Michael
0b15d5771a
;update manuals
2021-05-18 10:35:43 -10:00
Simon Michael
701768765a
;doc: report intervals: expand this doc ( #1561 )
2021-05-18 10:34:40 -10:00
Stephen Morgan
efaa199a82
doc: Mention expansion of report start and end dates in report intervals.
2021-05-18 10:02:10 -10:00
Simon Michael
d3b20675d0
tools: really regenerate the cabal files with stack's hpack
...
hpack has dropped the hash at last, this should help a lot to reduce
edit conflicts and commit noise.
2021-05-14 16:14:06 -10:00
Simon Michael
239558dd75
;doc: cli: quick links
2021-05-14 08:46:15 -10:00
Simon Michael
762080058e
;doc: cli: simplify shortcut links: the [] is not needed, hopefully
2021-05-14 08:39:33 -10:00
Simon Michael
c90d89e4fb
;doc: cli: simplify internal links
2021-05-14 08:38:57 -10:00
Simon Michael
d6c12d5379
;doc: cli: organise common markdown links
2021-05-14 08:34:54 -10:00
Simon Michael
7acfb63e9b
;doc: check: cleanup
2021-05-14 08:30:56 -10:00
Simon Michael
41c8e1f6ef
;regen cabal files with latest stack's hpack (0.34.4)
2021-05-14 08:17:56 -10:00
Simon Michael
1e44371e81
;doc: cli: more regular expressions linkage
2021-05-14 07:37:13 -10:00
Simon Michael
07128cbb05
;doc: check: ordereddates: clarify within in each file
2021-05-14 07:36:35 -10:00
Stephen Morgan
dc16451de0
lib: Remove unused (amount|mixedAmount|posting|transaction)ApplyCostValuation functions.
2021-05-07 22:25:19 +10:00
Simon Michael
a722ab4338
;doc: strict mode: fix check link
2021-05-06 14:51:25 -10:00
Simon Michael
4b3358f6df
;doc: strict mode: link to check command
2021-05-06 14:31:46 -10:00
Stephen Morgan
d1467d4766
lib: When inferring total prices, use the precision of toamount, rather than NaturalPrecision.
2021-05-02 21:14:36 +10:00
Stephen Morgan
686a0871a9
lib: Make sure fromamount and toamount have opposite signs when inferring prices.
...
Also change priceInferrerFor so that it would give the correct
(negative) prices when fromamount and toamount have the same sign.
2021-05-02 21:14:36 +10:00
Stephen Morgan
0078f1a520
lib: Infer prices correctly even when there are only balance assignments.
2021-05-01 09:45:29 -10:00
Stephen Morgan
7cb621b82f
lib,cli,ui,bin: Remove unnecessary normalisedMixedAmount, replace
...
normaliseMixedAmountSquashPricesForDisplay with mixedAmountStripPrices.
2021-05-01 09:45:29 -10:00
Stephen Morgan
4780a02e5a
lib,cli: Remove showAmounts*B functions, replacing them entirely with showMixedAmount*B functions.
2021-05-01 09:45:29 -10:00
Stephen Morgan
5e7b69356f
lib: Change internal representation of MixedAmount to use a strict Map
...
instead of a list of Amounts. No longer export Mixed constructor, to
keep API clean (if you really need it, you can import it directly from
Hledger.Data.Types). We also ensure the JSON representation of
MixedAmount doesn't change: it is stored as a normalised list of
Amounts.
This commit improves performance. Here are some indicative results.
hledger reg -f examples/10000x1000x10.journal
- Maximum residency decreases from 65MB to 60MB (8% decrease)
- Total memory in use decreases from 178MiB to 157MiB (12% decrease)
hledger reg -f examples/10000x10000x10.journal
- Maximum residency decreases from 69MB to 60MB (13% decrease)
- Total memory in use decreases from 198MiB to 153MiB (23% decrease)
hledger bal -f examples/10000x1000x10.journal
- Total heap usage decreases from 6.4GB to 6.0GB (6% decrease)
- Total memory in use decreases from 178MiB to 153MiB (14% decrease)
hledger bal -f examples/10000x10000x10.journal
- Total heap usage decreases from 7.3GB to 6.9GB (5% decrease)
- Total memory in use decreases from 196MiB to 185MiB (5% decrease)
hledger bal -M -f examples/10000x1000x10.journal
- Total heap usage decreases from 16.8GB to 10.6GB (47% decrease)
- Total time decreases from 14.3s to 12.0s (16% decrease)
hledger bal -M -f examples/10000x10000x10.journal
- Total heap usage decreases from 108GB to 48GB (56% decrease)
- Total time decreases from 62s to 41s (33% decrease)
If you never directly use the constructor Mixed or pattern match against
it then you don't need to make any changes. If you do, then do the
following:
- If you really care about the individual Amounts and never normalise
your MixedAmount (for example, just storing `Mixed amts` and then
extracting `amts` as a pattern match, then use should switch to using
[Amount]. This should just involve removing the `Mixed` constructor.
- If you ever call `mixed`, `normaliseMixedAmount`, or do any sort of
amount arithmetic (+), (-), then you should replace the constructor
`Mixed` with the function `mixed`. To extract the list of Amounts, use
the function `amounts`.
- If you ever call `normaliseMixedAmountSquashPricesForDisplay`, you can
replace that with `mixedAmountStripPrices`. (N.B. this does something
slightly different from `normaliseMixedAmountSquashPricesForDisplay`,
but I don't think there's any use case for squashing prices and then
keeping the first of the squashed prices around. If you disagree let
me know.)
- Any remaining calls to `normaliseMixedAmount` can be removed, as that
is now the identity function.
2021-05-01 09:45:29 -10:00
Simon Michael
32b42a6c80
;journal: another test for #1532
2021-04-21 08:09:36 -10:00
Simon Michael
bf7255402c
;journal: add, renumber commodity parse tests ( #1532 )
2021-04-20 10:37:31 -10:00
Simon Michael
f58fcd95ab
;journal: tests demonstrating commodity parse errors ( #1532 )
2021-04-20 09:55:11 -10:00
Simon Michael
8cf193547e
;bal: doc: balance features: fix --valuechange link
2021-04-19 16:17:36 -10:00
Simon Michael
39623934c3
;doc: cli: a note about redirecting debug output
2021-04-17 20:18:05 -10:00
Simon Michael
fe846a0c7f
;lib: comments
2021-04-17 16:06:20 -10:00
Simon Michael
1afb84c95d
lib: outputFileFromOpts now returns a maybe; cleanups
2021-04-17 14:51:24 -10:00
Simon Michael
4b5ad69eb1
;doc: declaring commodities: better link
2021-04-16 12:19:57 -10:00
Simon Michael
ea812f8f34
;doc: commodity display style: correction
2021-04-16 12:15:52 -10:00
Simon Michael
659aeef56f
;doc: commodity display style: correction
2021-04-16 12:13:28 -10:00
Simon Michael
949c3925e5
;doc: add Commodity section, update Amounts & Declaring Commodities ( #1532 )
2021-04-16 12:00:00 -10:00
Simon Michael
a335c5ad21
doc: journal: declaring commodities: mention double quotes ( #1532 )
2021-04-16 09:10:26 -10:00
Stephen Morgan
28fd7c65f2
lib: When displaying amounts on a single line, always display at least one amount, even if that would exceed the requested maximum width. Addresses #1526 .
2021-04-13 15:29:58 -10:00
Simon Michael
f5121129ec
timeclock: print shows timeclock amounts with just 2 decimals, like pre-1.21 ( #1527 )
2021-04-12 18:40:33 -10:00
Stephen Morgan
493ed14629
lib,test: Make sure historical postings have prices stripped if necessary in PostingsReport (see issue #1522 ).
2021-04-11 18:31:30 -10:00
Stephen Morgan
f6feef7f80
lib,cli: Strip prices in MultiBalanceReport and PostingsReport whenever
...
we know we won't need them.
Knowing whether we need them is accomplished by pulling the "show-costs"
option used by the Close command up into ReportOpts.
2021-04-11 18:31:30 -10:00
Stephen Morgan
42d7009fef
test: Alter valuation tests to better distinguish between costing and
...
valuation. Replaces a redundant test with one which tests both costing
and valuation simultaneously.
2021-04-11 18:06:04 -10:00
Stephen Morgan
a529207ae7
lib: Do not round Decimal before applying JSON representation if
...
existing representation is small enough.
Previously the JSON representation of Decimal was rounded to 10 points
of precision before serialising. This sometimes results in an
unnecessary increase of precision.
2021-04-10 17:52:33 -10:00
Simon Michael
eb2da22f63
;update cabal files
2021-04-04 08:03:57 -10:00
Simon Michael
ba1e91c302
drop support for GHC 8.0
...
Prior to this commit,
- hledger still builds with GHC 8.0
- hledger-ui does if you use the build plan specified by stack8.0.yaml,
but you are likely to hit problems if you let cabal pick one
(https://github.com/jtdaugherty/vty/issues/198 and others)
- hledger-web might, if you could find the right build plan
The hassles are enough and GHC 8.0 is old enough (first released in
2016) that I'm letting it go; 8.2 is the new minimum version for all
hledger packages.
This allows a bunch of cleanups to conditional imports, which I leave
for later.
Also, updated the tested-with minor versions.
2021-04-04 07:54:22 -10:00
Stephen Morgan
edbb713cf8
lib,cli: Fix ledgerDateSpan, so that in takes transaction dates into account.
2021-04-03 13:54:23 -10:00
Stephen Morgan
5fbb67b893
lib,cli: Move reportPeriodName to Hledger.Reports.ReportOptions, use it
...
for HTML and CSV output for compound balance reports.
2021-04-03 13:43:37 -10:00
Simon Michael
d0940bf8ce
;update cabal files
2021-03-29 08:19:54 -07:00
Simon Michael
4e644840bc
lib, etc: add now-required lower bound on containers ( #1514 )
2021-03-29 08:19:28 -07:00
Simon Michael
5db75c39df
bal: keep csv column and row labels consistently lower case
...
It was reported on #hledger that bal -O csv capitalises "account"
differently for single and multi-period reports. All lower case seems
to be the most common, so I have dropped the capitalisation. Also
the trailing colon from --transpose's "total:".
2021-03-29 07:50:43 -07:00
Eric Mertens
03f06128dc
Add a whitespace csv test
2021-03-26 16:39:24 -07:00
Stephen Morgan
b6e20dea13
lib,test: Simplify the JSON representation of AmountPrecision.
...
It now uses the same JSON representation as Maybe Word8. This means that
the JSON serialisation is now broadly compatible with that used before the
commit f6fa76bba7 , differing only in
how it handles numbers outside Word8 and that it can now produce null
for NaturalPrecision.
2021-03-25 15:47:34 -07:00
Simon Michael
eab66de2ca
;cli: doc: commodity, D directive updates
2021-03-25 15:26:28 -07:00
Stephen Morgan
4cb9dfb5b8
lib: Properly escape quotes in csv output.
2021-03-25 09:41:42 -07:00
Stephen Morgan
4609e79f2c
lib,cli,ui,web: A number of AccountName and Journal functions which are
...
supposed to produce unique sorted use Sets internally to be slightly
more efficient. There is also a new function journalCommodities.
2021-03-23 11:26:30 -07:00
Stephen Morgan
7488140608
lib: Do not call showAmount twice for every posting.
...
For print -f examples/10000x10000x10.journal, this results in
- A 7.7% reduction in heap allocations, from 7.6GB to 7.1GB.
2021-03-21 07:10:27 -07:00
Stephen Morgan
7aa3d3e760
lib,cli: Some efficiency improvements in register reports.
...
Strip prices after valuing postings in PostingsReport.
Use renderRow interface for Register report.
For reg -f examples/10000x10000x10.journal, this results in:
- Heap allocations decreasing by 55%, from 68.6GB to 31.2GB
- Resident memory decreasing by 75%, from 254GB to 65GB
- Total (profiled) time decreasing by 55%, from 37s to 20s
2021-03-21 07:10:27 -07:00
Stephen Morgan
d54e276658
lib: Split showMixedAmountB into showMixedAmountB and showAmountsB, the
...
former being a simple wrapper around the latter.
This removes the need for the showNormalised option, as showMixedAmountB
will always showNormalised and showAmountsB will never do so.
We also strip prices from MixedAmount before displaying if not displaying prices.
2021-03-21 07:10:27 -07:00
Simon Michael
7fad876014
;update manuals
2021-03-18 07:22:42 -07:00
Stephen Morgan
d6a4310d8f
lib,cli,ui,bin: Eliminate all uses of Mixed outside of Hledger.Data.Amount.
...
Exceptions are for dealing with the pamount field, which is really just
dealing with an unnormalised list of amounts.
This creates an API for dealing with MixedAmount, so we never have to
access the internals outside of Hledger.Data.Amount.
Also remove a comment, since it looks like #1207 has been resolved.
2021-03-18 09:47:59 +11:00
Stephen Morgan
dabb3ef82e
lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should
...
supplant the old interface, which relied on the Num typeclass.
MixedAmount did not have a very good Num instance. The only functions
which were defined were fromInteger, (+), and negate. Furthermore, it
was not law-abiding, as 0 + a /= a in general. Replacements for used
functions are:
0 -> nullmixedamt / mempty
(+) -> maPlus / (<>)
(-) -> maMinus
negate -> maNegate
sum -> maSum
sumStrict -> maSum
Also creates some new constructors for MixedAmount:
mixedAmount :: Amount -> MixedAmount
maAddAmount :: MixedAmount -> Amount -> MixedAmount
maAddAmounts :: MixedAmount -> [Amount] -> MixedAmount
Add Semigroup and Monoid instances for MixedAmount.
Ideally we would remove the Num instance entirely.
The only change needed have nullmixedamt/mempty substitute for
0 without problems was to not squash prices in
mixedAmount(Looks|Is)Zero. This is correct behaviour in any case.
2021-03-18 09:47:21 +11:00
Simon Michael
f54f2b3b72
;doc: also update manual source files ( #1504 )
2021-03-13 07:28:14 -08:00
Felix Yan
a2266e35d9
Remove more reference to old man page stuff
...
They are not cleaned up in 9824c9683a
2021-03-13 18:03:11 +08:00
Simon Michael
c83970422c
cli: fix a build failure with ghc 9.0 ( #1503 )
...
Also remove the obsolete shebang line.
2021-03-12 06:59:43 -08:00
Simon Michael
ae57e76cb3
;update cabal files
2021-03-12 06:59:30 -08:00
Simon Michael
36cbc2b068
bump base upper bound to allow GHC 9.0
2021-03-12 06:58:46 -08:00
Simon Michael
5573538fdc
;update cabal files
2021-03-10 13:50:50 -08:00
Simon Michael
e050790d4c
;bump version to 1.21.99
2021-03-10 13:50:49 -08:00
Simon Michael
5cdbd04974
;finalise manuals
2021-03-10 11:12:06 -08:00
Simon Michael
532a4622ac
;finalise changelogs
2021-03-10 11:10:13 -08:00
Simon Michael
00beaf1423
;update cabal files
2021-03-10 08:24:59 -08:00
Simon Michael
eeddfc2509
;bump version to 1.21
2021-03-10 08:24:58 -08:00
Simon Michael
f82bdb15e4
;update changelogs
2021-03-10 08:24:12 -08:00
Simon Michael
40d1d7f7a7
;update manuals
2021-03-10 08:22:39 -08:00
Stephen Morgan
1702b8cca4
Revert "fix valuation tests after #1499 "
...
This reverts commit 696114cfa8 .
2021-03-10 12:29:06 +11:00
Simon Michael
696114cfa8
fix valuation tests after #1499
2021-03-09 10:17:26 -08:00
Simon Michael
ae435fd33e
;doc: changelog tweaks
2021-03-09 10:16:02 -08:00
Simon Michael
269b25bc8d
doc: edited changelogs
2021-03-09 09:31:28 -08:00
Simon Michael
4ae401cbec
;bal: cli help tweaks
2021-03-09 07:29:40 -08:00
Simon Michael
346429d070
;bal: doc tweaks
2021-03-09 07:29:12 -08:00
Simon Michael
faf68f3def
;doc: bump changelogs to latest revision
2021-03-08 15:16:54 -08:00
Simon Michael
ec4d131d22
;doc: cherry pick recent edited changelogs from 1.21-branch
2021-03-08 15:15:57 -08:00
Simon Michael
325aa15f74
;doc: restore changelogs up to a5f9f8ce0
2021-03-08 15:14:47 -08:00
Simon Michael
54b95af9ff
;doc: merge 1.20.3, 1.20.4 changelogs from 1.20-branch
2021-03-08 15:12:39 -08:00
Simon Michael
72a9b612c1
;cli: fix "hledger CMD --info" with older info
...
This should open the info node for CMD, but was giving an
error with info 4.8 on macs. Now it's more robust.
2021-03-07 17:40:50 -08:00
Simon Michael
36aa01f67a
;update manuals
2021-03-07 10:25:13 -08:00
Simon Michael
5dc644d280
;update CLI usage texts
2021-03-07 10:25:08 -08:00
Simon Michael
3a7c578f2d
;bal: doc: tweaks
2021-03-05 14:55:24 -08:00
Simon Michael
e521518eb6
;bal: doc: tweaks
2021-03-05 10:43:47 -08:00
Simon Michael
2023e9cd65
;bal: doc: more updates & cleanups ( #1496 )
2021-03-05 10:21:46 -08:00
Stephen Morgan
2aae54a02c
test: Test bal --valuechange throws an error for bad --value options.
2021-03-05 10:09:14 -08:00
Stephen Morgan
efb37c3343
lib: Default to PeriodChange report when using ValueChangeReport.
2021-03-05 10:09:14 -08:00
Stephen Morgan
3f408c2117
lib,cli: Restore old --change option for per-period summation, use --sum for basic ValueChange balance report.
2021-03-05 10:09:14 -08:00
Simon Michael
ae73eea7cb
;bs,bse,cf,is: update docs
2021-03-04 10:26:58 -08:00
Simon Michael
7b8a873471
;check: update manual
2021-03-03 15:43:38 -08:00
Stephen Morgan
d931e4919e
cli: Allow overriding with --periodic (rather than the old --change) and properly calculate requestedspan in CompoundBalanceReport.
2021-03-03 15:43:02 -08:00
Simon Michael
e9f04d5ed6
check: ordereddates now checks each file separately ( fix #1493 )
2021-03-03 06:44:50 -08:00
Simon Michael
642ad24b0e
;check: refactor
2021-03-03 06:06:39 -08:00
Simon Michael
cb0526381e
;bal: doc updates
2021-03-03 05:30:53 -08:00
Stephen Morgan
edaaef897b
lib: Do not include price directives in journalDateSpan. Only include
...
price directives after the last transaction/posting date if using
--value=end.
Also enlarges the reportspan to encompass full intervals for budget
goals.
2021-03-03 05:26:55 -08:00
Simon Michael
ff5e810c78
;bal: more doc updates
2021-03-03 04:10:23 -08:00
Simon Michael
4c9b72ea15
;bal: mention --valuechange ( #1480 )
2021-02-27 18:53:05 -08:00
Simon Michael
f63c38a7e2
bal: docs rewritten, and updated for new flags
2021-02-27 18:51:44 -08:00
Stephen Morgan
7f2536a2a7
lib,cli: Add --valuechange report type for calculating change of value
...
of accounts, restore --value=end behaviour to that of hledger-1.19.
2021-02-27 18:42:02 -08:00
Stephen Morgan
351648e4fa
lib,cli: Add --periodic option to indicate PeriodChange accumulation (renamed from --change).
2021-02-27 18:42:02 -08:00
Dmitry Astapov
582a1651b3
roi: cmdline help simplified
2021-02-23 15:13:19 -08:00
Dmitry Astapov
0fa51482c6
roi: check valuation on dates we have price directives for
2021-02-23 14:11:29 -08:00
Dmitry Astapov
8013d650f3
roi: honor all kinds of --value switches
2021-02-23 14:11:29 -08:00
Simon Michael
f4d81377af
print --match: show --match's argument in debug output
...
If you forget that the argument is required by the --match
option, and not the command as a whole - eg if instead of
hledger print --match somebank -x
you write:
hledger print --match -x somebank
that gets quietly parsed as:
hledger print --match="-x"
which is not great. Adding --debug now at least gives some insight:
hledger print --match -x somebank --debug
finding best match for description: "-x"
similar transactions:
...
2021-02-20 14:29:40 -08:00
Simon Michael
44508f58c8
add, lib: debug output, refactor similar transactions lookup
...
add --debug=1 shows the top hits for similar past transactions.
added:
Hledger.Cli.Utils.journalSimilarTransaction
provides --debug=1 output
changed:
Hledger.Cli.Commands.Add.transactionsSimilarTo -> Hledger.Data.Journal.journalTransactionsSimilarTo
now takes an extra number-of-results argument
2021-02-20 13:41:37 -08:00
Simon Michael
7979c7d74c
;import: doc: tweak
2021-02-18 18:43:22 -08:00
Simon Michael
125ba49992
;import: doc: tweak
2021-02-18 18:38:51 -08:00
Simon Michael
554f7a59fd
;import, print: better deduplication docs
2021-02-18 18:35:06 -08:00
Simon Michael
f7bbb39a77
;regenerate cabal files with the hpack version in current stack
...
To minimise warnings. They got regenerated by a commit for #1471 .
2021-02-18 13:42:40 -08:00
Simon Michael
b92a842728
;update manuals
2021-02-17 12:07:23 -08:00
Simon Michael
f4c8b52885
;update CLI usage texts
2021-02-17 12:07:06 -08:00
Arnout Engelen
ad2ab3c823
Make sure to round up for the 'to' date
2021-02-17 09:05:13 -08:00
Simon Michael
9cff45b2c5
;journal: doc: note same-day P overrides --infer-market-value
2021-02-13 15:34:47 -08:00
Simon Michael
b9d33a4294
bs: just declaring a Cash account no longer hides Asset accounts
...
Since Cash is also an Asset, declaring an account as Cash also disabled the fallback regexp for Asset accounts.
2021-02-13 08:09:45 -08:00
Simon Michael
d865ec5d65
lib: refactor: more consistent amount precision helpers
...
Hledger.Data.Amount:
renamed:
setAmountPrecision -> amountSetPrecision
setFullPrecision -> amountSetFullPrecision
setMixedAmountPrecision -> mixedAmountSetPrecision
added:
mixedAmountSetFullPrecision
2021-02-05 16:09:49 -08:00
Simon Michael
37e49ada70
cli: rename --infer-value to --infer-market-price
...
For clarity; infer-value was too vague. The old spelling remains
supported for compatibility, but is now deprecated.
When typing, --infer-market or even --infer (for now) is sufficient.
2021-02-05 15:16:39 -08:00
Simon Michael
681965e2d4
;journal: doc: wording tweak for #1465
2021-02-04 08:13:55 -08:00
Simon Michael
6101368954
print: always show all decimal places ( #931 )
...
Ensures parseable and more sensible-looking output in more cases, and behaves more like Ledger's print.
There is still an issue with adding trailing zeroes, which would be nice to prevent.
2021-02-04 08:13:55 -08:00
Simon Michael
0274b30742
print: don't add decimal places in assertion/assignment amounts either ( #1465 )
2021-02-04 06:46:09 -08:00
Simon Michael
a91a2ed2ed
;csv: doc: note how CSV amounts affect display style ( #1465 )
2021-02-04 06:30:14 -08:00
Simon Michael
201f967411
print: show all decimal places in assertion/assignment amounts ( #1465 )
...
Overriding the commodity style, per https://hledger.org/hledger.html#commodity-display-style .
2021-02-03 18:11:44 -08:00
Simon Michael
74f288a01d
;doc: valuation: fix typos
2021-01-31 13:33:50 -08:00
Stephen Morgan
e6cf2fb499
doc: Document new independent costing and valuation features in manual.
2021-01-28 13:57:49 -08:00
Stephen Morgan
b619b68f71
doc: Remove references to --value=cost, replacing them with --cost.
...
Since this is option is now just an alias for -B/--cost, and since it
may be removed soon, we make it undocumented, though it will still
behave as before. --value=cost,COMM is unsupported as well.
2021-01-28 13:57:48 -08:00
Stephen Morgan
c9eb7d1bcf
lib,cli,ui: Separate costing from valuation; each can now be specified
...
independently.
You can now combine costing and valuation, for example "--cost
--value=then" will first convert to costs, and then value according to
the "--value=then" strategy. Any valuation strategy can be used with or
without costing.
If multiple valuation and costing strategies are specified on the
command line, then if any of them include costing
(-B/--cost/--value=cost) then amounts will be converted to cost, and for
valuation strategy the rightmost will be used.
--value=cost is deprecated, but still supported and is equivalent to
--cost/-B. --value=cost,COMM is no longer supported, but this behaviour can be
achieved with "--cost --value=then,COMM".
2021-01-28 13:57:48 -08:00
Stephen Morgan
130739e3ef
lib,cli,ui: Introduce *ApplyCostValuation functions, which perform both
...
costing and valuation.
This currently is given a dummy NoCost argument and is equivalent to
"maybe id (*ApplyValuation ...)", but provides a constant interface so
that internal behaviour can be changed freely.
2021-01-28 13:57:48 -08:00
Stephen Morgan
a632e2fee9
test: Period change reports should not see historical postings when performing valuation.
2021-01-28 13:57:48 -08:00
Stephen Morgan
9cf5015958
lib: bal --value=end without --historical should not report on fluctuation in value of historical postings.
2021-01-28 13:57:48 -08:00
Simon Michael
93e5355a2b
;areg: doc: clarify account selection
2021-01-28 07:22:21 -08:00
Simon Michael
6650a563fb
;areg: doc: try to clarify aregister's purpose
2021-01-27 12:53:49 -08:00
Simon Michael
a91ca6892b
;areg: doc: mention depth limit is ignored ( #1468 )
2021-01-24 10:02:34 -08:00
Simon Michael
08c5857ac9
areg: ignore a depth limit, as in 1.19 ( #1468 )
...
aregister always shows transactions to subaccounts as well, ignoring any depth limit, so that the register's final total matches a corresponding balance report.
This was broken since 2020-09-02 c45663d41 .
2021-01-24 09:46:12 -08:00
Simon Michael
58df055f7c
;areg: add a commented test for #1468
2021-01-23 17:15:38 -08:00
Simon Michael
337bc989ab
;bal: notes for single-period html output
2021-01-21 16:44:26 -08:00
Simon Michael
540c65994c
payees: add --used/--declared flags, like accounts
2021-01-17 16:37:38 -08:00
Simon Michael
63076d212d
;csv: csvtest.sh: add history note ( #1434 )
...
In case someone might want to find the old code.
2021-01-15 13:19:24 -08:00
Felix Van der Jeugt
a79a7cfdb8
make testscript POSIX and shellchecked
2021-01-15 13:18:51 -08:00
Stephen Morgan
217bfc5e74
lib: Rename alignCell to textCell, minor cleanups.
2021-01-15 12:56:48 -08:00
Simon Michael
ce6939b304
;journal: doc: note commodity directives' position-sensitivity
2021-01-13 17:57:18 -08:00
Simon Michael
bd8074721e
journal: doc: clarify number formats, display styles ( #1461 )
2021-01-13 17:57:18 -08:00
Stephen Morgan
2b545caae5
lib: Calculate value at posting date for register --value=then -M.
2021-01-12 18:20:21 -08:00
Dmitry Astapov
07a9f11962
roi: use MixedAmount more and keep styles when reporting commodities
2021-01-12 15:19:35 -08:00
Dmitry Astapov
14a3b9833c
roi: fix insane precision bug, discovered in #1417
2021-01-12 15:19:16 -08:00
aragaer
7bde3345b8
cli,csv: Fix --drop option in csv output format
2021-01-12 12:11:56 -08:00
Dmitry Astapov
fc32f22f86
lib: roi now supports --value/--infer-value
2021-01-12 11:53:00 -08:00
Dmitry Astapov
9869624c5c
lib: better message when roi fails to value commodity, fixes #1446
2021-01-12 11:53:00 -08:00
Stephen Morgan
b203822cd1
lib: Make sure to add a newline to the end of aregister report.
2021-01-10 20:50:46 -08:00
Simon Michael
b5ab5ac9bc
;bal: doc: tweak
...
(cherry picked from commit 1dda703651ffe64dcf14c6a026fdead836224d1b)
2021-01-10 15:50:49 -08:00
Simon Michael
50a7914b3b
;update manuals
2021-01-10 15:37:32 -08:00
Simon Michael
de5dfe2d1b
;update CLI usage texts
2021-01-10 15:35:48 -08:00
Simon Michael
0d418fc86e
;bal: update command docs ( #1441 )
2021-01-10 15:35:01 -08:00
Stephen Morgan
0ef413bc25
doc,tests: Document new --value=then functionality and add tests.
2021-01-10 07:53:57 -08:00
Simon Michael
6931eec3ce
;check: uniqueleafnames: short circuit to avoid wasted work
2021-01-09 18:59:10 -08:00
Simon Michael
b96713a584
check: uniqueleafnames: fancy error message like the others
2021-01-09 18:54:33 -08:00
Simon Michael
e82e1db464
;check: ordereddates: fix double "Error"
2021-01-09 18:54:33 -08:00
Simon Michael
a3e94290e4
;csv: doc: amount tips: tweaks
2021-01-09 18:54:33 -08:00
Doug Goldstein
62cd34ae8a
;doc: adjust traditional top level accounts
...
Across the rest of the documentation and other accounting documentation
it appears to imply that the more traditional top level name would be
revenue. In fact the income statement says that is a subtraction between
revenue and expenses to derive the income. While the account types that
hledger supports are named revenue so it seems more natural to name this
revenue.
2021-01-09 12:58:18 -08:00
Simon Michael
eafdae3886
;csv: doc: amount tips: tweaks
2021-01-07 10:15:13 -08:00
Simon Michael
c21b666130
csv: handle more sign variations, eg a sign by itself
...
simplifySign now covers a few more sign combinations that might arise.
And in particular, it strips a standalone sign with no number,
which simplifies sign flipping with amount-in/amount-out.
2021-01-07 10:06:38 -08:00
Simon Michael
6035cdf1e0
;csv: doc: setting amounts: tweaks
2021-01-07 09:30:37 -08:00
Simon Michael
62d9e46adc
;csv: doc: tweaks
2021-01-06 15:33:54 -08:00
Simon Michael
07a96c47c9
;csv: doc: improve setting amounts tips
2021-01-06 11:01:12 -08:00
Simon Michael
b15a634a44
;check: accept parseable/autobalanced/assertions as arguments, for completeness
2021-01-05 16:25:43 -08:00
Simon Michael
7510d99aec
check: accept case-insensitive prefixes as arguments
...
Might a bad idea, but avoiding wasteful typing..
2021-01-05 16:18:24 -08:00
Simon Michael
9abb33d8e7
;valuation: document the price search limit ( #1439 )
2021-01-05 15:59:58 -08:00
Stephen Morgan
83110e8820
lib,cli: Extend AtThen valuation to all report types.
...
Also adds a postingDate argument to amountApplyValuation, and re-orders
the ValuationType and (Transaction/Posting) arguments to
(transaction/posting)ApplyValuation, to be consistent with
amountApplyValuation.
2021-01-05 14:42:09 -08:00
Simon Michael
3d7d5c0db7
new price search that really finds the shortest path ( #1443 )
...
This one should also reliably prevent runaway searches in the event of more bugs, giving up after 1000 iterations.
2021-01-04 18:42:51 -08:00
Simon Michael
e179685f3c
;valuation: commented test for #1443
2021-01-04 16:26:48 -08:00
Simon Michael
108b020f23
;valuation: add functional test for #1439 slowdown
2021-01-04 15:45:58 -08:00
Stephen Morgan
5ba6215c47
cli: Remove redundant import, add some CPP.
2021-01-02 15:08:09 +11:00
Stephen Morgan
2bc2710017
test: Update for tests failing now that it's 2021.
2021-01-02 15:08:09 +11:00
Stephen Morgan
7d3cf1747a
lib: Make consistent naming scheme for showMixedAmount* functions,
...
add conversion between old API and new API in the documentation.
2021-01-02 15:08:09 +11:00
Stephen Morgan
e63138ef7d
lib,cli: Assorted fixes for older GHC.
2021-01-02 15:08:09 +11:00
Stephen Morgan
e4e533eb9f
lib,cli,ui: Replace some uses of String with Text, get rid of some unpacks, clean up showMixed options.
2021-01-02 15:08:09 +11:00
Stephen Morgan
07a7c3d3a8
lib: Use Text and Text builder only in postingAsLines.
2021-01-02 15:08:09 +11:00
Stephen Morgan
13c111da73
lib,cli,ui: Use WideBuilder for Tabular.AsciiWide.
...
Move WideBuilder to Text.WideString.
2021-01-02 15:08:09 +11:00
Stephen Morgan
b9c00dce61
lib,cli,ui: Implement all showMixed* functions in terms of DisplayAmountOpts and WideBuilder.
2021-01-02 15:08:09 +11:00
Stephen Morgan
f998a791cf
lib: Remove unused optional width argument for StringFormat.
2021-01-02 15:08:09 +11:00
Stephen Morgan
462a13cad7
lib,cli: Use Text Builder for Balance commands.
2021-01-02 15:08:09 +11:00
Stephen Morgan
089564b04b
lib,cli: Use Text for CompoundPeriodicReport titles.
2021-01-02 15:08:09 +11:00
Stephen Morgan
541c4fc18c
lib,cli: Use Text for CSV values.
2021-01-02 15:08:09 +11:00
Stephen Morgan
e3ec01c3c6
lib,cli,ui: Use Text for showDate and related.
2021-01-02 15:08:09 +11:00
Stephen Morgan
74b296f865
lib,cli: Make showTransaction return Text rather than String.
2021-01-02 15:08:09 +11:00
Stephen Morgan
dbe7015502
cli: Refactor compoundBalanceCommand.
2021-01-02 15:08:09 +11:00
Stephen Morgan
7e44b89bb4
lib: Remove unused label on TranspactionReport and AccountTransactionsReport.
2021-01-02 15:08:09 +11:00
Stephen Morgan
5752f1c5cb
lib,cli: Use Text Builder for Account Transaction Reports.
2021-01-02 15:08:09 +11:00
Stephen Morgan
b9dbed6713
cli: Use Text Builder for Entries Reports.
2021-01-02 15:08:09 +11:00
Stephen Morgan
12a6435c51
lib: Add wrap convenience function.
2021-01-02 15:08:09 +11:00
Stephen Morgan
646ee0bce5
cli: Using Text Builder for posting reports.
2021-01-02 15:08:09 +11:00
Simon Michael
ac39d59016
;check: doc: link to payee directive
2020-12-31 12:57:39 -08:00
Simon Michael
fdeaa3cd8b
doc: journal: document payee directive
2020-12-31 12:55:24 -08:00
Simon Michael
3898a66dda
;check: doc: wording
2020-12-31 12:40:46 -08:00
Simon Michael
c8eb347835
;check: no longer experimental
2020-12-31 12:17:48 -08:00
Simon Michael
2ffed3aec7
check: ordereddates: test --date2, clarify --unique and QUERY dropped
2020-12-31 11:43:51 -08:00
Simon Michael
bb1d49c573
;update CLI usage texts
2020-12-31 11:23:56 -08:00
Simon Michael
01bfeda4fb
;update cabal files
2020-12-31 11:23:36 -08:00
Simon Michael
4491325bb0
;check: ordereddates/uniqueleafnames: print on stderr, refactor
2020-12-31 11:22:32 -08:00
Simon Michael
1d4c4c5b8b
check: drop old checkdates/checkdupes commands, consolidate
2020-12-31 10:49:17 -08:00
Simon Michael
a6ec7bcc11
;check: add tests for all on-demand checks
2020-12-31 10:27:50 -08:00
Simon Michael
8306420b61
check: also check "accounts"/"commodities" on demand
...
(cherry picked from commit 0c2bf54f2955e3a25fd0282acc42608f957abaea)
2020-12-31 08:33:36 -08:00
Simon Michael
5d8669d4f3
;check: separate func test files for each check
2020-12-31 08:29:15 -08:00
Simon Michael
31ea37a785
;check: accounts, commodities, payees, ordereddates: improve errors
...
Error messages for these four are now a bit fancier and more
consistent. But not yet optimised for machine readability.
Cf #1436 .
Added to hledger-lib: chomp1, linesPrepend[2].
2020-12-30 18:13:34 -08:00
Damien Cassou
b47d582583
;check: fixes
2020-12-30 18:08:31 -08:00
Simon Michael
de56d09024
;check: start some functional tests, for payees
2020-12-30 18:08:31 -08:00
Simon Michael
3c232fbd7d
check: add "payees" check requiring payee declarations
2020-12-30 18:08:30 -08:00
Simon Michael
8ab2316604
;cli: doc: data formats: wording
2020-12-30 17:06:01 -08:00
Simon Michael
22c6f056c2
;update manuals
2020-12-29 10:27:48 -08:00
Simon Michael
6f08631be3
;doc: changelog updates
2020-12-29 10:21:27 -08:00
Simon Michael
a5f9f8ce0c
;update CLI usage texts
2020-12-29 09:43:24 -08:00
Simon Michael
4a48e5f8aa
;doc: changelogs
...
(cherry picked from commit 3031c0e7b9bd9384ac390d3f3705455f057dd8c8)
2020-12-29 09:39:35 -08:00
Simon Michael
4ce681348d
;update changelogs
...
(cherry picked from commit 1b389961587720be10f7cced91d3b6cb9fc47415)
2020-12-29 09:38:58 -08:00
Simon Michael
f2d2272737
;update changelogs
...
(cherry picked from commit 15e290955f8ae2ed636b4e144e84fc4c73f4228b)
2020-12-29 09:37:54 -08:00
Simon Michael
d126ceead2
;cli: tests: allow func tests to run on NixOS
2020-12-28 15:23:51 -08:00
Simon Michael
21ce0c30cc
;print: cleanup; discuss unbalanced output ( #1429 )
2020-12-28 07:07:45 -08:00
Simon Michael
9ff53ab1e0
;cli: convert cli.test to latest format
2020-12-28 06:28:31 -08:00
Simon Michael
323303daba
;cli: another fix for 4330427f
2020-12-28 06:24:56 -08:00
Simon Michael
b66d8f0f3c
;update manuals
2020-12-26 17:29:02 -08:00
Simon Michael
cee1c69ac0
;update CLI usage texts
2020-12-26 17:28:47 -08:00
Simon Michael
4330427f6b
cli: make --help/--version always CMD-specific
...
This simplifies the --help/-h and --version flags by making them
position independent: no matter where they appear in the command line,
if there is a command argument they will show the command's help or
version (where applicable), instead of the hledger executable's.
2020-12-26 17:27:28 -08:00
Simon Michael
ae9595c321
cli/help: --info/--man/help show CMD/topic-specific docs
...
hledger CMD --info will now open CMD's info node,
hledger CMD --man will scroll the man page to CMD's section, and
hledger help -i/-m/-p TOPIC will do similar.
This is not perfectly robust but hopefully will be good enough in
practice.
Also the help command's long --info/--man/--pager flags have been
dropped in favour of -i/-m/-p.
2020-12-26 17:27:28 -08:00
Simon Michael
54af71a0b1
cli: general --man, --info flags show the manual
2020-12-26 17:27:28 -08:00
Simon Michael
f20cd2b112
help: show only the hledger manual, for now
2020-12-26 17:27:27 -08:00
Simon Michael
7d3f05b16a
help: add -i/-m/-p short flags
2020-12-26 17:27:27 -08:00
Simon Michael
9beff54b27
help: drop --cat
2020-12-26 17:27:27 -08:00
Simon Michael
ab55be6d64
;doc: link updates
2020-12-26 17:27:27 -08:00
Simon Michael
201ea210fb
;cli: doc: intro wording
2020-12-26 17:27:27 -08:00
Simon Michael
8a16b2b1b0
;update CLI usage texts
2020-12-26 08:21:45 -08:00
Simon Michael
45a5658396
cli: drop deprecated command aliases a, b, p, r, txns
2020-12-26 08:21:45 -08:00
Simon Michael
8d320bc1fe
;update manuals
2020-12-24 17:26:17 -08:00
Simon Michael
fbe30a73b9
;doc: mention version in all manual formats
2020-12-24 17:25:11 -08:00
Simon Michael
f79cd78179
;doc: update links
2020-12-24 13:02:02 -08:00
Simon Michael
fbf9418756
;doc: update links to journal manual
2020-12-24 12:49:04 -08:00
Simon Michael
62660577c3
;update cabal files
2020-12-24 10:22:16 -08:00
Simon Michael
ff3a05f891
;update manuals
2020-12-24 10:22:05 -08:00
Simon Michael
ef55f9faf3
;update CLI usage texts
2020-12-24 10:22:05 -08:00
Simon Michael
a7e9e9ac0e
doc: merge file format manuals into the hledger manual
...
Also flatten the journal manual topics a bit.
There are pros and cons to this, but I believe the pros outweigh the
cons.
2020-12-24 10:22:05 -08:00
Simon Michael
a950d49e18
cli: hide deprecated aliases in command list
...
(a, b, p, r, equity, txns)
2020-12-23 12:00:42 -08:00
Simon Michael
0a36823094
;update manuals
2020-12-23 10:29:57 -08:00
Simon Michael
69a7325f91
;update CLI usage texts
2020-12-23 10:29:30 -08:00
Simon Michael
9c7a87da57
cli: doc: sync/update manual & cli command lists
2020-12-23 10:28:31 -08:00
Simon Michael
f43ab0029d
cli: doc: reorganise/flatten hledger manual, rewrite commands section
2020-12-23 10:25:43 -08:00
Simon Michael
65a003c8ee
;doc: refactor, keep commands.m4 in Commands dir
2020-12-22 17:05:28 -08:00
Simon Michael
630347e0e8
;bs/bse/cf/is: describe in terms of balance command
2020-12-22 09:22:10 -08:00
Simon Michael
324dfaee49
;update manuals
2020-12-20 20:11:35 -08:00
Simon Michael
63876a4186
;cli: doc: commands glue text
2020-12-20 20:08:35 -08:00
Simon Michael
0ff65456fa
;doc: info: tweak first/top heading again to improve structure
2020-12-20 20:08:35 -08:00
Simon Michael
9daaabeda2
;doc: simplify manuals' title metadata to fit man/info better
2020-12-20 20:08:35 -08:00
Simon Michael
006db6136c
;doc: info: consistent indenting of synopsis command lines
2020-12-20 20:08:35 -08:00
Simon Michael
57a176193d
;doc: commands: include in man pages again; simplify headings
...
Simplify things for now.
2020-12-20 20:08:35 -08:00
Simon Michael
11b787e8ec
;doc: info: drop areg/bal's "Output format" heading to fix node loops
...
These were making it impossible to page through the entier manual with
the space key.
2020-12-20 20:08:35 -08:00
Simon Michael
c92c27d565
doc: tweak manuals' top heading to improve info structure
2020-12-20 20:08:35 -08:00
Simon Michael
ad3b5ef2fb
;doc: cli: reorder command docs; clean up includes
2020-12-20 07:57:57 -08:00
Simon Michael
6b4be651af
doc: rewrite commands intro; drop command docs from man page
2020-12-19 12:01:58 -08:00
Stephen Morgan
e406cebcce
lib: Remove unused AtDefault constructor for ValuationType.
2020-12-19 11:59:44 -08:00
Stephen Morgan
0c23619ae7
lib: Valuation has changed; and -V now acts like --value=end.
2020-12-19 11:59:44 -08:00
Stephen Morgan
8981b3e196
lib: Include empty columns in MultiBalanceReports.
...
This was previously done for CompoundBalanceReport and when --empty was
called; this makes the behaviour consistent.
2020-12-18 20:54:08 -08:00
Stephen Morgan
ec3299f626
doc: Add note for market prices being included in calculating the default end date.
2020-12-16 19:04:33 -08:00
Stephen Morgan
439eddc8b9
lib: Include price directives when calculating journal end date.
2020-12-16 19:04:33 -08:00
Simon Michael
4d3a9b0a21
;changelogs: whitespace
...
(cherry picked from commit 679e90eb6028e8be35168057fe0040880aaab03a)
2020-12-15 20:57:18 -08:00
Simon Michael
47ab7a50a3
;update changelogs
...
(cherry picked from commit 452149dfc87f2044ba6d16c2e55cab5957289b65)
2020-12-15 20:57:09 -08:00
Simon Michael
8db8992cb5
;update changelogs
...
(cherry picked from commit 03f9b756b35661dc8dac6f10de04e9795d72c4d6)
2020-12-15 20:56:44 -08:00
Simon Michael
105f7d2944
;tools: split defs.m4 to minimise manual rebuilding
2020-12-15 09:39:29 -08:00
Simon Michael
e5a12683d7
;update manuals
2020-12-15 09:03:38 -08:00
Simon Michael
7d4d6517a6
;shake: commandtxts -> cmdhelp; note todos
2020-12-15 08:53:10 -08:00
Simon Michael
df5c755d96
;lib, cli: remove old unused parsec dependency
2020-12-15 08:33:05 -08:00
Simon Michael
9afccde16f
;update cabal files
2020-12-14 12:31:01 -08:00
Simon Michael
9087532b62
;bump version to 1.20.99
2020-12-14 11:28:07 -08:00
Simon Michael
349ffd7c0b
updateReportSpecFromOpts -> updateReportSpec[With]
2020-12-12 12:05:44 -08:00
Simon Michael
6723025607
;update manuals
2020-12-08 20:11:32 -08:00
Simon Michael
a2bc7f95f0
;update CLI usage texts
2020-12-08 20:11:32 -08:00
Simon Michael
4f122b605d
;rewrite: replace/update doc in commands list
2020-12-08 19:22:03 -08:00
Simon Michael
786a58ce2a
;cli: drop old command docs from commands list
2020-12-08 09:51:19 -08:00
Simon Michael
7a692284a9
;doc: replace a few addon with add-on
2020-12-08 09:27:36 -08:00
Simon Michael
116945e907
;shake: man page date is now updated by manuals, not setversion
2020-12-07 12:26:48 -08:00
Simon Michael
2f91b1de6e
;update manuals
2020-12-07 06:15:59 -08:00
Simon Michael
1856ca5312
web: bump to 1.20.1; update manuals' dates
2020-12-06 18:20:56 -08:00
Simon Michael
27abca84a4
;changelog tweak
2020-12-06 18:14:47 -08:00
Simon Michael
fa28b43aed
;update changelogs
2020-12-05 17:58:37 -08:00
Simon Michael
5c5256504e
;update manuals
2020-11-30 15:21:59 -08:00
Simon Michael
2066bb5e9f
;update CLI usage texts
2020-11-30 15:21:40 -08:00
Simon Michael
5507cb07ef
;update cabal files
2020-11-30 15:19:21 -08:00
Simon Michael
2501329f3c
;bump version to 1.20
2020-11-30 15:18:24 -08:00
Simon Michael
3aec8542db
;update changelogs
2020-11-30 12:11:30 -08:00
Simon Michael
26dc66e118
;check: doc updates
2020-11-30 08:49:10 -08:00
Simon Michael
e983380098
;update manuals
2020-11-30 08:41:40 -08:00
Simon Michael
679373c835
;update CLI usage texts
2020-11-30 08:41:21 -08:00
Simon Michael
a5adc14aaa
;check: doc updates
2020-11-30 08:41:07 -08:00
Simon Michael
090e810761
check: rename ordereddates, uniqueleafnames
2020-11-30 08:26:48 -08:00
Simon Michael
4dba59b0a1
;check: doc updates
2020-11-30 08:26:16 -08:00
Simon Michael
16a212af57
;update manuals
2020-11-29 21:21:50 -08:00
Simon Michael
4db9ec1e79
;update CLI usage texts
2020-11-29 21:21:29 -08:00
Simon Michael
a0907e6567
check: doc
2020-11-29 21:21:20 -08:00
Simon Michael
e33667f580
check: support quoted check name + args
...
A "hledger check" argument may now be a quoted string containing
the check name followed by space-separated arguments, for
checks which make use of those. This means the check command
can replicate "check-dates --unique" and (in principle)
"check-fancyassertions ASSERTIONS..". Eg:
hledger check "dates --unique"
I think it'll be better for checks to take no arguments or options,
so this is probably just a transitional feature for compatibility.
2020-11-29 20:48:31 -08:00
Simon Michael
78542ca32e
check-dates: rename --strict to --unique; improve output
2020-11-29 15:28:14 -08:00
Simon Michael
c5b0eab37a
;cli: slightly clearer message for this unlikely error case
2020-11-29 13:37:30 -08:00
Simon Michael
19f257621c
;cli: commands list: descriptions for tagfiles & fancyassertions addons
2020-11-29 13:36:24 -08:00
Simon Michael
724fb9961d
check: new command incorporating check-dates, check-dupes, etc.
...
This is intended to work in three modes:
- hledger check: just run the standard data checks, like all other
commands but with no output on success. Equivalent to
hledger stats >/dev/null but simpler and platform-independent.
- hledger check --strict: run the standard + strict data checks,
like other commands in strict mode.
- hledger check CHECK1 CHECK2 ...: run the named checks. This allows
running more or less checks than the default or strict mode, or
a single check of interest. The arguments are standard lowercase names
for the checks. For now this command supports two checks: "dates" and
"leafnames". These are equivalent to the check-dates and check-dupes
commands which are now hidden and considered deprecated, though
still supported for the moment.
This command needs more work and I'm rushing it a little, but I think
it's the right direction and I'd like to put it out there to get
feedback.
2020-11-29 13:27:35 -08:00
Simon Michael
325a155f0b
check-dates: on success, be silent and don't force program exit
2020-11-29 13:24:33 -08:00
Simon Michael
cd7156013d
check-dupes: return a non-zero exit code on failure
2020-11-29 13:24:14 -08:00
Simon Michael
ee026f5442
Revert the rename of check-dupes
...
We'll keep the old name, soon to be a hidden command, for compatibility.
2020-11-28 15:32:07 -08:00
Simon Michael
8c23a16bf8
journal: strict mode also requires commodity declarations
2020-11-27 17:54:55 -08:00
Simon Michael
d9b4446837
;check-leafnames: fix, one more rename
2020-11-27 13:23:04 -08:00
Simon Michael
d330c4910e
check-dupes: rename to check-leafnames, per "How to check for errors"
2020-11-27 12:51:41 -08:00
Simon Michael
3bfe53dd50
doc: strict mode links
2020-11-27 08:57:41 -08:00
Simon Michael
d40d53ae02
;update manuals
2020-11-26 08:52:56 -08:00
Simon Michael
ec3ad14ae5
strict mode: -s/--strict requires posted accounts to be declared
2020-11-26 08:48:16 -08:00
Simon Michael
794c5f32a5
;update changelogs
2020-11-24 09:39:05 -08:00
Simon Michael
255d475380
;update manuals
2020-11-24 09:23:58 -08:00
Simon Michael
982486e5d2
;update CLI usage texts
2020-11-24 09:23:47 -08:00
Simon Michael
94b3f090be
csv, timedot, timeclock: respect --alias options ( fix #859 )
...
Command-line account aliases now also affect transactions read
from these formats (not just journal format).
lib: journalApplyAliases, transactionApplyAliases, postingApplyAliases
helpers have been added.
2020-11-24 09:17:01 -08:00
Simon Michael
221a6d9001
lib: new more robust price lookup implementation, fixing #1402
2020-11-23 18:08:41 -08:00
Simon Michael
13e3e7607e
;cli: update example in Cli.Main haddock
2020-11-23 10:05:53 -08:00
Simon Michael
d60c1f764d
lib: partial valuation fix, more debug output for #1402
2020-11-22 13:10:31 -08:00
Simon Michael
6847f0e6a8
; lib: valuation: add a commented test for #1402
2020-11-21 07:35:32 -08:00
Simon Michael
16f12d8263
;bal: budget: improve doc
2020-11-20 17:20:50 -08:00
Simon Michael
322d62483e
;bal: budget: heading type
2020-11-20 17:05:48 -08:00
Simon Michael
adc9bf94bc
;bal: budget: document a start date gotcha
2020-11-20 17:04:24 -08:00
Simon Michael
6948b05db6
;bal: budget: add tests clarifying a surprising behaviour
2020-11-19 15:15:04 -08:00
Simon Michael
372c9724a8
bal: improve budget, MultiBalanceReport debug output
...
Comply with debug levels policy, clarify some labels.
2020-11-19 14:42:46 -08:00
Simon Michael
b6c667c388
;update manuals
2020-11-19 09:19:20 -08:00
Simon Michael
0295be5553
;update CLI usage texts
2020-11-19 09:19:12 -08:00
Dmitry Astapov
d53dc46a5a
roi: docs
2020-11-19 09:17:28 -08:00
Dmitry Astapov
c0582ec895
roi: TWR now handles samy-day pnl changes and cashflows
2020-11-19 09:17:28 -08:00
Simon Michael
3afd52248b
;roi: document calculation failures
2020-11-19 09:17:28 -08:00
Simon Michael
ab305b3244
roi: add adept's IRC discussion to doc
2020-11-19 09:17:28 -08:00
Simon Michael
a92aa3cd26
;bal: fix a warning
2020-11-18 16:31:32 -08:00
Simon Michael
6b152fe6c8
;update manuals
2020-11-18 16:30:52 -08:00
Simon Michael
4e529372a4
;update CLI usage texts
2020-11-18 16:30:40 -08:00
Simon Michael
18f8f91520
;more budget-related cleanup
2020-11-18 16:29:04 -08:00
Simon Michael
5bb9006b6c
bal: support CSV output for --budget reports ( #1155 )
2020-11-18 16:29:04 -08:00
Dmitry Astapov
98a46fcaeb
cli: improve error for roi IRR rootfinding problems ( closes #1398 )
2020-11-18 01:03:20 +00:00
Simon Michael
9a820a6dec
;doc: fixes
2020-11-17 13:16:17 -08:00
Simon Michael
5f9635c784
;update changelogs
2020-11-17 10:51:57 -08:00
Simon Michael
3662977c84
;update manuals
2020-11-17 07:29:57 -08:00
Simon Michael
541aa3ee5b
;update CLI usage texts
2020-11-17 07:29:38 -08:00
Simon Michael
ec2a774b18
cli, lib: move functional tests into hledger/test/
2020-11-16 08:47:41 -08:00
Simon Michael
2448d07148
;roi: doc: link example file
2020-11-15 11:20:52 -08:00
Simon Michael
0ce9c352ec
add: don't let number style disturb the default ( Fixes #1378 )
2020-11-14 11:08:01 -08:00
Simon Michael
e8672c4cd5
;lib: don't catch in maybeFileModificationTime ( #1390 )
...
It's overkill.. it's understood that any IO action can
throw an exception, and it's best to handle them at top level,
eg as Yesod does.
2020-11-13 16:50:17 -08:00
Simon Michael
1f94aa1628
;lib: make file modification/reloading helpers more robust ( #1390 )
...
Work on hledger-web tests showed some bad behaviour, in particular
journalReloadIfNewer would always reload a journal read from a string
or stdout. This is now fixed, and an ugly read.show conversion has
been cleaned up.
Hledger.Cli.Utils API changes:
removed:
- journalSpecifiedFileIsNewer
- fileModificationTime
added:
- utcTimeToClockTime
changed:
- journalFileIsNewer now requires a file argument
2020-11-13 16:28:35 -08:00
Simon Michael
a97daaf322
lib: replace pretty-show with pretty-simple
...
pretty-simple, already used in .ghci, will hopefully give nicer debug
output, including for values which don't have Read-able Show output.
This should mean that we can start removing custom string-like Show
instances that were a workaround for pretty-show.
We are using the latest version (4.0.0.0) to get compact output.
Here's some old pretty-show output:
CsvRules
{ rdirectives = [ ( "skip" , "1" ) ]
, rcsvfieldindexes = [ ( "date" , 1 ) , ( "amount" , 2 ) ]
, rassignments = [ ( "amount" , "%2" ) , ( "date" , "%1" ) ]
, rconditionalblocks = []
}
And the new pretty-simple output:
CsvRules
{ rdirectives=
[ ( "skip", "1" ) ]
, rcsvfieldindexes=
[ ( "date", 1 ), ( "amount", 2 ) ]
, rassignments=
[ ( "amount", "%2" ), ( "date", "%1" ) ]
, rconditionalblocks= []
}
Non-compact pretty-simple output would be:
CsvRules
{ rdirectives=
[
( "skip"
, "1B"
)
]
, rcsvfieldindexes=
[
( "date"
, 1
)
,
( "amount"
, 2
)
]
, rassignments=
[
( "amount"
, "%2"
)
,
( "date"
, "%1"
)
]
, rconditionalblocks=[]
}
Also:
- Account's Show instance no longer converts : to _ in account names
- drop unused pretty-show dependency from hledger, hledger-ui packages
- regenerate hledger-lib with the older hpack that's shipped in stack
2020-11-10 08:06:11 -08:00
Simon Michael
de42cc6706
;doc: valuation: try to clarify effect on reports table ( #1380 )
2020-11-09 18:04:35 -08:00
Simon Michael
86fac4236d
;update manuals
2020-11-09 17:14:38 -08:00
Simon Michael
94b01dd19d
;update CLI usage texts
2020-11-09 17:14:38 -08:00
Simon Michael
78894d46c8
import: apply journal's commodity styles to imported amounts
2020-11-09 17:14:38 -08:00
Simon Michael
895783ebe0
;update manuals
2020-11-09 11:09:55 -08:00
Simon Michael
7cf7bcbf96
;doc: period expressions: slightly clarify "every WEEKDAY"
2020-11-09 11:08:20 -08:00
Stephen Morgan
76dd4d83bc
cli, docs: Add documentation, improve test comments, and clarify report titles for reports with valuation date changing over different columns.
2020-11-08 17:11:05 -08:00
Simon Michael
0df6998b58
;bal: doc tweak ( #1283 , #1379 )
2020-11-05 11:07:23 -10:00
Simon Michael
b5656c5909
;update manuals
2020-11-05 11:00:38 -10:00
Simon Michael
f615c07d0f
;update CLI usage texts
2020-11-05 11:00:38 -10:00
Simon Michael
10facfdb50
;bal: improve -S docs ( #1283 , #1379 )
2020-11-05 11:00:26 -10:00
Simon Michael
03c1193e54
;changelog tweak
2020-11-04 21:10:45 -10:00
Simon Michael
d1ded6fd84
;update changelogs
2020-11-04 06:52:15 -10:00
Stephen Morgan
83a518af99
lib,cli,ui: In ReportOpts, store query terms term-by-term in a list in
...
querystring_.
This helps deal with tricky quoting issues, as we no longer have to make
sure everything is quoted properly before merging it into a string.
2020-11-04 08:47:30 -08:00
Stephen Morgan
a620ab9666
lib: Expand Tabular.AsciiWide to allow multiline cells, either top or bottom aligned.
2020-11-04 14:25:21 +11:00
Stephen Morgan
0bebda7313
lib,cli,ui: Elide amounts to a width of 32 characters, rather than 22 characters.
2020-11-04 14:25:20 +11:00
Stephen Morgan
e9a16edb58
cli: Use new mixed amount display functions for balance format strings.
2020-11-04 14:25:20 +11:00
Stephen Morgan
9de238757b
lib,cli,ui: Introduce showMixed*Unnormalised, eliminate most direct calls of strWidth.
...
This introduces some new helper functions which are exactly the same
as what we had before, but do not call
normaliseMixedAmountSquashPricesForDisplay, so that we can use the new
functions for displaying Transaction and Posting. It also goes through
and gets rid of most uses of the old showMixed* functions which would
benefit from using the new interface.
2020-11-04 14:25:20 +11:00
Stephen Morgan
a838366c9d
cli: Ensure register reports are correctly aligned for negative numbers.
...
This uses the new showMixed* function for the register report. This
fixes some misaligned negative numbers which appeared in one of the
earlier commits, and adds a test for it.
2020-11-04 14:25:20 +11:00
Stephen Morgan
162a936360
lib: BudgetReport uses new renderTable inteface, now has more compact output.
...
This changes showMixedAmountElided so that the width to elide to is
given as an argument, rather than fixed at 22 characters. This
actually uses the new renderTable interface. Mostly this is just an
internal change, but since we have more information about the widths
of things, we can actually get rid of some superfluous spaces in the
budget report output, previously there to make sure it stayed aligned
with the largest reasonable contents.
2020-11-04 14:25:20 +11:00
Stephen Morgan
33369dfa6c
lib: renderTable can now receive alignment and width specifications on all cells, and has an option to display the outer border.
...
This gives renderTable a little more customisation. Before any of the
commits of this PR, render would just receive a string to display in
each cell. After the second commit of this PR it would also receive a
width of the string (in place of stripping ANSI sequences and then
calculating the width). After this commit, it now also takes an
alignment, so you can make cells left or right aligned. The function
render calls renderTable with appropriate options to give the same
behaviour as before. Also, previously render would always put a border
around the table. We would take this output, and would sometimes strip
the border by dropping the first and last rows, and first and last
characters of every row. I've just added an option to control whether
to put the border in, so we can just not add it in the first place,
rather than stripping it later. Note that this is again just defining
helper functions; this extra power is not yet used anywhere.
2020-11-04 14:25:20 +11:00
Stephen Morgan
a2b7a03fc4
lib,cli: bal uses new amount display functions, no longer needs to strip ansi.
2020-11-04 14:25:20 +11:00
Simon Michael
cca8802e2c
;update changelogs
2020-11-03 08:18:14 -10:00
Stephen Morgan
affc8d10f2
lib: Generalise CBCSubreportSpec to allow more subreport control.
2020-10-23 16:15:41 -07:00
Stephen Morgan
260283e2f1
lib,cli,ui,web: Introduce ReportSpec, which holds ReportOpts, the day of
...
the report, and the parsed Query.
2020-10-23 14:14:11 -07:00
Stephen Morgan
19ab222599
lib,cli: Remove old impure ReportOpts date functions.
2020-10-23 14:14:11 -07:00
Stephen Morgan
2aaab4b1b7
lib: Make Default instances clearer, remove Default instance for Bool.
2020-10-23 14:14:11 -07:00
Stephen Morgan
1171c23eee
lib,cli,ui: Ensure ReportOpts always has today_ set.
2020-10-23 14:14:11 -07:00
Stephen Morgan
c45663d41d
lib,cli: Store parsed Query in ReportOpts, rather than an unparsed
...
String.
2020-10-23 14:14:11 -07:00
Stephen Morgan
103308e795
lib,cli: Store StringFormat in ReportOpts, rather than unparsed String.
...
StringFormat now also takes an optional overline width, which is
currently only used by defaultBalanceLineFormat.
2020-10-23 14:14:11 -07:00
Simon Michael
291a35d8b4
;lib: refactor
2020-10-19 09:09:38 -07:00
Simon Michael
2761324404
journal: apply commodity styles to forecasted transactions ( #1371 )
2020-10-19 08:59:25 -07:00
Simon Michael
831ec0dcf0
;lib: refactor journalAddForecast
2020-10-19 08:52:00 -07:00
Simon Michael
f0db3fb157
;update manuals
2020-10-18 16:01:59 -07:00
Simon Michael
1f81730a00
balcmds: mention --no-elide's new commodity-revealing function
2020-10-05 08:57:08 -07:00
Simon Michael
c5513ba722
;tweak a few parse errors for clarity, consistency ( #1329 )
2020-09-19 08:10:39 -07:00
Simon Michael
73de12c264
;update changelogs
2020-09-07 16:17:58 -07:00
Simon Michael
2b715fbe0d
;update changelogs
2020-09-07 16:13:21 -07:00
Simon Michael
018bf8f474
;update manuals
2020-09-07 12:17:35 -07:00
Simon Michael
90adb95983
;update cabal files
2020-09-07 12:17:35 -07:00
Simon Michael
a151bcaec7
; bump hledger-lib, hledger, hledger-ui, hledger-web version to 1.19.99
2020-09-07 12:16:12 -07:00
Simon Michael
8599eda37c
allow megaparsec 9
2020-09-07 11:41:57 -07:00
Simon Michael
a1321b7f26
;shake: commandhelp -> commandtxts, don't build this for "manuals"
2020-09-07 11:41:56 -07:00
Simon Michael
a5fcb19bb0
;doc: changelog updates
2020-09-07 09:23:42 -07:00
Simon Michael
a9fbaaf284
;partial comment cleanups
2020-09-03 09:52:00 -07:00
Simon Michael
09ac90a70a
;doc: finalise changelogs
2020-09-01 20:28:04 -07:00
Simon Michael
3170cc7cbd
bump version to 1.19
2020-09-01 20:27:17 -07:00
Simon Michael
7aefa6f0ce
;doc: changelogs
2020-09-01 20:23:30 -07:00
Simon Michael
e44c1cfae8
;regen manuals
2020-09-01 16:31:18 -07:00
Simon Michael
c1a985f1c8
;bal: doc: drop link to resolved sorting issue ( #1279 )
2020-09-01 16:31:18 -07:00
Stephen Morgan
07dd30c1e5
lib,cli,ui: Change to consistent naming scheme for Hledger.Utils.Regex.
2020-09-01 11:36:34 +10:00
Stephen Morgan
af31d6e140
lib,cli,ui: Remove redundant Typeable and Data instances.
...
Also add some explicit import lists.
2020-08-31 15:41:30 +10:00
Stephen Morgan
e5371d5a6a
lib,cli,ui,web: Make Regexp a wrapper for Regex.
2020-08-31 12:04:45 +10:00
Stephen Morgan
f6fa76bba7
lib,cli: Get rid of magic values for asprecision, use a sum type instead.
2020-08-30 23:00:35 +10:00
Stephen Morgan
371b349b2e
lib,cli: Replace parsedate and mkdatespan with direct applications of fromGregorian, transaction now takes Day instead of a date string.
2020-08-29 15:08:28 -07:00
Stephen Morgan
2fd678e415
lib,cli,ui: Remove old CPP directives made redundant by version bounds.
2020-08-29 15:08:28 -07:00
Simon Michael
20336ddc4d
;doc: more file extensions tweaks
2020-08-21 09:21:46 -07:00
Simon Michael
c3d8857ae5
;doc: clarify csv file extensions and separator inferring
2020-08-21 09:01:23 -07:00
Stephen Morgan
4d5888aa8d
cli: No longer force --no-total in compound balance reports when using --percent.
2020-08-11 15:16:29 -07:00
Simon Michael
3f55c23603
;review, tag all error calls with an easier to find PARTIAL: comment ( #1312 )
2020-08-05 16:08:33 -07:00
Simon Michael
242c05fc9a
lib, journal: parseQuery, modifyTransactions are now total ( #1312 )
...
modifyTransactions now also requires a reference date, for parsing queries.
Relative dates are now permitted in auto posting rules.
2020-08-05 13:44:04 -07:00
Simon Michael
5d40b54043
;doc: regen manuals
2020-08-01 12:41:54 -07:00
Simon Michael
1eca6b8b5c
;queries: document quarter query term ( #1247 )
2020-07-31 18:15:18 -07:00
Stephen Morgan
081ee390ab
lib: Change skipMany spacenonewline to takeWhileP Nothing isNonNewlineSpace.
2020-07-22 14:58:53 -07:00
Simon Michael
1c4e0c3cff
;reg,areg: interlink their docs
2020-07-22 07:57:53 -07:00
Simon Michael
640d2f2972
;bs/bse/cf/is: update help to mention account types
2020-07-19 11:15:50 -07:00
Simon Michael
21b91f17cb
;regen manuals
2020-07-18 12:37:06 -07:00
Simon Michael
847fc23236
ui: use t/l keys for tree/list, T for "today", drop vi keys?! retune help ( #1286 )
2020-07-17 15:42:05 -07:00
Simon Michael
3636875a5d
cli: add -t/-l short flags for --tree/--flat; improve help ( #1286 )
2020-07-17 15:36:07 -07:00
Simon Michael
ba49699728
cli: improve --color/--colour help & help layout
2020-07-17 15:36:07 -07:00
Stephen Morgan
30f02b0882
lib: account name clipping takes Maybe Int as depth.
2020-07-17 07:41:27 -07:00
Stephen Morgan
51ea6d9f25
lib: Make queryDepth return Maybe Int.
2020-07-16 10:05:53 -07:00
Simon Michael
73141aa645
;regen help/manuals
2020-07-14 12:22:27 -07:00
Simon Michael
144415f6fa
;cli: improve --color help
2020-07-14 12:22:11 -07:00
Simon Michael
031f72ac4b
;help/manuals
2020-07-14 12:09:54 -07:00
Simon Michael
403cb457b7
;cabal files
2020-07-14 12:09:45 -07:00
Simon Michael
3452270241
cli: --color/--colour option; smart emacs, windows autodetection ( #1296 )
2020-07-14 12:08:36 -07:00
Simon Michael
02043d4e65
;areg: doc: fix heading level
2020-07-14 10:37:49 -07:00
Simon Michael
4f7bee7abf
;regen help, manuals
2020-07-14 10:25:04 -07:00
Simon Michael
9198449ee3
areg: an account transaction register like the ones in ui/web ( #1294 )
...
;areg: debug output
;areg: show a title indicating which account was picked
This might be a bit of a pain for scripting, but otherwise it can be
quite confusing if your argument matches an account you didn't expect.
;areg: improve CSV headings
;areg: show at most two commodities per amount
2020-07-14 10:24:57 -07:00
Simon Michael
fd00d9c1cc
tags: add --parsed flag, hide empties without --empty
...
With --parsed flag, all tags or values are shown in the order they
are parsed from the input data, including duplicates.
With -E/--empty, any blank/empty values will also be shown, otherwise
they are omitted.
2020-07-14 10:20:52 -07:00
Simon Michael
c99989acd7
;cli: improve --value help, mention 'then'
2020-07-13 11:52:14 -07:00
Simon Michael
23bef9a01b
;refactor: extracted reportPeriodName for making report headings
2020-07-09 12:54:20 -07:00
Simon Michael
0a9b05f3fd
;refactor balance report column headings
2020-07-09 11:49:16 -07:00
Simon Michael
09b1736d5a
bal, bs, cf, is: update flat/tree help; order options a bit better
2020-07-07 19:00:10 -07:00
Stephen Morgan
5ffe1d7656
cli: Allow --drop in account command in tree mode.
2020-07-07 16:05:05 -07:00
Stephen Morgan
1425301a8c
lib, cli: Use --flat as the default mode for all reports.
2020-07-07 15:49:08 -07:00
Stephen Morgan
df84a417d7
doc: Remove references to old limitations of boring parent ellision.
2020-07-07 15:49:08 -07:00
Simon Michael
644be1e1cf
codes: add missing files to stack/cabal config
2020-07-07 13:56:45 -07:00
Simon Michael
ae4fce8077
;regen manuals
2020-07-07 13:42:11 -07:00
Simon Michael
3ad313d8fa
codes: new command for listing transaction codes
2020-07-07 13:38:49 -07:00
Simon Michael
a7a01c0f9f
descriptions, notes, payees: fix/improve help and comments
2020-07-07 13:38:49 -07:00
Simon Michael
95ee601548
;regen manuals
2020-07-07 10:19:56 -07:00
Simon Michael
eee9402ba8
add: fix help - arguments are inputs, not a query
2020-07-07 10:10:13 -07:00
Simon Michael
0bbd88fe7f
;doc: changelogs
2020-07-05 09:24:16 -07:00
Simon Michael
44c3eb1904
add a color argument to most amount show helpers, drop cshow variants
...
This is an API change, but it seems better than having additional
colour-supporting variants and trying to avoid duplicated code.
I stopped short of changing showAmount, so cshowAmount still exists.
2020-07-05 06:59:16 -07:00
Simon Michael
2739a70a38
balcmds: elide amounts with 3 or more commodities, unless --no-elide
...
Multicolumn balance reports showing many commodities tend to become
unreadably wide, especially in tree mode. Now by default we show at
most two commodities, and a count of the rest if there are more than
two. This should help keep reports somewhat readable by default.
2020-07-05 06:59:16 -07:00
Simon Michael
3d57d4793d
;doc: regen manuals
2020-07-04 16:17:13 -07:00
Simon Michael
aea0dac235
bal: warn about #1279 in manual
2020-07-04 16:13:35 -07:00
Stephen Morgan
c811ea4c7b
lib, cli, ui, web: intopt and friends now make sure their arguments fit
...
inside bounds.
2020-07-03 12:35:51 -07:00
Simon Michael
765fb732c9
debug: move command parsing debug output down to level 8
2020-07-03 11:37:01 -07:00
Stephen Morgan
4fc72328d2
lib, cli: Introduce convienience function compoundBalanceReport.
2020-06-28 07:29:49 -07:00
Stephen Morgan
604868cea5
lib, cli: Move CompoundBalanceReport into ReportTypes, compoundReportWith into MultiBalanceReport, share postings amongst subreports.
2020-06-28 07:29:49 -07:00
Simon Michael
e090e0f949
add lower bound needed for aeson, to help cabal ( #1268 )
2020-06-23 14:55:42 -07:00
Stephen Morgan
b3cd865786
lib: Add fortnightly as a synonym for biweekly.
2020-06-23 06:48:20 -07:00
Simon Michael
e0fab4f882
Merge pull request #1256 from Xitian9/balanceReport
...
SMorgan:
This PR aims to accomplish two major goals:
- Get boring parent ellision working for multiBalanceReport
- Remove the special BalanceReport code, and just use multiBalanceReport
I believe it does both, with the following additional benefits:
A refactor of multiBalanceReportWith, to make the structure easier to follow, and with a clearer division of responsibilities
All decisions for how an account name is to be displayed are now made in multiBalanceReport, rather than scattered around the code base
Some miscellaneous improvements in account name rendering, including --drop now working with MultiBalanceReports, and addressing some of #373
Algorithmic changes:
- Using HashMap AccountName (Map DateSpan Account) instead of [[MixedAmount]] is new. I admit I didn't profile this change (though given the nubs and lookups, I thought it was appropriate), so I'm glad it produces a speedup.
- Producing the starting balances no longer calls the whole balanceReport, just the first few functions to get what it needs.
- displayedAccounts is completely rewritten. Perhaps one subtle thing to note is that in tree mode it no longer excludes nodes with zero inclusive balance unless they also have zero exclusive balance.
SMichael:
I'll mark the passing of the old multiBalanceReport, into which I poured many an hour :). It is in a way the heart (brain ?) of hledger - the key feature of ledgerlikes (balance report) and a key improvement introduced by hledger (tabular multiperiod balance reports). You have split that 300-line though well documented function into modular parts, which could be a little harder to understand in detail but are easier to understand in the large and more amenable to further refactoring. Then you fixed some old limitations (boring parent eliding in multi period balance reports, --drop with tree mode reports), allowing us to drop the old balanceReport and focus on just the new multiBalanceReport. And for representing the tabular data you replaced the semantically correct but inefficient list of lists with a map of maps, speeding up many-columned balance reports significantly (~40%). Last and not least you made it really easy to review. Thanks @Xitian9, great work.
2020-06-23 06:42:22 -07:00
Simon Michael
176011905e
;changelogs
2020-06-22 12:24:01 -07:00
Simon Michael
368297102d
;regen manuals
2020-06-22 12:20:14 -07:00
Dmitry Astapov
c8a84e3c96
cli: print -O sql
2020-06-22 12:17:33 -07:00
Stephen Morgan
d2e0312ab1
cli: Make --no-total remove subtotals from CompoundBalanceReport, not just net total.
2020-06-22 12:16:07 -07:00
Stephen Morgan
7a5416928e
cli: multiBalanceReport: Remove redundant code branch.
2020-06-22 22:28:09 +10:00
Stephen Morgan
e079c8b808
lib: multiBalanceReport: Remove old balanceReport code, update some tests.
2020-06-22 22:27:09 +10:00
Stephen Morgan
5f0918217a
multibalanceReport: Move responsibility for determining displayed name in multiBalanceReportWith, not at point of consumption.
2020-06-22 22:20:09 +10:00
Simon Michael
536bea2a78
roi: show errors without a traceback
2020-06-21 11:02:16 -07:00
Simon Michael
ce4de7aeb9
;doc: regen manuals
...
[ci skip]
2020-06-21 10:36:21 -07:00
Simon Michael
24996caaeb
bump to dev version
2020-06-21 10:35:52 -07:00
Simon Michael
c24f04823a
;doc: clarify print changelog
2020-06-21 10:23:27 -07:00
Simon Michael
6216258b41
;doc: finalise 1.18.1 changelogs
2020-06-21 10:22:53 -07:00
Simon Michael
128836f6f8
;changelogs
2020-06-20 18:24:15 -07:00
Simon Michael
06c174b236
;valuation: doc edits
2020-06-19 17:17:49 -07:00
Simon Michael
fae1cc262e
;regen manuals
2020-06-19 14:47:41 -07:00
Simon Michael
e3cae4aadc
valuation: implement new --infer-value flag & semantics ( #1239 , #1253 )
2020-06-19 14:40:20 -07:00
Simon Michael
e143ad2695
;valuation: doc specifying new proposed behaviour ( #1239 , #1253 )
2020-06-19 14:40:17 -07:00
Simon Michael
06d5014f5f
;lib: multibalancereport: apply debug output policy
2020-06-16 21:00:08 -07:00
Martin Michlmayr
7310951178
doc: fix typos
2020-06-16 19:13:18 -07:00
Simon Michael
684cb45e1a
tweak debug levels, document some guidelines
...
Beginnings of a project-wide policy for what output to show at
each debug level, for now. Later we'll want more flexibility,
eg filtering by topic.
2020-06-14 17:17:09 -07:00
Simon Michael
a384041f7c
;doc: valuation: clarify that -V requires P directives ( #1239 , #1253 )
2020-06-14 15:41:48 -07:00
Dmitry Astapov
802378999f
cli: changes to "hledger print -O csv" output
2020-06-13 16:26:27 -07:00
Simon Michael
6711e47c7c
;doc: valuation: more edits
2020-06-13 14:15:01 -07:00
Simon Michael
c8773854f0
;doc: valuation: more cleanup
2020-06-13 12:41:02 -07:00
Simon Michael
07bda4105f
;doc: valuation: tweak
2020-06-13 12:30:13 -07:00
Simon Michael
558abf4bd7
;doc: valuation: simplify
2020-06-13 12:25:17 -07:00
Simon Michael
4e182e651b
;doc: valuation: clarify this section; note a recent change
...
Note that default valuation commodity is now chosen from the latest
suitable P directive on any date, not just before the valuation date.
2020-06-13 12:20:55 -07:00
Simon Michael
03b4b2dedc
journal: default valuation commodity comes from P directives only ( #1239 , #1253 )
2020-06-12 21:25:38 -07:00
Simon Michael
dfccfe33c1
;cli, web: relnotes: add some missing names/item
2020-06-09 15:54:08 -07:00
Simon Michael
729e87066f
;cabal files
2020-06-07 13:00:40 -07:00
Simon Michael
aee6b49d36
;bump date in changelogs, installer
2020-06-07 12:45:55 -07:00
Simon Michael
b389ee98dd
;update tested-with
2020-06-07 11:59:36 -07:00
Simon Michael
e8e27821d9
;finalise changelogs
2020-06-07 11:51:40 -07:00
Simon Michael
09b6d44562
;manuals
2020-06-06 17:21:18 -07:00
Simon Michael
a54376e204
;regen cabal files
2020-06-06 17:20:13 -07:00
Simon Michael
19020939c9
;bump versions to 1.18
2020-06-06 17:18:15 -07:00
Simon Michael
fa077415d4
;edit changelogs
2020-06-06 16:53:41 -07:00
Simon Michael
b86ced5ee9
lib: replace jsonPrettyText with toJsonText in Hledger.Data.Json
2020-06-06 12:54:58 -07:00
Simon Michael
5757c386d8
;draft changelogs
2020-06-05 15:18:23 -07:00
Simon Michael
e5a0bddbe6
;regen manuals
2020-06-05 14:44:37 -07:00
Simon Michael
88051b93ab
;cli: doc: regular expressions: fix special characters link
2020-06-05 07:24:33 -07:00
Stephen Morgan
be25fe360e
lib: Parser now accepts .. as a synonym for to in date ranges.
2020-06-04 19:30:42 -07:00
Stephen Morgan
935abd1842
lib: Use .. in place of ,, for date ranges in compound balance reports.
2020-06-04 19:30:42 -07:00
Simon Michael
d1f62f0f2e
print, reg, balcmds: show json output pretty-printed
2020-06-04 15:13:28 -07:00
Simon Michael
9bc8c5d668
;cli: doc: json output seems not pretty printed right now
2020-06-04 13:59:26 -07:00
Dmitry Astapov
b7413edf22
lib: --forecast=PERIODICEXPR. Fixes #835 , #1236
2020-06-03 15:53:00 -07:00
Simon Michael
8b0618ce4d
;cli: doc: not basically
2020-06-01 04:48:30 -07:00
Simon Michael
97f2235bca
;lib: refactor amount cost functions
...
Rename costOfAmount -> amountCost, costOfMixedAmount -> mixedAmountCost,
drop amountToCost, mixedAmountToCost.
2020-05-31 15:48:08 -07:00
Simon Michael
660ba7e1d9
lib: clarify zero-checking function names
...
isZeroAmount -> amountLooksZero
isReallyZeroAmount -> amountIsZero
isZeroMixedAmount -> mixedAmountLooksZero
isReallyZeroMixedAmount -> mixedAmountIsZero
isReallyZeroMixedAmountCost dropped
2020-05-29 18:57:22 -07:00
Dmitry Astapov
54300328cd
cli: ability to pass arguments to getHledgerCliOpts + two example scripts
2020-05-27 04:58:57 -07:00
Simon Michael
9417ee625e
;regen manuals
2020-05-25 17:49:01 -07:00
Simon Michael
93154e9251
update and clean up valuation docs ( #1239 )
2020-05-25 17:45:31 -07:00
Dmitry Astapov
cbacef21eb
lib: multiBalanceReport derives query from ReportOpts
2020-05-25 15:50:14 -07:00
Simon Michael
61bec588d2
print,reg,balcmds: list output formats accurately in --help ( #689 )
...
Also:
- tweak the unsupported output format message
- Hledger.Cli.CliOptions no longer exports outputflags
2020-05-23 13:54:41 -07:00
Simon Michael
5f1a864c20
print,reg,balcmds: fix JSON output, which wasn't JSON ( #689 )
2020-05-23 13:30:22 -07:00
Simon Michael
4706b8cb00
;regex doc tweaks
2020-05-10 13:15:15 -07:00
Simon Michael
24209a952c
;regex doc tweaks
2020-05-10 13:13:51 -07:00
Simon Michael
71111148ed
;regex doc tweaks
2020-05-10 13:11:53 -07:00
Simon Michael
f167c223a2
;csv: emphasize regular expressions features and doc
2020-05-10 13:03:09 -07:00
Simon Michael
e5ed001ce8
;doc: clarify when regexps do and do not support backreferences
2020-05-09 15:35:53 -07:00
Simon Michael
6935c46b2c
;regen cabal files with latest stack/hpack (2.3.1/0.33.0)
2020-05-02 17:31:35 -07:00
Simon Michael
9dc015d974
;doc: typo
2020-04-29 11:01:27 -07:00
Simon Michael
c0dc71ae25
;doc: update the locale troubleshooting doc
2020-04-29 10:59:08 -07:00
Simon Michael
9cdf2953da
;api, ci: drop old embedded doc symlinks, should fix CI
2020-04-20 18:25:08 -07:00
Simon Michael
df92c36679
;changelogs
2020-04-19 14:45:07 -07:00
Simon Michael
a016a43785
cli: fix hiding of redundant source scripts when a .com/.exe exists
...
Related to #1225 .
2020-04-15 11:33:38 -07:00
Simon Michael
3b59a95a54
;cli, journal: doc: consistent heading capitalisation, whitespace
2020-04-08 21:14:38 -07:00
Simon Michael
fedde7fab1
journal: also support the total lot price variants ({{}}, {{=}})
2020-04-08 19:18:39 -07:00
Simon Michael
5beeb56a87
;journal: document improved lot price parsing; changelog
2020-04-08 19:02:24 -07:00
Simon Michael
898cda4ee5
;changelogs
2020-04-06 18:38:38 -07:00
Simon Michael
e7e9f1ee3b
;doc: cli: troubleshooting: mention C.UTF-8
2020-03-27 14:41:12 -07:00
Simon Michael
b6e4a1bdc0
;doc: cli: troubleshooting: clarify locale spelling a bit
2020-03-27 13:37:06 -07:00
Simon Michael
293e2d81d1
;changelogs
2020-03-25 18:42:26 -07:00
Simon Michael
d868a7e170
;update cabal files
2020-03-22 10:49:49 -07:00
Simon Michael
c6951bf7c6
;doc: more tweaks to package readmes, hackage descriptions
2020-03-22 10:49:02 -07:00
Simon Michael
40d3a5c1f4
;update cabal files
2020-03-22 09:28:10 -07:00
Simon Michael
9ca8d7cea9
;update tested-with
2020-03-22 09:27:50 -07:00
Simon Michael
d59ccb260b
;doc: consistent markdown readmes for packages, part 2
2020-03-22 09:27:34 -07:00
Simon Michael
617c2ecbc5
;doc: consistent markdown readmes for packages
2020-03-22 09:07:47 -07:00
Simon Michael
1a606870ca
;regen docs
2020-03-19 16:05:52 -07:00
Simon Michael
35ba2e4e9e
;bal: doc: recommend using the same commodity for budget goals
2020-03-19 16:03:58 -07:00
Simon Michael
6e37d11bdd
;changelogs: typo, fix hledger-web item
2020-03-19 14:26:55 -07:00
Simon Michael
9631ca561c
;update changelogs "high water marks"
2020-03-19 14:09:37 -07:00
Simon Michael
4191aad049
;update changelogs from release branch
2020-03-19 14:07:53 -07:00
Simon Michael
96b4f0be4f
require newer Decimal, math-functions, fixing inconsistent rounding
...
Decimal 0.5.1+ changed to banker's rounding (round to nearest even
number), and math-functions 0.3.3.0 (used by roi) fixed various
precision-related issues. Now we require the latest versions of these.
This was causing some functional test failures when building with old
GHCs/snapshots.
2020-03-19 10:10:55 -07:00
Simon Michael
cf7de57836
;update changelogs
2020-03-18 16:17:13 -07:00
Simon Michael
70e85d8e4b
;doc: regen manuals
...
[ci skip]
2020-03-07 15:06:39 -08:00
Simon Michael
1883ff4499
bump to dev version
2020-03-07 15:06:18 -08:00
Simon Michael
5639b47d85
;ci: use --pedantic for all; fix a warning with unit test suites
2020-03-07 14:43:50 -08:00
Simon Michael
7ad0f9dd6d
;lib, cli: fix success-hiding in unit test suites
2020-03-07 14:10:22 -08:00
Simon Michael
5ab31f1111
;lib, cli: hide successes in unit test suites' output
2020-03-07 04:00:55 -08:00
Stephen Morgan
702c958487
lib: Replace some utility functions with library functions.
2020-03-02 12:45:30 -08:00
Simon Michael
6dfdc2bee8
;one more cabal file update. Not in hackage tarballs.
2020-03-01 17:42:20 -08:00
Simon Michael
07a05d5c76
;doc: finalise changelogs
...
More cleanup needed, but time's up.
[ci skip]
2020-03-01 17:33:18 -08:00
Simon Michael
061bf73b61
;doc: regen manuals
...
[ci skip]
2020-03-01 17:29:01 -08:00
Simon Michael
ba44d00bed
;bump version to 1.17
2020-03-01 17:29:01 -08:00
Simon Michael
889767f1bd
;bump tested-with
...
[ci skip]
2020-03-01 17:28:43 -08:00
Simon Michael
04fb132496
;doc: draft changelogs
...
[ci skip]
2020-03-01 16:44:28 -08:00
Simon Michael
2c8a6e988f
lib: Hledger.Read.CsvReader cleanup
...
Exports added: CsvRecord, CsvValue, csvFileFor
Exports removed: expandIncludes, parseAndValidateCsvRules, transactionFromCsvRecord
2020-02-27 23:37:32 -08:00
Simon Michael
3aebf03864
;doc: json tweaks
...
[ci skip]
2020-02-26 11:48:09 -08:00
Simon Michael
a33a9d61c2
json: use a simpler, more consumable number representation ( #1195 )
...
Amounts in JSON are now rendered as simple Numbers with up to 10
decimal places, instead of Decimal objects which would in some cases
have 255 digits, too many for most JSON parsers to handle.
A provisional fix, see the comment in Json.hs for more detail.
2020-02-26 11:48:09 -08:00
Simon Michael
4c321cee4a
;doc: update output dest/format docs; add notes about JSON
...
[ci skip]
2020-02-25 09:25:48 -08:00
Simon Michael
2a5f7819af
bs,cf,is,bal,print,reg: support json output format
2020-02-24 17:49:53 -08:00
Simon Michael
bc9bdf8108
;print: refactor, drop unneeded ropts tweak
2020-02-24 17:49:53 -08:00
Simon Michael
7f16d23898
;refactor: extract --value=then error message
2020-02-24 17:49:53 -08:00
Simon Michael
8b520b5c3e
bs,cf,is,bal,print,reg: reject invalid output formats
2020-02-24 17:49:45 -08:00
Simon Michael
7ec25da13a
web: edit/upload: normalise line endings, avoiding parse errors ( #1194 )
...
Renamed: writeValidJournal -> writeJournalTextIfValidAndChanged
Added comments clarifying line ending behaviour of:
add, import, appendToJournalFileOrStdout, readFilePortably,
writeFileWithBackupIfChanged, writeJournalTextIfValidAndChanged
Summary of current behaviour:
- hledger add and import commands will append with (at least some)
unix line endings, possibly causing the file to have mixed line
endings
- hledger-web edit and upload forms will write the file with
the current system's native line endings, ie changing all
line endings if the file previously used foreign line endings.
2020-02-24 14:04:44 -08:00
Simon Michael
696ec4998b
;doc: regen help/manuals
...
[ci skip]
2020-02-22 11:40:41 -08:00
Simon Michael
b9b5702946
;doc: add hledger-ui note to --forecast help ( #1193 )
...
[ci skip]
2020-02-22 11:40:41 -08:00
Simon Michael
e8e1566083
;bal: doc: document --transpose; remove obsolete limitation note
...
[ci skip]
2020-02-20 10:02:02 -08:00
Simon Michael
bd0753101e
bs, cf, is: in csv output, subreport headings had two excess columns
2020-02-12 10:48:04 -08:00
Simon Michael
dad4d9b662
print: be sure to value all postings; -V/-X/--value now imply -x
...
Previously -B implied -x; now any of the valuation flags do.
This avoids a bug where print -V of a transaction with an implicit
commodity conversion would convert only some of its postings to value.
Also, more valuation tests.
2020-02-10 12:41:36 -08:00
Mateus Furquim
05814e6fe7
Fix extra $ symbol
2020-02-10 10:18:20 -08:00
Simon Michael
af73547615
;print, register: doc: some corrections to --value=then's effects
...
[ci skip]
2020-02-10 08:40:50 -08:00
Simon Michael
aa96b41efe
print, register: add --value=then, valuing at each posting's date
...
Currently this will give an error with other kinds of report.
2020-02-10 08:20:39 -08:00
Simon Michael
4d94a5273b
;doc: manuals: whitespace cleanup
...
Remove a bunch of trailing whitespace with M-x whitespace-cleanup.
Except for examples showing hledger output, which might be tested
with shelltest some day, so stripping that whitespace might be problematic.
[ci skip]
2020-02-08 12:44:54 -08:00
Simon Michael
98d0cc9c17
;doc: regen manuals
...
[ci skip]
2020-02-08 11:56:03 -08:00
Simon Michael
54e633e186
;doc: hledger, journal, csv: consistent use of pipe tables
...
For consistency, ease of editing, and to fix unwanted content display
when cycling visibility in markdown-mode.
[ci skip]
2020-02-08 11:52:18 -08:00
Simon Michael
ea4b69db32
;doc: hledger: markdown note
...
[ci skip]
2020-02-08 11:40:40 -08:00
Simon Michael
e3ab3b9985
;doc: regen all manuals, bumping month
...
[ci skip]
2020-02-08 11:20:25 -08:00
Simon Michael
078e9c8e9c
;doc: hledger: merge examples, options, commands files
...
[ci skip]
2020-02-08 11:15:27 -08:00
Simon Michael
d60b053e11
;doc: regen manuals
...
[ci skip]
2020-02-08 11:11:40 -08:00
Simon Michael
e52a6281fb
;doc: hledger: inline troubleshooting, cleanups, m4 docs
...
[ci skip]
2020-02-08 11:10:23 -08:00
Simon Michael
9a52523438
;doc: hledger: not git commit -am, just -m
...
[ci skip]
2020-02-07 16:44:52 -08:00
Simon Michael
8c5aa130e7
;doc: hledger: reorder OPTIONS sections, move one to COMMON TASKS
...
[ci skip]
2020-02-07 12:14:43 -08:00
Simon Michael
202d2e945b
;doc: regen manuals
...
[ci skip]
2020-02-07 12:14:08 -08:00
Simon Michael
fd64d7bb3a
;doc: regen manuals
...
[ci skip]
2020-02-07 10:45:57 -08:00
Simon Michael
6878f74174
;doc: hledger: write the new examples (Common Tasks) section
...
Examples are tested and should be correct.
[ci skip]
2020-02-07 10:42:57 -08:00
Simon Michael
743a63c319
;doc: consolidate hledger manual a bit
2020-02-06 17:52:37 -08:00
Simon Michael
659a034393
;doc: makde some comments less like markdown headings
...
[ci skip]
2020-02-05 19:32:38 -08:00
Simon Michael
6830139b70
;checkdupes: help: fix link
2020-01-28 09:20:42 -08:00
Simon Michael
7011160bfd
;allow base 4.14/GHC 8.10
2020-01-26 08:12:25 -08:00
Simon Michael
b1de2f2308
;doc: drop redundant version message from web manuals
...
[ci skip]
2020-01-25 19:33:12 -08:00
Simon Michael
24c6828a5c
;doc: regen manuals
...
[ci skip]
2020-01-25 17:10:34 -08:00
Simon Michael
444c4342ed
;doc: manuals: hide NAME/SYNOPSIS/DESCRIPTION headings in web manuals
...
[ci skip]
2020-01-25 16:57:51 -08:00
Simon Michael
a6ec6b40da
;doc: manuals: tweak standard description, make hledger's consistent
...
[ci skip]
2020-01-25 16:55:58 -08:00
Simon Michael
f1f32e8341
;close: doc: cleanups, remove dangerous >> example ( #1165 )
...
[ci skip]
2020-01-22 15:32:36 -08:00
Simon Michael
b4ced3188e
;doc: regen manuals
...
[ci skip]
2020-01-22 15:22:56 -08:00
Simon Michael
5ba3cc6f42
close: regularise the --open*/--close* flags for memorability ( #1165 )
...
--closing -> --close
--opening -> --open
--close-to -> --close-acct
--open-from -> --open-acct
The old flags are still accepted for backward compatibility, but are
not shown in --help or docs, to conserve screen and brain space.
2020-01-22 15:19:24 -08:00
Simon Michael
cda8909aae
close: don't repeat the description by default ( #1165 )
...
You'll almost certainly want the opening/closing descriptions to be
different, for filtering, so making --close-desc and --open-desc fully
independent is a better default.
And more doc cleanups.
2020-01-22 15:04:05 -08:00
Simon Michael
ceedcb1a18
;doc: regen manuals
...
[ci skip]
2020-01-22 14:50:21 -08:00
Simon Michael
458de89aae
;close: doc tweaks
...
[ci skip]
2020-01-22 14:42:01 -08:00
Simon Michael
f14ae7df3a
;doc: regen manuals
...
[ci skip]
2020-01-22 14:41:08 -08:00
Simon Michael
72d0190d1d
;close: doc tweaks
...
[ci skip]
2020-01-22 14:40:20 -08:00
Simon Michael
d93c69146d
;doc: regen manuals
...
[ci skip]
2020-01-22 14:30:50 -08:00
Simon Michael
f1110d163d
close: --close-desc/--open-desc customise the descriptions ( #1165 )
2020-01-22 14:30:12 -08:00
Simon Michael
4bb840a0f3
close: use the same default equity account for both ( #1165 )
...
And some doc cleanups.
"equity:opening/closing balances" is now the default account for both.
2020-01-22 14:29:31 -08:00
Simon Michael
9710c86c7f
;doc: regen manuals
...
[ci skip]
2020-01-22 12:52:41 -08:00
Simon Michael
7500002ee5
close: hide equity amounts by default, for simpler entries ( #1165 )
...
-x/--explicit shows them, as with print.
2020-01-22 12:52:16 -08:00
Simon Michael
2645b76ff0
close: hide prices by default, show them with --show-costs ( #1165 )
...
close no longer preserves costs, generating huge entries when there
are many foreign currency/investment transactions, unless you ask it to.
2020-01-22 12:52:01 -08:00
Simon Michael
dee9c0f150
;close: --close-to also sets --open-from and vice versa ( #1165 )
2020-01-22 08:52:20 -08:00
Simon Michael
aa8c18fcc8
;close: refactor ( #1165 )
2020-01-22 08:34:13 -08:00