Simon Michael
c96734474c
Merge Xitian9/reporttext ( #1427 )
...
Many parts of the hledger-lib and hledger APIs have become more Text-ified,
expecting or returning Text instead of String.
Some functions now use WideBuilder (a text "builder" which keeps track
of width), to concatenate text more efficiently. There are some
helpers for converting to and from WideBuilder (wbUnpack, wbToText..)
showAmountB/showMixedAmountB are new amount-displaying functions
taking an AmountDisplayOpts. These will probably replace the old
show(Mixed)Amount* functions.
This reduces hledger's time and resident memory requirements by roughly 10%.
2021-01-02 07:11:09 -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
ef250e5673
bin: Update bin scripts for new API.
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
1f891a4145
doc: Fix some outdated 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
0a686e220e
lib: Use AmountDisplayOpts for showAmount*, reducing need for many different named functions.
2021-01-02 15:08:09 +11:00
Stephen Morgan
c86e8a9794
lib: Implement showAmountHelper using AmountBuilder.
2021-01-02 15:08:09 +11:00
Stephen Morgan
5dedec83da
lib: showamountquantity shows directly, rather than parsing string output of show instance for Quantity.
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
f8afb94d09
;bin: readme update
2020-12-31 12:24:44 -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
aragaer
2084b845e0
journal: Ignore AUTO commodity when strict checking
...
AUTO commodity is a placeholder for postings with missing amounts. It
should be ignored when doing a strict commodity check.
Fixes #1419
2020-12-31 09:54:23 -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
652deb04ee
Merge pull request #1435 into master (add "payees" check)
...
Second attempt, repaired version.
2020-12-31 08:31:19 -08:00
Simon Michael
e705386999
;examples: sample: save directives for testing
...
(cherry picked from commit 1e0bc8298119e1dbff6f2191707948a7a77c570a)
2020-12-31 08:29:51 -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
Simon Michael
e59603a04a
;check errors: drop unwanted newline & "strict mode" prefix
2020-12-30 18:08:31 -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
Damien Cassou
e092b38631
;lib: add 'payee' directive
2020-12-30 18:08:30 -08:00
Simon Michael
8ab2316604
;cli: doc: data formats: wording
2020-12-30 17:06:01 -08:00
Stephen Morgan
a64d1aa6d0
bin: Update bin scripts for current hledger-lib.
...
(cherry picked from commit bc4aef17b7fa13ec0754b93325e1c5e5ee04f1e7)
2020-12-30 08:59:03 -08:00