Commit Graph

3268 Commits

Author SHA1 Message Date
Simon Michael
c026e74611 ;doc: auto postings: note _tag:generated trick 2023-05-02 15:52:53 -10:00
Simon Michael
a771c8fc19 imp: revert 2b5194238 imp: generate auto postings on forecast transactions by default (#2027)
I found at least one user for whom this would be a breaking change
(they generate forecast txns, and have auto posting rules, but don't
want the latter applied to the former). I guess it's better to keep
things as they were for now: if you need auto postings on your
forecast txns you must use two flags, --forecast --auto.
2023-04-30 08:08:26 -10:00
Simon Michael
4885b3ad32 ;doc: cli: improve Generating data; document --verbose-tags 2023-04-29 18:58:30 -10:00
Simon Michael
7f713f6a44 imp: Generated/modified txns/postings are now tagged only with --verbose-tags 2023-04-29 18:25:11 -10:00
Simon Michael
ca42b0aaca imp: cli: clean up some flags' help and sync docs 2023-04-29 18:11:53 -10:00
Simon Michael
2b5194238b imp: generate auto postings on forecast transactions by default 2023-04-29 16:00:14 -10:00
Simon Michael
9ebcd9ec28 fix: process postings in date order when inferring balance assignments (fix #2025) 2023-04-27 17:15:21 -10:00
Simon Michael
8b3b63b495 ;doc: journal: cheatsheet: fix typo (#1982) 2023-04-25 12:48:39 -10:00
Simon Michael
fe6df964b4 ;doc: bal: try to improve description of budget report differences 2023-04-25 12:39:28 -10:00
Simon Michael
f3be461045 ;doc: 1.29 relnotes: slight edit 2023-04-25 12:38:42 -10:00
Simon Michael
ade9afbcb3 ;doc: forecasting: edits 2023-04-21 14:38:35 -10:00
Simon Michael
bb64bb1961 ;doc: forecasting: edits 2023-04-21 11:18:05 -10:00
Simon Michael
14e6497cf1 ;doc: forecasting: edits 2023-04-21 11:05:27 -10:00
Simon Michael
65fd7e821e ;doc: forecasting: rewrite 2023-04-21 10:41:42 -10:00
Simon Michael
1be06c87c4 feat: bal: A new --count report type counts postings instead of amounts. 2023-04-20 14:36:41 -10:00
Simon Michael
40d10bc8c5 imp: cli: commands list: help for hledger-bar script 2023-04-20 12:58:30 -10:00
Simon Michael
ef79537943 ;doc: small fixes; remove mention of ancient setenv 2023-04-20 12:58:04 -10:00
Simon Michael
fdea2e0bcd ;doc: journal: rewrite Directives section, fix links 2023-04-14 20:20:18 -10:00
Simon Michael
bc64b79574 ;doc: csv: edits 2023-04-12 21:23:12 -10:00
Simon Michael
e491aa2ff4 ;doc: csv: edits 2023-04-12 17:49:58 -10:00
Simon Michael
dc8dba4e67 ;doc: csv: edits 2023-04-12 17:28:46 -10:00
Simon Michael
08c2e3deed ;doc: csv: tweak 2023-04-12 16:13:10 -10:00
Simon Michael
d7b9f4f631 ;doc: csv: clarify amount setting, sign flipping a bit 2023-04-12 16:06:12 -10:00
Simon Michael
996ccb0ea2 ;doc: changes: merge from 1.29.2 branch 2023-04-07 14:26:45 -10:00
Simon Michael
ae23a18f87 ;doc: update changelogs 2023-04-07 11:31:25 -10:00
Simon Michael
c2288f8143 ;doc: update command help 2023-04-07 09:52:31 -10:00
Simon Michael
2bdba319b1 ;doc: update manuals 2023-04-07 09:52:29 -10:00
Simon Michael
9c4b5a26fa imp: ui, web: use a pager to show command line help, like cli 2023-04-06 15:36:08 -10:00
Simon Michael
3e3c3c8355 imp: help: doc: warn about old info on mac (fix #1770) 2023-04-06 15:36:00 -10:00
Simon Michael
1c5dee2339 fix: doc: update manuals; regenerate all info manuals (fix #2023) 2023-04-06 14:13:39 -10:00
Simon Michael
2e58bea809 ;doc: cli: paging: cleanup 2023-04-06 12:24:31 -10:00
Simon Michael
f0157625cb ;doc: close: fix typo 2023-04-06 12:18:00 -10:00
Simon Michael
3387453578 ;doc: cli: add Paging section (#2015) 2023-04-06 11:47:03 -10:00
Simon Michael
1de8600067 imp: cli: try to ensure less (and its more mode) show ANSI (fix #2015)
If you use some other $PAGER, you will have to configure it to show
ANSI yourself (or disable ANSI, eg by setting NO_COLOR=1).
2023-04-06 11:13:00 -10:00
Simon Michael
eb5a8ecc4e doc: cli: improve 1.29 changelog for the close command (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
63ca3ac049 doc: cli: improve 1.29 changelog for periodic reports/transactions change 2023-04-06 11:12:35 -10:00
Simon Michael
78271d9204 doc: cli: mention SQLite primary key workaround (fix #2017) 2023-04-06 11:12:35 -10:00
Simon Michael
94e5aa3dfa ;doc: update command help 2023-04-06 11:12:35 -10:00
Simon Michael
ba0bb5eb4a imp: close: restore legacy flags --closing/--opening/--close-to/--open-from (#2020)
They're cruft, but hidden and low cost and remove one more user hassle.
2023-04-06 11:12:35 -10:00
Simon Michael
c151d57069 imp: close: restore equity command alias; improve help/doc (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
1d83e14392 imp: close: more cleanup; add --close; always default to ALE (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
7695e409bf imp: close: tweak doc more (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
3660118575 imp: close: reorder/clean options more (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
19ea31dd61 fix: close: restore --open-acct option (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
3acd0a33df imp: close: reorder flags, rewrite help/doc (#2020) 2023-04-06 11:12:35 -10:00
Simon Michael
53aeabebbc dev: print: fix a date-sensitive JSON test 2023-04-06 11:12:35 -10:00
Simon Michael
c2aae60cf0 fix: doc: rewrite/correct Date adjustment section 2023-04-06 11:12:35 -10:00
Simon Michael
3fb1a5840a ;doc: update manuals 2023-03-31 18:31:16 -10:00
Simon Michael
23bc23108d ;doc: journal: costs: mention sign 2023-03-31 18:20:11 -10:00
Simon Michael
e8cf09f477 imp: acc: reorder/clean up flags 2023-03-30 10:58:46 -10:00
Simon Michael
c03d6b1123 imp: print: --match makes better choices
Previously, similarity completely outweighed recency, so a
slightly-more-similar transaction would always be selected no matter
how old it was. Now similarity and recency are more balanced,
and it should produce the desired transaction more often.
There is also new debug output (at debug level 1) for
troubleshooting.
2023-03-27 15:21:42 -10:00
Simon Michael
6bf2afe80c ;doc: update manuals 2023-03-27 11:07:56 -10:00
Chris Lemaire
891853d2f2 queries: Update boolean queries to be case-insensitive
That is, the query operators AND, OR, and NOT are now case-insensitive.
Queries are otherwise left the same as they were.
2023-03-27 10:29:26 -10:00
Chris Lemaire
cddbae6467 queries: Prefix boolean queries with expr:
Boolean queries are now prefixed with an 'expr:' prefix, making them
completely separable from old queries and making the addition of them a
little more migration proof.

The tests are updated accordingly, changes made to the tests previously
are removed and extra cautious documentation is also removed.
2023-03-27 10:29:26 -10:00
Chris Lemaire
4f143d6bec queries: Update documentation on boolean queries
Also add a test to check that the assertion on how boolean queries
combine with space-separated queries works.
2023-03-27 10:29:26 -10:00
Chris Lemaire
35db1cae4f queries: Add generalised boolean queries
This commit changes some of the functions in the Query module and
changes the overall way to parse queries. Instead of using the words''
split function, this commit starts to fully parse the query, as it's
seen as a type of expression.

AND, OR, NOT, and space operators can be used. The space operator
simulates the behaviour from before, leaving a minimal amount of tests
that need to be adjusted to comply to the new behaviour.
2023-03-27 10:29:26 -10:00
Simon Michael
69a8834803 dev: demo: notes 2023-03-18 20:49:12 -10:00
Simon Michael
b9af9ab367 ;doc: update changelogs 2023-03-18 20:10:25 -10:00
Simon Michael
13531b5b86 ;doc: update manuals 2023-03-18 20:07:18 -10:00
Simon Michael
062559cbd5 imp: demo: nicer output, show clearer start/stop indicators, don't show "exit" 2023-03-18 20:06:24 -10:00
Simon Michael
33876905f1 dev: lib: Hledger.Cli.Script: cleanup 2023-03-18 20:02:22 -10:00
Simon Michael
be8e64e498 imp: lib: export more terminal size, ANSI style/color helpers
Hledger.Utils.IO (and therefore Hledger and Hledger.Cli.Script) added:

    getTerminalHeightWidth
    getTerminalHeight
    getTerminalWidth
    Color(..)
    ColorIntensity(..)
    bold'
    faint'
    black'
    red'
    green'
    yellow'
    blue'
    magenta'
    cyan'
    white'
    brightBlack'
    brightRed'
    brightGreen'
    brightYellow'
    brightBlue'
    brightMagenta'
    brightCyan'
    brightWhite'
    rgb'
2023-03-18 19:59:00 -10:00
Simon Michael
96b2cede0b ;dev: demo: balance, print: display "exit" at the end like the others 2023-03-18 01:53:29 -10:00
Simon Michael
207cad0dfb ;doc: update changelogs 2023-03-18 01:43:05 -10:00
Simon Michael
8ec59eafac imp: demo: Getting help 2023-03-18 01:33:34 -10:00
Simon Michael
0520ef03f6 ;imp: demo: titles cleanup 2023-03-18 01:32:40 -10:00
Simon Michael
7632321b3c ;imp: cli: commands list cleanups 2023-03-18 01:14:31 -10:00
Simon Michael
6588020e64 ;doc: update CLI help text files 2023-03-17 00:53:57 -10:00
Simon Michael
8b2efe3c33 ;imp: demo: help updates 2023-03-17 00:53:30 -10:00
Simon Michael
bbb58c3804 imp: demo: Watching the built-in demos (demo) 2023-03-17 00:09:24 -10:00
Simon Michael
b9273a4585 imp: cli: move OTHER last in commands list 2023-03-16 23:20:14 -10:00
Simon Michael
98865d6025 imp: demo: split print / balance demos 2023-03-16 23:20:14 -10:00
Simon Michael
6777182c70 imp: demo: output cleanups 2023-03-16 23:20:14 -10:00
Simon Michael
2d496609bc imp: demo: hide the file names 2023-03-16 23:20:14 -10:00
Simon Michael
0aab8cbd9a imp: demo: more consistent demo titles 2023-03-16 23:20:14 -10:00
Simon Michael
12853b1fda ;doc: update manuals 2023-03-16 21:58:39 -10:00
Simon Michael
7e422cb12a ;doc: update CLI help text files 2023-03-16 21:58:39 -10:00
Simon Michael
5a99ea6d63 ;cabal: update cabal files 2023-03-16 21:58:38 -10:00
Simon Michael
38fd51b97c feat: embed some asciinema demos, and a demo command to play them 2023-03-16 21:58:38 -10:00
Simon Michael
5655c533fa ;doc: merge release changelogs 2023-03-16 17:45:43 -10:00
Simon Michael
0f63a35ea3 ;doc: update changelogs 2023-03-16 15:45:16 -10:00
Simon Michael
3d968fb98e ;doc: update manuals 2023-03-16 15:44:35 -10:00
Simon Michael
fe3477797b ;doc: update changelogs 2023-03-16 14:56:25 -10:00
Simon Michael
70ef3e816c fix: stats: fix a regression in date display since 1.28 (#2012) 2023-03-16 14:52:37 -10:00
Simon Michael
cc41704c92 ;doc: update changelogs 2023-03-16 14:44:50 -10:00
Simon Michael
62bb93af9c imp: lib: Hledger.Cli.Script: more re-exports
added:
Control.Applicative
Control.Concurrent
Data.Char
Data.Functor
System.IO
System.IO.Error
2023-03-16 14:36:29 -10:00
Simon Michael
cb011c0c77 ;cabal: update cabal files (#2011) 2023-03-15 20:44:01 -10:00
Simon Michael
44805f96ef ;dev: ui, web: fixes for ghc 9.6; cleanup (#2011) 2023-03-15 20:43:51 -10:00
Simon Michael
d012384d57 ;dev: cli: also build with GHC 9.6.1 2023-03-14 10:49:58 -10:00
Yehoshua Pesach Wallach
7ddcf3b9e1 fix: doc: remove duplicate in hledger close docs 2023-03-13 09:23:18 -10:00
Simon Michael
9ceb74062d ;doc: update manuals 2023-03-11 13:28:02 -10:00
Simon Michael
f75110f49c ;cabal: update cabal files 2023-03-11 13:27:25 -10:00
Simon Michael
a0ca339c46 ;pkg: bump version to 1.29.99 2023-03-11 13:27:25 -10:00
Simon Michael
2e3872c3f1 ;doc: changelogs: 1.29 2023-03-11 13:26:30 -10:00
Simon Michael
56c38b1b29 fix: areg: handle an extra account query correctly (fix #2007) 2023-02-21 10:04:07 -10:00
Simon Michael
af38121442 imp: areg: when restricted by extra query args, show a hint in title
I was confused when using 'areg ACCT QUERY'. Now, the title will show
" (matching query)" as a hint when a QUERY is specified,
except when it is a date restriction (which is common and not confusing)
or a depth restriction (which is ignored).
2023-02-21 08:29:59 -10:00
Simon Michael
25b8d51ff2 activity: fix output after #1982; add tests 2023-02-21 07:17:21 -10:00
Simon Michael
c1b311011a ;doc: update manuals 2023-02-21 00:39:30 -10:00
Simon Michael
70539a70bd ;cli: consolidate commands overvinew; sync commands list 2023-02-21 00:35:14 -10:00
Simon Michael
2af744292a ;doc: update manuals 2023-02-21 00:17:02 -10:00
Simon Michael
4d66f48a47 ;doc: update CLI help text files 2023-02-21 00:16:46 -10:00
Simon Michael
5c7e107c5b ;doc: cli: list commands like the CLI's commands list 2023-02-21 00:15:22 -10:00
Simon Michael
2e6cf0e806 ;imp: cli: commands list: better hledger-fifo entries 2023-02-20 22:15:58 -10:00
Simon Michael
c74f72ff40 ;imp: cli: commands list: add an entry for hledger-fifo 2023-02-20 21:58:13 -10:00
Simon Michael
0db44f11bb ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Simon Michael
2eaab54426 imp: close: more useful defaults, retain/migrate/open modes 2023-02-20 16:24:54 -10:00
Simon Michael
173f61bee0 dev: Commands: cleanup, fix harmless bug in command finding 2023-02-20 16:24:54 -10:00
Simon Michael
0567935e4b cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Simon Michael
81f596b1fb cli: fix some Commands file permissions 2023-02-20 16:24:54 -10:00
Michael Grünewald
4b43e63a89 fix: cli: don't crash multicol with few strings
When there are only few, short strs and width is large, then the div
operation in itemspercol would return zero, triggering and error in
chunksOf.

This fix makes numcols have always at least as many entries as strs,
filling one line.
2023-02-19 11:52:46 -10:00
Simon Michael
fa70f160ae imp: partial/inferred dates are flexible, full dates are not (#1982)
DateSpans are now now aware of exact/flexible dates.
2023-02-17 07:24:19 -10:00
Simon Michael
032ffd112b imp: cli: report intervals can now start on arbitrary dates
Eg, where previously -p 'monthly from 1/15' or -M -b 1/15 would always
adjust the report start date to 1/1,
unless you used the special -p 'every 15th day of month from 1/15' form,
now the start date will not be adjusted. (It is still adjusted if
the report date is not specified explicitly, eg inferred from the journal).

This keeps behaviour consistent between report periods and periodic transactions.

'in' period expressions, like 'in 2023-01', are a grey area; they
do specify a start date (2023-01-01), although they look a bit implicit.
So previously, -p 'weekly in 2023-01' would adjust the start date to
the preceding monday (2022-12-26), but now it will start exactly on
2023-01-01 (a sunday, which also causes ugly verbose column headings).

To ensure monday based weeks and simple report headings here,
you would have to explicitly specific a start date that is a monday,
eg -p 'weekly from 2022-12-26 to 2023-02'.
2023-02-17 07:24:19 -10:00
Simon Michael
4260a350c8 ;doc: cli: period expressions doc updates 2023-02-17 07:24:19 -10:00
Simon Michael
5537a251f3 imp: journal: periodic txns need not start on an interval boundary
Eg, ~ monthly from 1/15 now works, instead of giving an error message.
2023-02-17 07:24:19 -10:00
Simon Michael
7a9b0fd94c feat: check: the tags check checks tag names 2023-02-16 11:56:22 -10:00
Simon Michael
614697acf7 feat: journal: tag directive declares tag names 2023-02-16 11:56:22 -10:00
Simon Michael
e9cd1df048 dev: tests: convert remaining format 1 tests to format 3 (or 2)
Mostly done with an unreleased version of shelltestrunner, plus a few manual fixups.
2023-02-16 11:55:15 -10:00
Simon Michael
b6d36e9c0b ;dev: number pivot tests 2023-02-16 06:42:11 -10:00
Simon Michael
8aca6ff84b ;doc: import: tweak 2023-02-16 04:37:45 -10:00
Simon Michael
e34a20f3db ;doc: import: note a pitfall with multifile import 2023-02-15 20:09:20 -10:00
Jonathan Dowland
0a052c7aef ;docs: indicate aregister supports html output
Signed-off-by: Jonathan Dowland <jon@dow.land>
2023-02-09 10:53:09 -10:00
Jonathan Dowland
15eadd58ce feat: aregister: implement HTML output formatter (#1996)
The HTML formatter outputs a HTML snippet containing a table with a
header row and one data row per report item. The header row names
match those for the CSV output formatter. Multiple commodities in
a report item are listed together in the same cell separated by
commas, again matching the CSV formatter.

A future extension could be to explore using multiple rows for
multiple commodities, with HTML row spanning.

Fixes #1996.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2023-02-09 10:53:09 -10:00
Simon Michael
9106c9013f ;doc: bal: budget: fix lists 2023-02-04 14:54:54 -10:00
Simon Michael
3fea3b0db7 ;doc: bal: budget: compare with forecasting; add some tips 2023-02-04 14:47:01 -10:00
Simon Michael
02307c5369 ;doc: journal: cheatsheet: clarify date tag 2023-02-04 11:30:26 -10:00
Simon Michael
b8e538a57f ;doc: bal: --budget: clarify use of print --forecast 2023-02-04 10:37:14 -10:00
Simon Michael
513b6b5164 ;doc: check: adjacentconversionpostings was dropped 2023-02-04 08:03:54 -10:00
Simon Michael
da5b4667df ;doc: rename directive sections, fix many links 2023-02-04 08:01:47 -10:00
Simon Michael
f4160d5397 ;doc: bump man page dates 2023-02-04 07:06:18 -10:00
Simon Michael
89b699e78e ;doc: cli: fix all links to Journal > Tags / Commands > tags 2023-02-04 07:05:58 -10:00
Simon Michael
4eeafdc4d3 dev: delete strange old remnant of the checkdates command, causing HLS trouble 2023-02-04 06:42:05 -10:00
Simon Michael
c51ebe7b8c imp: journal: remove the "adjacent conversion postings" check again
I find that single conversion postings are sometimes needed, eg with
paypal.
2023-02-01 13:30:21 -10:00
J. B. Rainsberger
c7eb9aa944 ;doc: Removed redundant paragraph in documentation. 2023-02-01 13:28:17 -10:00
Simon Michael
98949beec3 ;cabal: update cabal files 2023-01-29 16:29:35 -10:00
Simon Michael
3f3401f8ad imp: cli: Hledger.Cli.Script convenience import for scripts
Hledger.Cli.Script is a convenient prelude for use in scripts,
reducing import boilerplate. It currently re-exports:

Control.Monad
Data.Either
Data.List
Data.Maybe
Data.Ord
Data.Time
Text.Printf hiding (formatString)
Data.Text (Text, pack, unpack)
Safe hiding (at)
System.Directory
System.Environment
System.Exit
System.FilePath
System.Process
Hledger
Hledger.Cli
Hledger.Cli.Main (argsToCliOpts)

but not (much of) Data.Text or Data.Text.IO, as those
need to be imported qualified.
2023-01-29 16:29:18 -10:00
Simon Michael
66859fedb8 ;doc: account types edit 2023-01-28 23:02:33 -10:00
Simon Michael
53efb49c77 fix: cli: use black or white for banner & version, maximising legibility 2023-01-27 17:01:06 -10:00
Simon Michael
eed8a06906 fix: cli: don't highlight help when TERM=dumb 2023-01-27 06:06:17 -10:00
Simon Michael
7a636dd428 imp: cli: non-bold version string 2023-01-26 23:17:58 -10:00
Simon Michael
45808c8e13 imp: cli: add terminalLightness; tweak IsLight threshold; embolden banner 2023-01-26 22:11:20 -10:00
Simon Michael
9c7144e939 imp: cli: pick help accent color to contrast with terminal bg when possible 2023-01-26 22:11:20 -10:00
Simon Michael
72cd441a9f imp: cli: add a little highlighting to help output 2023-01-25 19:16:09 -10:00
Simon Michael
0de3acabcb cabal: update cabal files 2023-01-25 19:16:08 -10:00
Simon Michael
4387e6ffb5 pkg: stack: bump to latest snapshots, depend on text-ansi, add extra deps 2023-01-25 19:15:45 -10:00
Simon Michael
de330bdfce imp: journal: check for adjacent conversion postings only in strict mode
This avoids breaking existing journals if, say, they happen to have
a single "equity:trading" posting somewhere.
2023-01-25 19:00:29 -10:00
Simon Michael
6d849e06f5 ;doc: journal: redundant costs 2023-01-25 19:00:29 -10:00
Simon Michael
76f8eaf91a imp: journal: ignore redundant costs; --infer-costs more robustly
You can now write both @/@@ costs and corresponding equity conversion postings
in a transaction at any time, not just when using --infer-costs or --infer-equity.
hledger will recognise the redundancy and ignore it.

One thing has become more strict: hledger now requires conversion postings
to occur in adjacent pairs; an odd number of them is not allowed.
(Conversion postings are postings to accounts of type `V`/`Conversion`,
or named `equity:conversion`, `equity:trade`, `equity:trading`,
or subaccounts of these.)

And, --infer-costs now works in transactions with an implicit amount
(inferring costs from equity now happens after transaction balancing,
not before).
2023-01-25 19:00:29 -10:00
Simon Michael
dd1ded3646 ;cabal: update cabal files 2023-01-25 17:25:34 -10:00
Simon Michael
d77d76e17f imp: cli: use $PAGER when help output is taller than terminal
This works with hledger, hledger -h and hledger CMD -h.
2023-01-25 17:20:27 -10:00
Simon Michael
093fdda7db ;imp: cli: commands list tweaks 2023-01-25 15:20:15 -10:00
Simon Michael
b140529465 ;doc: update manuals 2023-01-25 11:59:12 -10:00
Simon Michael
1b3b26895e ;doc: update CLI usage texts 2023-01-25 11:59:05 -10:00
Simon Michael
311f0c99eb ;doc: areg: more advice on account-matching 2023-01-25 11:19:03 -10:00
Simon Michael
fbbae55101 imp: cli: merge register-match with register command
register-match is now the --match mode of the register command.
It was used by ledger-autosync at one point, hopefully the new flag
works similarly.
2023-01-25 10:44:12 -10:00
Simon Michael
1899b43073 imp: cli: drop the print-unique command
It disorders same-day transactions, doesn't support print's options,
and isn't useful enough to be always shown in the builtin commands
list. I don't know of any users, or a use for it, and it could easily
be recreated as an addon script, so I'm inclined to not bother
supporting it as a hidden command.
2023-01-25 10:44:12 -10:00
Simon Michael
cce63e6816 imp: cli: reorganise commands list; add a banner; multicolumn addons 2023-01-25 10:44:12 -10:00
Chris Lemaire
43c9f018dc journal: Account directives reject account names with brackets
Previously, the accounts passed to account directives would be stripped
of their surrounding brackets, but the required behaviour is to have
account directives plain reject bracketed accounts. This change ensures
that accounts in account directives may not start with a bracket
character.
2023-01-24 13:40:01 -10:00
Simon Michael
9497472e64
Merge branch 'master' into 1984-source-name-and-position-for-forecast 2023-01-23 16:04:00 -10:00
Simon Michael
6d5f37d438 ;doc: journal: rewrite Account names, mention brackets/parentheses (#1915) 2023-01-23 15:52:40 -10:00
Chris Lemaire
4ada2a3fbc journal: Fully unbracket AccountNames in account directives
Currently an account name like "a:(aa)" will not have (aa) unbracketed.
However, this seems reasonable since the full name is unbracketed and
thus will not be confused with virtual or virtual-balanced posting.
2023-01-23 12:43:13 -10:00
Chris Lemaire
b987c42e63 Add test checking forecast source links to periodic transaction 2023-01-22 09:18:32 +01:00
Simon Michael
51ea536ecc ;doc: csv: link, rules factoring tips 2023-01-21 09:49:47 -10:00
Simon Michael
3f558596ec ;doc: csv: improve Setting amounts 2023-01-20 09:24:31 -10:00
Simon Michael
ac7b59bcfa ;doc: csv: improve Amount field / Setting amounts 2023-01-20 09:06:17 -10:00
Simon Michael
abaa04f2f9 doc: cli: note --infer-costs limitation, no missing amounts for now
In journalFinalise currently things are done in this order:

...
1. infer costs from equity conversion postings if requested
2. balance transactions, possibly inferring a missing amount, and/or balancing costs if permitted
3. infer equity conversion postings from costs if requested
...

You would think that 1 could happen after 2, allowing missing amounts
to be inferred before attempting to infer costs from equity postings,
but somehow the current expected behaviour of tolerating excess costs
generated with --infer-costs depends on the current ordering.
Just document it for now.
2023-01-19 21:11:12 -10:00
Simon Michael
2687b7d7b6 dev: transaction-prices.test -> costs.test, cleanup 2023-01-19 20:56:41 -10:00
Simon Michael
440f808b3d ;doc: csv: coinbase example: avoid showing different local date 2023-01-19 08:49:58 -10:00
Simon Michael
363fc57207 ;doc: csv: align, tweak 2023-01-19 08:12:33 -10:00
Simon Michael
9c20d7955b ;doc: csv: add new coinbase example 2023-01-19 07:47:00 -10:00
Simon Michael
c403bb56a1 ;doc: csv: try to clarify how CSV/hledger fields work: tweak 2023-01-19 07:19:34 -10:00
Simon Michael
eb79385388 ;doc: csv: try to clarify how CSV/hledger fields work: tweak 2023-01-19 07:17:24 -10:00
Simon Michael
3c22259047 ;doc: csv: try to clarify how CSV/hledger fields work: tweak 2023-01-19 07:09:29 -10:00
Simon Michael
b97b48926c ;doc: csv: try to clarify how CSV/hledger fields work: add examples 2023-01-19 07:03:31 -10:00
Simon Michael
00444862f1 ;doc: csv: try to clarify how CSV fields and hledger fields work 2023-01-19 06:50:58 -10:00
Simon Michael
b4501a270d ;doc: csv: try to clarify how CSV fields and hledger fields work 2023-01-19 05:59:16 -10:00
Simon Michael
1c9a44cae9 ;doc: csv: try to clarify how CSV fields and hledger fields work 2023-01-19 05:55:29 -10:00
Simon Michael
bcf6a01c13 ;doc: csv: try to clarify how CSV fields and hledger fields work 2023-01-19 05:48:47 -10:00
Simon Michael
b42322b166 ;doc: cli: cleanups 2023-01-12 17:54:17 -10:00
Simon Michael
dfebf3174c imp: csv: check assigned account names are valid (parseable) (#1978) 2023-01-11 21:42:47 -10:00
Simon Michael
c95c4ca8d6 ;dev: csvtest.sh: note need for 1+ lines above RULES 2023-01-11 21:38:04 -10:00
Simon Michael
8c496b7f06 ;dev: test: number report-interval tests 2023-01-11 20:51:50 -10:00
Simon Michael
8f9c35200f ;doc: csv: more cleanup 2023-01-11 14:43:27 -10:00
Simon Michael
59e31e5a42 ;doc: csv: more cleanup, CSV rules tips -> Working with CSV 2023-01-11 14:24:53 -10:00
Simon Michael
c7c2229913 ;doc: csv: sync TOC and cheatsheet links 2023-01-11 14:02:54 -10:00
Simon Michael
214cb35e02 ;doc: csv: more cleanup, reorder 2023-01-11 13:53:47 -10:00
Simon Michael
545fd2d083 ;doc: csv: fix wrong if tables doc; rewrite several sections (#1977) 2023-01-11 13:25:17 -10:00
Simon Michael
fc8fe8ee46 ;doc: update manuals 2023-01-10 23:34:47 -10:00
Simon Michael
dbb1441402 ;doc: update CLI usage texts 2023-01-10 23:34:14 -10:00
Simon Michael
a7bb6dc5b5 fix: stats: remove wrong mention of output format in help 2023-01-10 23:30:15 -10:00
Simon Michael
e891eecb8b dev: add TypeOperators pragma to satisfy ghc 9.4 2023-01-10 19:33:31 -10:00
Simon Michael
1ea2c41bf7 imp: lib: registerWidthsFromOpts: fix ugly parse error message 2023-01-10 17:07:54 -10:00
Simon Michael
5c289ac92e lib: drop unused widthFromOpts 2023-01-10 17:07:19 -10:00
Simon Michael
069b57561f ;doc: tags: clarify additive, not overriding (#1950) 2023-01-04 22:59:23 -10:00
Simon Michael
550c248088 ;doc: csv: note -in and -out are used together for one posting (#1970) 2023-01-04 22:42:45 -10:00
Simon Michael
ce208dd3d4 ;doc: mention pivoting on a tag with multiple values (#1950) 2023-01-04 21:59:21 -10:00
Simon Michael
af9f8c0416 ;doc: add: payees/descriptions completion 2023-01-04 19:58:05 -10:00
Simon Michael
e6a96dba59 dev: fix broken yearless tests 2023-01-04 19:55:58 -10:00
Simon Michael
b5ed655b49 imp: add: Description completions now include payees declared or used
Ie as well as full descriptions, it now also offers payee names which
have been declared with a payee directive, or recorded in transactions
with the | syntax.
2023-01-04 19:46:06 -10:00
Simon Michael
2983b4971f ;doc: csv: clarify amount-in/amount-out docs (#1970) 2023-01-04 08:01:54 -10:00
Simon Michael
bfe12c33de ;doc: cli: balance: fix link to Budgeting page 2022-12-30 10:05:50 -10:00
Robert Nielsen
4d8337513b ;doc: Update hledger.m4.md
Updated section on pivoting. Used synonyms for "member" in cases where there could be confusion with the tag named "member."
2022-12-28 12:00:52 -10:00
Simon Michael
177b6057ba ;dev: ledger compat test tweaks 2022-12-27 13:15:46 -10:00
Simon Michael
b945147246 ;doc: journal: directives tweak 2022-12-27 13:13:10 -10:00
Simon Michael
19821ee0e9 ;doc: csv: clarify skip/valid csv semantics (#1967) 2022-12-27 13:08:58 -10:00
Simon Michael
7df44fc199 ;fix: doc: clarify valid CSV requirements and issues (fix #1966) 2022-12-27 12:57:19 -10:00
Simon Michael
a9b63bb694 fix: csv: skip header lines before attempting to parse records (#1967) 2022-12-27 12:21:20 -10:00
Simon Michael
71bd102b4b fix: journal: don't generate bad assertion when assigning with cost (fix #1965) 2022-12-26 10:21:44 -10:00
Simon Michael
0f2fe39e43 cabal: update cabal files 2022-12-22 20:32:03 -10:00
Simon Michael
d0eaa8cf5a dev: force megaparsec 9.3 in stack build plans where supported
For the useful dbg tool.
2022-12-22 20:31:47 -10:00
Simon Michael
4b36d852b4 imp: journal: ignore ((valuation expressions)) after amounts (ledger compat) 2022-12-22 20:06:28 -10:00
Simon Michael
3b91a8475a cabal: update cabal files 2022-12-22 19:26:16 -10:00
Simon Michael
e9e8f350f2 dev: require megaparsec 9.3+ in dev build, for its useful dbg tool
The 9.3 version works with our parsers.
2022-12-22 19:25:57 -10:00
Simon Michael
1ea2bcc83f imp: journal: also parse (lot notes) in amounts (ledger compat)
and rename lotpricep -> lotcostp
and instrument some amount parsers for debugging with megaparsec's dbg
2022-12-22 19:07:40 -10:00
Simon Michael
b1e08ffe46 imp: journal: python directive also consumes empty lines (ledger compat) 2022-12-22 02:30:29 -10:00
Simon Michael
23d25c8403 dev: ledger-compat tests: cleanups 2022-12-22 02:13:08 -10:00
Simon Michael
e2ddf1e685 imp: add "since" as a synonym of "from" in period expressions (ledger compat) 2022-12-22 02:12:25 -10:00
Simon Michael
85e9fbcf7d imp: journal: allow an empty double-quoted commodity symbol
"" is equivalent to writing no symbol.
But it's now possible to declare market prices for the no-symbol
commodity, which occurs eg with timedot data.

P 2022-01-01 "" $100
2022-12-22 01:53:06 -10:00
Simon Michael
a070875fe6 imp: journal: ignore end apply year, end apply tag, drop "pop" (ledger compat) 2022-12-22 01:50:27 -10:00
Simon Michael
a5d6b42322 imp: journal: ignore end apply fixed, end apply tag directives (ledger compat) 2022-12-22 01:12:56 -10:00
Simon Michael
af5645ebb7 imp: journal: ignore python, eval directives (ledger compat) 2022-12-22 00:50:43 -10:00
Simon Michael
2e77586d1b imp: journal: ignore value directives (ledger compat) 2022-12-22 00:38:51 -10:00
Simon Michael
fb7134c9a0 imp: journal: ignore tag subdirectives (ledger compat) 2022-12-22 00:34:33 -10:00
Simon Michael
c58b9e6ac9 imp: journal: accept apply year as another synonym for Y (ledger compat) 2022-12-22 00:27:35 -10:00
Simon Michael
2357a7a750 dev: journal: ignore CLI flags in journal 2022-12-21 23:40:43 -10:00
Simon Michael
aa5323e6ed dev: journal: update ledger-unsupported, directives tests 2022-12-21 23:20:02 -10:00
Simon Michael
abd104ccee imp: journal: ignore more ledger directives (ledger compat)
apply fixed, apply tag, assert, bucket, A, capture, check, define, expr

And reorder the directivep parsers.
2022-12-21 23:04:58 -10:00
Simon Michael
95d7679f6d imp: journal: accept year as a synonym for Y (ledger compat) 2022-12-21 22:27:08 -10:00
Simon Michael
826a7cfb2a imp: journal: ignore payee subdirectives 2022-12-21 22:09:15 -10:00
Simon Michael
bf6a2a7ccf imp: journal: ignore commodity subdirectives other than format 2022-12-21 22:08:54 -10:00
Simon Michael
a454b47ad9 ;dev: journal: better account subdirectives test 2022-12-21 22:01:40 -10:00
Simon Michael
befded96d2 ;dev: journal: test all h/ledger syntax by status: main, other, unsupported 2022-12-21 17:12:33 -10:00
Simon Michael
9149a9b0f3 ;doc: cli: cheatsheet: tweaks 2022-12-21 14:35:35 -10:00
Simon Michael
d3b99e9c95 ;doc: cli: cheatsheet: directives cleanup 2022-12-21 09:05:56 -10:00
Simon Michael
1003cdb142 ;doc: cli: cheatsheet: directives cleanup 2022-12-21 08:56:12 -10:00
Simon Michael
d97259b275 ;doc: cli: split journal syntax into "main" and "other"
This comes from a review of journal syntax, in preparation for
supporting more Ledger syntax.

To reduce overload for learners, I have trimmed the "main" feature
list, and de-emphasised a number of my not-so-favourite features by
moving them under "Other syntax", with downsides noted for good
measure. Secondary dates, balance assignments, and auto postings
are some of the de-emphasised features.
2022-12-21 08:11:08 -10:00
Simon Michael
704d52cfeb ;doc: cli: add a cheatsheet showing all the main journal syntax
This comes from a review of journal syntax, in preparation for
supporting more Ledger syntax. I think these are the most important
syntax features to teach. See next commit for a corresponding cleanup
of the docs.
2022-12-21 08:11:03 -10:00
Simon Michael
a65e601bcd ;dev: ledger compat tests: README 2022-12-18 12:25:52 -10:00
Simon Michael
c3e17db23e ;dev: ledger compat tests: improve org outline navigability
fixup:
2022-12-18 12:25:47 -10:00
Simon Michael
15646ab999 ;dev: convert ledger compat tests to individual shell tests
Also comment ledger's tests more robustly,
and log as an org outline.
2022-12-18 11:50:15 -10:00
Simon Michael
7195cebbb0 ;dev: cli: ledger-compat: ignore tests expecting failure 2022-12-18 08:32:27 -10:00
Simon Michael
b20c3e1036 ;doc: cli: add a BC anchor for #transaction-prices 2022-12-18 07:54:08 -10:00
Simon Michael
ccb553197f ;dev: cli: ledger tests: replace runner with shelltest 2022-12-18 01:33:38 -10:00
Simon Michael
688c56aa90 ;dev: cli: ledger tests: runner improvements 2022-12-18 01:33:10 -10:00
Simon Michael
470e906e97 ;dev: cli: ledger tests: summary, failures 2022-12-18 01:33:10 -10:00
Simon Michael
1b56687708 ;dev: cli: ledger tests: move test runner up, start collected tests 2022-12-18 01:33:10 -10:00
Simon Michael
370948a357 ;dev: cli: ledger tests: add a test runner 2022-12-18 01:33:10 -10:00
Simon Michael
5cc0080776 ;dev: cli: ledger tests: snapshot of ledger regress tests' data 2022-12-18 01:33:10 -10:00
Simon Michael
caffb22320 ;dev: cli: a snapshot of ledger's baseline functional tests' data
;dev: cli: ledger tests: comment out all but the sample data
2022-12-18 01:33:04 -10:00
Simon Michael
faa5f00f1a ;doc: cli: more guidance on comments 2022-12-17 07:53:58 -10:00
Simon Michael
40df381cb2 ;doc: cli: better directives quick link 2022-12-17 07:23:38 -10:00