Commit Graph

13271 Commits

Author SHA1 Message Date
Stephen Morgan
7168f7efc4 imp: ui: Use new DepthSpec in hledger-ui.
The regular expression depths are ignored, and only the flat depths are
used.
2024-12-03 08:33:21 -10:00
Stephen Morgan
74f0f37fb3 imp: queries: Allow regular expression depth queries
Previously depth-limiting was universal across all accounts, e.g. all
accounts are clipped to depth 2. However, sometimes you want certain
accounts clipped to a different depth than others, e.g. all expenses to
depth 3, while all assets to depth 2. This commit enables depth-limiting
to optionally include a regular expression, which limits the accounts it
applies to.

More than one depth limit can be passed, and they are applied to each
account name by the following rules:
- If one or more regular-expression depth limit applies, use the
  most specific one
- If no regular-expression depth limits apply, and a flat depth limit is
  supplied, use that
- Otherwise, do not do any depth limiting

For example, this will clip all accounts matching "assets" to depth 3,
all accounts matching "expenses" to depth 2, and all other accounts to
depth 1.
--depth assets=3 --depth expenses=2 --depth 1
2024-12-03 08:33:21 -10:00
Simon Michael
436b2ab3fb pkg:stack: try to avoid a doctest>unix link failure
("multiple definition of __hsunix_get_environ")
2024-12-02 23:40:34 -10:00
Simon Michael
735beb96a7 imp:valuation: more compact and informative --debug=2 output [#2287]
Market prices are now shown using one line each,
the known prices are listed (forward / forward+reverse),
and the status of --infer-market-prices is shown.
2024-12-02 23:00:00 -10:00
Simon Michael
e80debe4c9 ;ci:linux: work around yesod-core/wai-extra bound issue
https://github.com/commercialhaskell/stackage/issues/7570
2024-12-02 21:07:34 -10:00
Simon Michael
784a95de29 ;ci: mac, windows: fix time dep 2024-12-02 20:41:25 -10:00
Simon Michael
84254ca2b8 ;ci: windows: explicit time dep required 2024-12-02 17:40:29 -10:00
Simon Michael
f17ed111b6 ;ci: linux, mac: ghc 9.8.2 -> 9.8.4 2024-12-02 17:18:58 -10:00
Simon Michael
645da4a74f ;pkg: bump to latest stackage snapshot 2024-12-02 17:13:28 -10:00
Simon Michael
b9100f3471 ;tools: just relbin: assume "origin" remote name 2024-12-02 16:45:26 -10:00
Simon Michael
909a903137 ;doc:ui: mention that period navigation uses standard periods [#2293] 2024-12-01 15:08:45 -10:00
Simon Michael
f345c6c8d9 ;doc:import: more edits 2024-12-01 11:22:10 -10:00
Simon Michael
d16efeb26a ;doc:import: edit 2024-11-30 09:25:02 -08:00
Simon Michael
f414c37195 ;doc:import: first import tips 2024-11-30 06:57:13 -08:00
Simon Michael
812a7e28d7 ;doc:import: updates 2024-11-29 16:18:58 -08:00
Simon Michael
ff649114a7 ;doc:import: updates 2024-11-29 16:03:08 -08:00
Simon Michael
3d0aec7e8b ;doc:import: rewrite; date skipping -> overlap detection 2024-11-29 15:45:19 -08:00
Simon Michael
a38c09be98 ;doc: assertions: mention their behaviour with posting status 2024-11-21 07:57:26 -10:00
Simon Michael
e1d5339643 ;doc: REGRESSIONS: update 2024-11-20 19:23:16 -10:00
Gal Lakovnik Gorenec
255dc015eb fix:ui: Fixed #2284 -- valuation and cost flags now reset each other on toggle. 2024-11-18 09:30:07 -10:00
Simon Michael
21d8044bcf ;doc:journal: rewrite the Tags section 2024-11-16 14:40:03 -10:00
Simon Michael
1ad9fbb4a8 imp:print: clean up special tags; show them more often with --verbose-tags
- These special hidden tags, used internally, have been renamed:
  - `_modified`           -> `_modified-transaction`
  - `_cost-matched`       -> `_cost-posting`
  - `_conversion-matched` -> `_conversion-posting`

- All special hidden tags now have a similarly-named visible tag,
  and `--verbose-tags` now shows those more often, which is useful
  when troubleshooting `--infer-equity`, `--infer-costs`,
  or the matching of redundant costs and conversion postings.

- The `generated-posting:` tag added by `--infer-equity` is now valueless.

- The `modified-transaction:` tag added by `--auto` now appears on its own line.
2024-11-16 14:40:03 -10:00
Simon Michael
9bf28b1b0e dev:posting*AsLines: fix some docs 2024-11-16 14:40:03 -10:00
Simon Michael
9e5d2a7759 ;doc:REGRESSIONS: update 2024-11-15 20:26:13 -10:00
Simon Michael
23210aa6c9 ;doc:REGRESSIONS: updates; clarify valid periods 2024-11-10 12:05:24 -10:00
Simon Michael
f57cd638da imp:print:beancount output: more robust account/commodity encoding
Unsupported chars are now hex-encoded, not just converted to dashes.
This helps keep account and commodity names unique, especially with
the equity conversion account names generated by --infer-equity when
using currency symbols.
(Those could also be converted to ISO 4217 codes, in theory, but
for now we just hex encode them, which is easier to make robust.)

Also, Beancount commodity symbols are no longer enclosed in
hledger-style double quotes.
2024-11-07 01:28:31 -10:00
Simon Michael
cbdbe0a855 dev: AmountFormat: add displayQuotes property to control enclosing quotes 2024-11-07 01:24:21 -10:00
Simon Michael
4b1b97a6aa ;tools: just: add ghci-echo, ghcitui 2024-11-07 01:24:21 -10:00
Simon Michael
1078c176bf ;doc: pager: link to less FAQ
Signed-off-by: Simon Michael <simon@joyful.com>
2024-11-07 01:24:21 -10:00
Dmitry Astapov
c006959b05 lib: fix division by zero in roi when all assets are sold (fixes #2281) 2024-11-06 17:56:36 -10:00
Henning Thielemann
d176215f03 cli: Commands.Aregister: --header -> --heading 2024-11-06 16:38:38 -10:00
Simon Michael
6adda683dc dev:Journal: cleanup 2024-11-02 18:29:15 -10:00
Simon Michael
660bbbb1f4 dev: update errors/README 2024-11-02 18:11:08 -10:00
Simon Michael
326acbf93b imp: check recentassertions: try to make the error message clearer 2024-11-02 18:10:53 -10:00
Simon Michael
090f001eee imp:commodities: also list commodities mentioned in P directives [#2280] 2024-11-02 16:48:08 -10:00
Simon Michael
a58948c7a8 dev:Journal: cleanup, improve docs 2024-11-02 16:47:24 -10:00
Simon Michael
445e80fd41 dev:clarify: rename jcommodities to jdeclaredcommodities 2024-11-02 15:52:17 -10:00
Simon Michael
80fa7e2db6 dev:clarify: rename jinferredcommodities to jinferredcommoditystyles 2024-11-02 15:52:07 -10:00
Simon Michael
5e0a35b1da fix:journal:P directives: require a space after the symbol [#2280]
This prevents surprising parses, like
`P 2024-10-31 a0 1` parsed as `P 2024-10-31 a 01`.
2024-11-02 15:24:25 -10:00
Simon Michael
d6080c5ff1 imp: check commodities: also check commodities used in P directives [#2280] 2024-11-02 15:03:57 -10:00
Simon Michael
c66e901d8b dev: save the parse positions of PriceDirectives 2024-11-02 15:00:47 -10:00
Simon Michael
4d38c63ec8 dev: move/rename nullsourcepos 2024-11-02 14:59:43 -10:00
Simon Michael
5d2259d942 dev: Hledger.Utils.IO: cleanup 2024-11-02 12:59:44 -10:00
Simon Michael
1dabccfb46 dev: Hledger.Utils.IO: more cleanup 2024-11-02 12:51:53 -10:00
Simon Michael
4351304f06 dev: Hledger.Utils.IO: cleanup 2024-11-02 12:04:19 -10:00
Simon Michael
9c81bb2a06 dev: Hledger.Utils.IO colour helpers: cleanup 2024-11-02 11:54:28 -10:00
Simon Michael
75ff6c8218 ;cabal: update cabal files 2024-11-02 08:42:10 -10:00
Simon Michael
657fc1551f !fix: respect --color=yes in a few places that didn't; drop text-ansi dep
Hledger.Utils.IO's ansi style/color helpers now respect --color=yes,
so that eg `hledger --color=yes | less -R` shows bold headings as
you'd expect.

Hledger.Utils.IO.rgb' now takes Float arguments instead of Word8.
2024-11-01 10:40:25 -10:00
Simon Michael
66953ae0be ;doc: pager: note that help -p TOPIC uses less 2024-11-01 08:15:09 -10:00
Simon Michael
234b4879c2 imp: less pager will use HLEDGER_LESS instead, if defined
When using `less` as pager, if HLEDGER_LESS is defined, it will
provide the options (instead of LESS + hledger's extra options).
You can set your own preferred options here, or you can set it
equal to LESS to use exactly those options.

[#2272]-related
2024-11-01 08:02:03 -10:00