Commit Graph

3268 Commits

Author SHA1 Message Date
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
Simon Michael
331b419c97 ;doc: cli: improve Directives summaries 2022-12-16 12:48:42 -10:00
Simon Michael
f6c865bbab ;doc: cli: introduction improvements 2022-12-14 12:23:44 -10:00
Simon Michael
43023d3d86 ;doc: some changes to hledger and input files description macros 2022-12-14 12:23:10 -10:00
Simon Michael
5a8e63d24d ;fix: bal: add missing --layout=tidy to help 2022-12-14 12:21:35 -10:00
Simon Michael
e819e02372 ;doc: bal: more balance doc cleanups 2022-12-14 09:03:55 -10:00
Simon Michael
36a20b7dfd ;doc: update manuals 2022-12-14 07:53:09 -10:00
Simon Michael
cf607adfcf ;doc: update CLI usage texts 2022-12-14 07:53:03 -10:00
Simon Michael
2ba91b1195 ;doc: bal: clean up/reorder balance command doc 2022-12-14 07:52:53 -10:00
Simon Michael
2902769616 ;doc: cli, bal: cleanups 2022-12-14 06:36:28 -10:00
Simon Michael
919c6c1a57 ;doc: cli: fix duplicate market prices heading breaking info navigation 2022-12-14 06:36:04 -10:00
Simon Michael
7d4cdb4333 ;doc: cli: why are we shouting ? we don't need to shout so much 2022-12-14 06:08:06 -10:00
Simon Michael
64d29a3e68 doc: cli: document --infer-market-prices with signed costs (#1870) 2022-12-13 21:09:00 -10:00
Simon Michael
ea85faf0f0 dev: tests demonstrating signed costs and market price inference (#1870) 2022-12-13 20:56:51 -10:00
Simon Michael
e9064ac4d2 ;doc: cli: move file formats up for better sequencing
CONCEPTS -> REPORTING CONCEPTS
COST -> COST REPORTING
2022-12-13 06:34:17 -10:00
Simon Michael
96bbe4b24e ;doc: cli: cost tweaks 2022-12-13 05:46:30 -10:00
Simon Michael
260cfe4637 ;doc: cli: more mention of posting order effect on inferring cost (#1959) 2022-12-13 05:37:44 -10:00
Simon Michael
824aa77d49 ;doc: cli: reassurance 2022-12-11 15:49:35 -10:00
Simon Michael
600e263a9a ;doc: cli, ui, web: consistent boilerplate 2022-12-11 15:44:09 -10:00
Simon Michael
abab1a23e3 ;doc: cli, ui, web: fix some links 2022-12-11 15:22:46 -10:00
Simon Michael
de26e6b855 ;doc: cli: fix commands quick linke 2022-12-11 13:31:59 -10:00
Simon Michael
56d7b5f808 ;doc: cli: cleanup 2022-12-11 13:23:56 -10:00
Simon Michael
87e372e38d ;doc: cli: update market price inference docs per sol 2022-12-11 09:52:17 -10:00
Simon Michael
c5b6b74a53 ;doc: cli: csv cleanups 2022-12-11 03:04:25 -10:00
Simon Michael
89d5f973f4 ;doc: cli: csv cleanups 2022-12-11 02:46:32 -10:00
Simon Michael
38f792677d ;doc: cli: move sections 2022-12-11 02:31:15 -10:00
Simon Michael
cb67c6b990 ;doc: cli: move budgeting, forecasting to CONCEPTS 2022-12-11 02:29:03 -10:00
Simon Michael
434d3b6ec4 ;doc: cli: flatten, clean up CSV sections 2022-12-11 02:15:03 -10:00
Simon Michael
985c15f039 ;doc: cli: clean up/rename directives sections 2022-12-11 01:59:26 -10:00
Simon Michael
fc5d1414f9 ;doc: cli: fix comment links, drop old doc 2022-12-11 01:24:10 -10:00
Simon Michael
a06b6219d5 ;doc: cli: fix link 2022-12-10 22:05:15 -10:00
Simon Michael
d2f154d966 ;doc: cli: other cost notation updates 2022-12-10 22:00:45 -10:00
Simon Michael
42659146af ;doc: cli: Beancount cost notation docs, improvements 2022-12-10 21:44:06 -10:00
Simon Michael
f0d2ec793c ;doc: cli: move stuff, split up journal comment docs 2022-12-10 20:20:22 -10:00
Simon Michael
52bb52712f ;doc: cli: new Ledger cost notation docs 2022-12-10 19:53:49 -10:00
Simon Michael
ace185f7d2 ;doc: update old manual links 2022-12-10 18:56:47 -10:00
Simon Michael
474ad22b94 ;doc: officially rename "transaction prices" to "costs" in docs
(though not in code)
2022-12-10 18:50:45 -10:00
Simon Michael
6310df590d ;doc: cli: fix typo 2022-12-10 15:42:58 -10:00
Simon Michael
20b17a9108 ;doc: cli: move a few more things around 2022-12-10 15:29:30 -10:00
Simon Michael
dabcee45f1 ;doc: cli: intro/input/output cleanup 2022-12-10 14:23:59 -10:00
Simon Michael
cd0eb0fe91 ;doc: cli: more standard man page start, more useful first info page
And NAME and SYNOPSIS are now included in the web manuals, that's ok.
2022-12-10 12:17:22 -10:00
Simon Michael
83e6cb615f ;doc: chunk hledger manual into parts, discuss formats before commands 2022-12-10 11:31:53 -10:00
Simon Michael
3698f8cf90 fix: balcmds: the table layout in HTML output with --layout=bare 2022-12-10 10:22:26 -10:00
Simon Michael
016b7759f4 ;doc: virtual postings: improve wording
per Robert Nielsen
2022-12-09 09:14:05 -10:00
Simon Michael
c4165c9a73 ;doc: cost: fix transaction prices link 2022-12-09 08:06:11 -10:00
Simon Michael
2eadd2497b ;doc: codes: improve example
suggested by Rob Nielsen
2022-12-09 07:57:10 -10:00
Simon Michael
7bfdc2d67f ;doc: cli: move PIVOTING up, update 2022-12-08 20:42:27 -10:00
Simon Michael
b50d60cfea ;doc: csv, timeclock, timedot: clarify comment lines (#1953) 2022-12-06 10:38:50 -10:00
Simon Michael
b81e358163 ;doc: comments, tags: move down, improve sequencing 2022-12-06 10:10:49 -10:00
Simon Michael
b14f68d4d8 ;doc: tags: mention querying 2022-12-06 09:28:13 -10:00
Simon Michael
020f1d446c ;doc: tags: more updates, fixes 2022-12-06 09:07:27 -10:00
Simon Michael
e72350ae75 ;doc: tags: discuss multi-values/overriding (#1950) 2022-12-06 08:15:06 -10:00
Simon Michael
99e8eb9a53 ;doc: tags: fix/clarify 2022-12-06 07:10:23 -10:00
Simon Michael
f3b0a1f513 ;doc: update manuals 2022-12-01 12:24:23 -08:00
Simon Michael
a5b4d80e24 ;doc: update CLI usage texts 2022-12-01 12:24:12 -08:00
Simon Michael
8da21f1195 ;cabal: update cabal files 2022-12-01 12:23:10 -08:00
Simon Michael
740ea50e4c ;pkg: bump version to 1.28.99 2022-12-01 12:23:10 -08:00
Simon Michael
cbbfb82474 doc: 1.28 changelog headings 2022-12-01 12:21:09 -08:00
Simon Michael
fa8f6ae302 lib: Debug: breakpoint doesn't support windows yet, drop for now 2022-12-01 12:20:29 -08:00
Simon Michael
dedb331845 imp: --version strings no longer show + for dirty repos as it's buggy 2022-12-01 12:20:23 -08:00
Simon Michael
a929f8ec8a dev: Cli: cleanup 2022-12-01 12:20:19 -08:00
Simon Michael
d76e47b586 ;doc: update changelogs 2022-11-30 17:13:09 -05:00
Felix Yan
66b51472f2 Allow megaparsec 9.3
Builds fine and all tests pass.
2022-11-30 05:12:04 -05:00
Simon Michael
5283c280bf ;cabal: update cabal files 2022-11-26 00:13:02 -05:00
Simon Michael
3a6955d3e2 dev: add stack9.4.yaml for building with latest nightly/ghc 9.4.3 2022-11-25 23:45:17 -05:00
Simon Michael
d5682aa644 imp: print: --match now respects -o and -O 2022-11-24 19:50:47 -05:00
root
1591939074 ;doc: queries: fix formatting 2022-11-09 09:10:50 -10:00
Simon Michael
b67cb97fff ;doc: print: mention "fuzzy" for discoverability 2022-11-09 09:06:38 -10:00
Simon Michael
7997007dcf imp: print: a failed --match now returns a non-zero exit code 2022-11-09 08:56:48 -10:00
Simon Michael
e8302b0964 ;doc: cli: note the tricks for boolean queries 2022-11-09 08:27:17 -10:00
Simon Michael
892eb06396 ;dev: ui: replace "curses interface" with TUI 2022-11-07 16:48:54 -10:00
Simon Michael
06bc09a36f dev: comments 2022-11-06 07:59:45 -10:00
Simon Michael
80eb461063 ;doc: update manuals 2022-11-03 16:07:55 -10:00
Simon Michael
14c31cc23d ;cabal: update cabal files 2022-11-03 16:07:55 -10:00
Simon Michael
c25c5cef44 fix: make no-argument --debug flag work with ui & web also 2022-11-03 08:13:58 -10:00
Simon Michael
0bb83b5620 doc: cli: new "Debug output" section 2022-11-03 08:13:13 -10:00
Simon Michael
55dadce479 doc: cli: rename DATA FILES to INPUT, move OUTPUT below it 2022-11-03 08:13:13 -10:00
Simon Michael
a996078253 doc: cli: expand --debug help 2022-11-03 08:13:13 -10:00
Simon Michael
25003d36e1 dev: bump minimum githash version to 0.1.6.2 2022-11-03 08:10:45 -10:00
Simon Michael
3d26fc30eb ;doc: update changelogs 2022-10-31 13:18:36 -10:00
Simon Michael
603fae70c0 dev: lib: clean up/simplify debug helpers 2022-10-31 11:26:11 -10:00
Simon Michael
d5fa141176 ;doc: update CLI usage texts 2022-10-08 13:18:29 -10:00
Simon Michael
ca5847fc08 imp: accounts: clarify flag help; prioritise flags in order of help 2022-10-08 13:18:29 -10:00
Simon Michael
4ecc57461a imp: accounts: -u, -d 2022-10-08 08:22:10 -10:00
Simon Michael
b16a02b2e6 imp: accounts: --unused 2022-10-08 08:16:07 -10:00
Simon Michael
8f06cefab4 bin: hledger-move, helps make subaccount/cost-preserving transfers 2022-10-07 14:28:04 -10:00
Simon Michael
de7d0a38a2 ;doc: csv: clarify newest-first 2022-10-06 23:16:44 -10:00
Simon Michael
01387548e7 feat: csv: intra-day-reversed compensates when days' txns are reversed
As in eg vanguard CSV.
2022-10-06 22:21:55 -10:00
Simon Michael
360ef833ae ;doc: update CLI usage texts 2022-10-05 08:42:09 -10:00
Simon Michael
3e42851958 feat: accounts: add --undeclared and --find flags 2022-10-05 08:41:37 -10:00
Simon Michael
c0c14e53f1 ;doc: csv: fix timezone example 2022-10-01 17:09:52 -10:00
Simon Michael
928cc6d615 ;doc: update manuals 2022-10-01 16:09:26 -10:00
Simon Michael
ae8d297396 ;doc: update CLI usage texts 2022-10-01 16:09:16 -10:00
Simon Michael
3b24d9465b imp: csv: new timezone rule; convert zoned date-times to local dates (#1936)
Previously, CSV date-times with a different time zone from yours
(with or without explicit timezones in the CSV) could give off-by-one
dates, because the CSV timezone was ignored.

Now,

1. you can use the `timezone` rule to indicate which other
   timezone a CSV is implicitly using

2. CSV date-times with a timezone - whether declared by rule or
   parsed with %Z - are localised to the system time zone
   (or another set with the TZ environment variable).
2022-10-01 14:50:35 -10:00
Simon Michael
7d1b1cadce fix: add: doc: update tutorial link 2022-09-27 13:40:40 -10:00
Simon Michael
130604a2e0 ;cabal: update cabal files; migrate to hpack 0.35/stack 2.9 2022-09-19 18:23:26 -10:00
Simon Michael
a3c2e2c1ba doc: changelogs 2022-09-18 10:02:25 -10:00
Simon Michael
a2be9a0bce ;doc: update changelogs 2022-09-18 08:28:03 -10:00
Simon Michael
65019f72b4 dev: cli: tests: fix fragile abbreviation 2022-09-14 17:27:55 -10:00
Simon Michael
d4a1718690 fix: balcmds: fix empty html columns fix (#1933) 2022-09-14 17:25:18 -10:00
Simon Michael
b9d2aa7b54 fix: balcmds: handle an empty totals column in html output (#1933) 2022-09-14 16:56:28 -10:00