Commit Graph

3472 Commits

Author SHA1 Message Date
Simon Michael
fbd2fdef40 ;cabal: update cabal files 2023-12-14 08:58:02 -10:00
Simon Michael
a3290bfaeb pkg: allow megaparsec 9.6* 2023-12-14 08:57:42 -10:00
Simon Michael
aaf4a38161 fix:timedot: accept numbers beginning with a decimal point again [#2130] 2023-12-08 15:08:35 -10:00
Simon Michael
51224f6e27 fix: bal --budget --layout=tall was hiding commodity symbols
When reports want to render amounts without commmodity symbols,
they must now use AmountDisplayOpts' new displayCommodity flag.
(Previously it was a side effect of setting displayCommodityOrder.)
2023-12-08 05:52:29 -10:00
Simon Michael
0bc86c95e4 lib: Hledger.Data.Amount: noPrice -> noCost 2023-12-07 23:35:50 -10:00
Simon Michael
862b7e5712 dev: clarify AmountDisplayOpts, add a new flag for symbol display 2023-12-07 23:35:50 -10:00
Simon Michael
9bad34c341 ;doc: changelogs 2023-12-07 11:36:39 -10:00
Simon Michael
7ace5ee560 ;doc: changelogs for 1.32.1 2023-12-07 11:32:20 -10:00
Simon Michael
c062b14c5d imp: auto-declare builtin tag names like type: and t: (#2119)
Now using type: in account declarations or generating t: with timedot
letters won't cause the `tags` check to fail.

If a user declares any of these explicitly with a tag directive,
it does not cause an error.
2023-12-07 08:55:05 -10:00
Simon Michael
6ae64c8f3e imp: allow declaring the empty payee name with "" (#2119) 2023-12-07 08:30:55 -10:00
Simon Michael
6a41ed9e64 imp: drop the "a difference of ..." line from balance assertion errors
Rationale:
To satisfy the recentassertions check I'm often filling in a bunch of
placeholder balance assertions, copy/pasting the correct amount from
the balance assertion failure messages. In this situation the
difference just repeats the amount in the line above, with opposite
sign, which makes it harder for me to interpret the message and to
copy-paste the right amount. And more generally I think showing the
difference isn't really necessary.
2023-12-07 07:58:52 -10:00
Simon Michael
c6a580ff3b fix:import: save each file's latest dates, separately (#2125) 2023-12-07 03:41:31 -10:00
Simon Michael
d1635a55f8 lib: move readFileStrictly to Hledger.Utils.IO 2023-12-07 03:41:31 -10:00
Simon Michael
7899b992b7 fix: prevent a Glob/filemanip package conflict in IO.hs 2023-12-05 17:43:04 -10:00
Simon Michael
ab313c49c7 ;cabal: update cabal files 2023-12-02 09:09:07 -10:00
Simon Michael
80d1da2db9 ;pkg: bump version to 1.32.99 2023-12-02 09:09:07 -10:00
Simon Michael
26f56e0a13 ;doc: changelogs: merge edits from release branch 2023-12-02 09:06:53 -10:00
Simon Michael
e90483a75a ;doc: update manuals 2023-12-01 17:25:00 -10:00
Simon Michael
71222d75e5 ;doc: changelogs: edit 2023-12-01 17:23:31 -10:00
Simon Michael
0b4b4ed70c ;doc: draft changelogs from commit messages (Shake changelogs) 2023-12-01 17:23:31 -10:00
Simon Michael
b6a46f637f feat:timedot: tagged time logging with letters 2023-11-25 21:28:23 -10:00
Simon Michael
96f9c1d2b2 ;dev: lotcostp: cleanup 2023-11-23 09:14:54 -10:00
Simon Michael
b4a6212453 imp:ledger-compat: accept lot costs with spaces after {, like Ledger 2023-11-23 08:31:57 -10:00
Simon Michael
4b13af0634 imp:print:beancount: conversion improvements
- omit balance assertions
- replace more currency symbols, and match within symbols like C$
- do more account validation, and error if conversion is too hard
- backslash-escape double quotes and backslashes in payee and note
2023-11-23 01:47:15 -10:00
Simon Michael
0b8e920810 imp:print:beancount: also convert cost amounts 2023-11-22 23:54:10 -10:00
Simon Michael
0bf0c30b8d doc: update manuals 2023-11-22 22:57:55 -10:00
Simon Michael
a8062381dd ;cabal: update cabal files 2023-11-22 22:57:36 -10:00
Simon Michael
e2cc2d7e24 feat:print: add a basic beancount output format
This prints journal output more likely (but not guaranteed) to
be readable by Beancount.

All packages now require text 1.2.4.1 or greater.
2023-11-22 22:57:36 -10:00
Simon Michael
1744021986 fix: non-print-like reports no longer add trailing decimal marks (fix #2115)
That 1.31 change was advertised as being for the print command only,
but it affected all commands. Now it affects only print and other
"print-like" commands (ie all commands that show whole journal entries
that we might want to re-parse).

Also three classes of hledger output, and how they modify the
commodity display styles' digit group marks and decimal marks
to suit different consumers, have been identified and documented
(under REPORTING CONCEPTS).
2023-11-22 14:22:51 -10:00
Simon Michael
2b18715885 fix:csv: fix tag: queries on CSV data (#2114) 2023-11-20 21:55:11 -10:00
Simon Michael
d717732928 ;doc: Hledger.Read: cleanups (#2113) 2023-11-16 23:37:20 -10:00
Simon Michael
037613abab ;doc: Hledger.Read: cleanups (#2113) 2023-11-16 23:28:14 -10:00
Simon Michael
e92ab28cce imp:reading: better timing of strict checks and .latest writing (#2113)
Strict checks now run only once, at end of the high level read operation,
and not for each individual file; this fixes some spurious --strict failures,
like account declarations not affecting a sibling file as they should.

And .latest file writing now happens as the last step, after passing
strict checks. This is mainly for the import command, but it also
means that hledger print --new now does not update .latest files
if strict checks are failing.

The file reading API has been improved and documented in more detail.
2023-11-16 21:48:43 -10:00
Simon Michael
5ee2139f18 imp: web: round amounts to display precision as before (precisiongeddon) 2023-11-14 13:26:06 -08:00
Simon Michael
f4de65ab48 doc:code: add Jargon section; describe styling/precision in detail (precisiongeddon) 2023-11-08 13:59:18 -08:00
Simon Michael
f2320bf57c ;doc: move Hledger.hs haddock to a named chunk below code 2023-11-08 13:59:18 -08:00
Simon Michael
1ae59ad0af dev: Amount: cleanups 2023-11-08 13:59:18 -08:00
Simon Michael
e035730afb imp: roi: limit large decimals to 8 digits by default (precisiongeddon)
With valuation now preserving more decimal digits, roi could show
excessively precise decimals if there was no known display precision
for the valuation commodity. Now in that situation it limits the
precision to a maximum of 8 digits.
2023-11-08 13:59:18 -08:00
Simon Michael
f8ffd9cdda imp: more precision handling fixes, debug output, test updates (precisiongeddon)
This and the preceding commits were "work in progress" that got out of control.
There's more to do, but this one brings these precision-related improvements
(at least):

When "infinite decimals" arise, they are now generally shown with
8 decimal digits rather than 255.

print and prices no longer add trailing decimal zeros unnecessarily.

Some code has been refactored or given more debug output.

All tests have been updated to match the recent changes.
2023-11-08 13:59:18 -08:00
Simon Michael
c51d883162 imp: prices: clarify, fixes, improve semantics (precisiongeddon)
- The prices comand now more accurately lists the prices that hledger
  uses when calculating value reports (similar to what you'd see with
  eg `hledger bal -V --debug=2`).

- The prices command's --infer-reverse-prices flag was confusing since
  we always infer and use reverse prices; it has been renamed to --show-reverse.

- --infer-market-prices and --show-reverse combine properly.

- --show-reverse now ignores all zero prices rather than giving an error.

- Reverse prices (which can be infinite decimals) are now displayed
  with at most 8 decimal digits (rather than the internal precision of
  255 digits).

- Filtering prices by cur: or amt: now works properly.

- Price amounts are styled, but all decimal digits are shown.
2023-11-08 13:59:18 -08:00
Simon Michael
50dc7bebb1 imp: set display style, natural precision on valued amounts (fix #2105, precisiongeddon)
Cost/value conversion now applies the standard display style, and
sets the display precision equal to the internal decimal precision
(or 8 if the decimal appears to be infinite).
This means value reports and especially `print -V` now show amounts
with more accurate and standard style and precision.

New tests have been added describing and explaining various
style/precision behaviours in print cost/value reports.
2023-11-08 13:59:18 -08:00
Simon Michael
64ffdd7c9c dev: clarify some amount operations 2023-11-08 13:59:18 -08:00
Simon Michael
d435557979 lib: Hledger.Utils.Debug: lbl_ helper, cleanups, notes 2023-11-08 13:50:33 -08:00
Jonathan Dowland
8bfa382c68 feat: import: interpolate regex matches in field templates (#2009)
Replace occurrences of '\N' (where N is a positive number) in field
templates with the corresponding regular expression match group, if it
exists.

E.g. Warp the date to the first of the month for the second posting

    if %date (....-..)-..
        comment2 date:\1-01

E.g. Strip a prefix from an imported account name

    if %account1 liabilities:jon:(.*)
        account1 \1

Fixes #2009.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2023-11-08 13:49:39 -08:00
Jonathan Dowland
549c47bca8 ;dev: add Utils.Regex.regexMatchTextGroups
A matcher function which returns the list of match-groups, which may
be empty.

Signed-off-by: Jonathan Dowland <jon@dow.land>
2023-11-08 13:49:39 -08:00
Jonathan Dowland
c619e387ea ;fix: import: minor typo 2023-11-08 13:49:39 -08:00
Simon Michael
54b4c2ed22 fix: auto postings: detect redundant costs properly (fix #2110) 2023-11-07 04:38:39 -08:00
Peter Sagerson
efcea0600a feat: cli: Add tsv output (#869)
All commands that suport csv output now also support tsv output. The
data is identical, but the fields are separated by tab characters and
there is no quoting or escaping. Tab, carriage return, and newline
characters in data are converted to spaces (this should rarely if ever
happen in practice).
2023-11-06 16:46:04 -08:00
Simon Michael
63d41b30db ;doc: haddock, comment fixes 2023-10-21 17:58:43 +01:00
Simon Michael
661260f756 ;doc:print: cleanups (#2085) 2023-10-18 14:02:59 +01:00
Simon Michael
5a72b9e9ea feat:print: add --round option for more control of precisions (#2085) 2023-10-18 13:56:24 +01:00
Simon Michael
c7bcdfcdcf ;doc:internals: Precision and rounding 2023-10-18 13:56:24 +01:00
Simon Michael
4e56199c57 dev: refactor transactionCheckBalanced 2023-10-18 13:56:24 +01:00
Simon Michael
c13c13ab1f lib!: use styleAmounts in more places; add rounding strategies 2023-10-18 13:56:24 +01:00
Simon Michael
94ab8b1ed7 dev: journalApplyCommodityStyles -> journalStyleAmounts 2023-10-18 13:56:24 +01:00
Simon Michael
f8027abb44 dev:print: refactor, add AmountStyle "rounding strategy"
Changes to enable more control of "rounding" behaviour
(ie, choosing display precisions for amounts).

This reverts 1.31's change of asprecision, making it a non-Maybe
again, and adds a new asrounding field providing more control over how
a target display precision is applied to existing amounts (two options
for now, more later). Functionality is in an interim state (reports do
no rounding).
2023-10-18 13:56:24 +01:00
Simon Michael
9ead8a64e1 fix:timedot: parse unitful quantities more accurately (fix #2096)
A quantity with a unit like "15m" was being parsed internally as
0.249999999... rather than 0.25 (and since hledger 1.21, printed that
way also). Now we round such quantities to two places during parsing,
to get exact quarter-hour amounts.
2023-10-17 12:05:10 +01:00
Simon Michael
ffc535ad64 lib: add Show to Table render functions for debugging 2023-10-17 11:46:00 +01:00
Simon Michael
e8da1f9f25 fix: balance-assigned amounts affect styles again (fix #2091) 2023-10-14 08:38:20 +01:00
S. Zeid
91d6f8c841 imp: lib: include adeclarationinfo, if present, in accounts JSON
Note that this does not add the declaration info if it is not already
present.
2023-10-13 09:33:36 +01:00
Stephen Morgan
20132e892b feat: balance: Add summary-only flag (#1012)
Add a flag --summary-only for multi-column balance reports, which does
not display the main date columns for a report, but only displays the
summary columns (--row-total, --average). This is useful when there are
many columns (a weekly summary over many years) where you're only
interested in the average (or some other summary).
2023-10-06 05:25:26 +01:00
bobobo1618
9fb5740045 Add support for negating a Matcher
https://github.com/simonmichael/hledger/issues/2054
2023-10-05 10:22:01 +01:00
Simon Michael
bdf292b377 ;cabal: update cabal files 2023-10-04 10:03:35 +01:00
Simon Michael
fffae7f578 ;doc: main module haddock cleanups 2023-10-04 10:03:35 +01:00
Simon Michael
2e06c8dc27 ;doc: package description cleanups 2023-10-04 10:03:35 +01:00
Simon Michael
1ef48fd7a5 fix: failing balance assertions with cost show correct highlight #2083 2023-09-11 10:11:24 +01:00
Simon Michael
549823a783 ;doc: update manuals 2023-09-11 09:57:30 +01:00
Simon Michael
ce41252998 ;cabal: update cabal files 2023-09-11 09:56:35 +01:00
Simon Michael
6f7c331ace ;pkg: bump version to 1.31.99 2023-09-11 09:56:34 +01:00
Simon Michael
50d4555860 ;doc: merge 1.31 changelogs 2023-09-11 09:55:38 +01:00
Simon Michael
9c4235bf88 pkg: allow megaparsec 9.5 2023-09-03 08:23:43 +01:00
Simon Michael
aa7b329e3a ;errors: balance assertion: wording 2023-09-03 08:23:43 +01:00
Simon Michael
29ff5468bf dev:journalBalanceTransactions: styling comment 2023-09-02 06:46:14 +01:00
Simon Michael
d8a3c9fa3e dev: no need to style amounts when converting to cost 2023-09-02 06:46:14 +01:00
Simon Michael
644635b918 imp: print: show a disambiguating decimal mark when needed
Eg "1,000" (with , as a thousands separator and no decimal digits) is
now displayed with a decimal mark: "1,000.".

"1 000" (where space is a thousands separator) is less ambiguous,
but we do the same thing (eg "1 000.") for consistency, and also to
help disambiguate when forgetting to quote a numeric commodity symbol
(eg "1234 0" where 1234 is a symbol that should have been in double quotes).
2023-09-02 06:46:14 +01:00
Simon Michael
f620a3e0ea dev: showAmountB: clarify 2023-09-02 06:46:14 +01:00
Simon Michael
4bd0dd7ab0 fix: print: don't round in implicit conversions (fix #2079) 2023-09-02 06:46:14 +01:00
Simon Michael
77aeb18bbd fix:print:style balance assertion costs; more styling api; HasAmounts class 2023-09-02 06:46:14 +01:00
Simon Michael
97be1646f1 dev: AmountStyle: make setting the precision optional
This simplifies the code for styling amounts with or without precision.
But it complicates the semantics (Nothing is useful only when setting style).
Not sure if it's the best way.
2023-09-02 06:46:14 +01:00
Simon Michael
85845e51b2 dev: AmountStyle: rename, reorder fields more mnemonically
Since this type is about to change anyway.
2023-09-02 06:46:14 +01:00
Simon Michael
9f0840456d dev: consolidate amount styling as a new (interim) api 2023-09-02 06:46:14 +01:00
Simon Michael
9b15d34f9c dev: amounts: cleanups 2023-09-02 06:46:14 +01:00
Simon Michael
d3cc31780a dev: AmountStyle: improve debug output 2023-09-02 06:46:14 +01:00
Simon Michael
ff730f775b imp:print: zero posting amounts are now shown with commodity & style
print now shows zero posting amounts with their original commodity
symbol and the corresponding style (instead of stripping the symbol).

If an inferred amount has multiple zeroes in different commodities,
a posting is displayed for each of these.

Possible breaking changes:

showMixedAmountLinesB, showAmountB, showAmountPrice now preserve
commodityful zeroes when rendering. This is intended to improve print output,
but it seems possible it might also affect balance and register reports,
though our tests show no change in those.
2023-08-27 07:34:09 +01:00
Simon Michael
35c0fd692c dev: clarify showAmountB 2023-08-27 07:34:09 +01:00
Simon Michael
28cdcd1bfd dev: clarify orderedAmounts 2023-08-27 07:34:09 +01:00
Simon Michael
3f050d45a9 dev: improve showMixedAmountLinesB doc 2023-08-27 07:34:09 +01:00
Simon Michael
c9e9145318 dev: clarify missingamt/missingmixedamt docs 2023-08-27 07:34:09 +01:00
Jay Neubrand
97943b206c make groupByDateSpan return data when first period has unbounded begin 2023-08-25 18:40:50 +01:00
Simon Michael
115b639ec2 ;doc: update manuals 2023-08-22 08:41:22 +01:00
Simon Michael
5f1bf0404a imp:check: more intuitive "balanced..." check names
balancedwithautoconversion -> autobalanced
balancednoautoconversion   -> balanced
2023-08-22 08:38:52 +01:00
Simon Michael
c1c28aea3f imp:journal: match equity conversion postings more tolerantly (fix #2041)
Equity conversion postings and cost amounts were being matched up too
exactly, causing valid entries with redundant conversion postings and
costs to be rejected. Now the amounts are compared with the precision
(number of decimal places) used in the conversion posting's amount.
Eg, here the first posting's 209.60495 GEL cost is recognised as a
match for the third posting's -209.60 GEL, using the latter's two
digit precision:

    2023-01-01
        Assets               -84.01 USD @ 2.495 GEL  ; 209.60495 GEL
        Equity:Conversion     84.01 USD
        Equity:Conversion   -209.60 GEL
        Assets               209.60 GEL
2023-07-15 16:21:00 -10:00
Simon Michael
d19690e5bd dev:Transaction: refactor/clarify transactionInferCostsFromEquity 2023-07-15 16:19:45 -10:00
Simon Michael
516a5cb448 dev: equity/cost analysis: process in parse order, better debug output
More intuitive posting numbering, making troubleshooting easier.
2023-07-15 16:17:08 -10:00
Simon Michael
ed456a3f8c imp:check:recentassertions: improve the error message's suggestion
The suggested sample balance assertion now uses the same commodity
symbol as in the failing posting (the first, if there are more than
one). Also the cleared mark has been removed.
2023-07-13 09:01:57 -10:00
Simon Michael
002773f650 imp:check:recentassertions: give a more useful error location
hledger check recentassertions now reports the error at the first
posting that's more than 7 days later than the latest balance
assertion (rather than at the balance assertion).  This is the thing
actually triggering the error, and it is more likely to be visible or
at least closer when you are working at the end of a journal file.
2023-07-12 19:54:18 -10:00
Simon Michael
1cfcb7fa76 ;cln: journalAddInferredEquityPostings -> journalInferEquityFromCosts 2023-07-04 13:21:55 -10:00
Simon Michael
8d429b5ac4 pkg:cabal: update cabal files 2023-07-01 08:14:23 -10:00
Simon Michael
1a0b745c28 pkg: add support for aeson 2.2, add upper bound 2023-07-01 08:14:23 -10:00
Simon Michael
1bd1c55bd6 ;pkg: update tested-with 2023-07-01 07:34:46 -10:00
Simon Michael
f4508e73d3 ;cabal: update cabal files 2023-06-16 12:11:53 -10:00
Simon Michael
110861ee83 ;pkg: allow megaparsec 9.4 2023-06-16 12:11:08 -10:00
Simon Michael
03e0bb9c57 ;doc: update changelogs 2023-06-14 19:06:46 -10:00
Simon Michael
79a1f1dd97 ;doc: update changelogs 2023-06-13 22:04:33 -10:00
Simon Michael
068cec31eb imp:cli: desc is now preferred for pivoting on description.
`description` still works for compatibility (undocumented).
2023-06-09 08:04:06 -10:00
Eric Mertens
e668506d26
feat: cli: Support colon-delimited --pivot (#2050)
feat:cli: --pivot now can construct an account name from multiple colon-delimited fields
2023-06-09 08:00:01 -10:00
Simon Michael
873c7339a6 ;cln: comment 2023-06-08 06:40:46 -10:00
Simon Michael
3357c27390 fix: accept entries with unmatched equity conversion postings (#2045)
Since 1.29, we unconditionally run part of the --infer-cost logic to
identify redundant costs/equity postings. This was too strict, raising
an error whenever it could not find postings matching the equity
postings.  Now we do this (and also the explicit --infer-costs
operation) as a best effort, leaving transactions unchanged if we
can't detect matching postings. This is consistent with
--infer-equity, --infer-market-prices, -B and -V.
2023-06-06 20:44:03 -10:00
Simon Michael
122e7dae94 cln: try to clarify transactionInferCostsFromEquity a bit 2023-06-06 20:43:32 -10:00
Simon Michael
57cc76ae2e ;doc: update changelogs 2023-06-02 10:25:24 -10:00
Simon Michael
5410f87953 ;doc: update changelogs 2023-06-02 08:07:52 -10:00
Simon Michael
21d6b00597 ;doc: update manuals 2023-06-01 16:35:11 -10:00
Simon Michael
286ee105da ;cabal: update cabal files 2023-06-01 16:34:52 -10:00
Simon Michael
9ae87a73fa ;pkg: bump version to 1.30.99 2023-06-01 16:34:52 -10:00
Simon Michael
34c401d1cf imp: Revert "imp: cli: make some reporting flags toggle on/off when repeated"
This reverts commit 57c0205107.

Toggling means it can be hard to know if the feature is on or off.
This needs more testing.
2023-06-01 16:32:44 -10:00
Simon Michael
ecf266a808 ;doc: merge 1.30 changelogs 2023-06-01 16:29:35 -10:00
Simon Michael
3f08394c6c ;doc: update changelogs 2023-05-31 22:03:50 -10:00
Simon Michael
d7f0398542 ;cln: doc: fix garbled haddock for journalDateSpan, journalDateSpanBothDates
hopefully
2023-05-27 12:01:20 -10:00
Simon Michael
d19d866446 fix: use costs when balancing a txn with a balance assignment (fix #2039)
Transaction balancing is supposed to balance costs, but these were
being stripped when calculating balance assignments, causing us to
wrongly reject this transaction when the last amount is left implicit,
unlike Ledger:

2023-01-01
    Assets                AAA -1.1 @@ CCC 2
    Assets                BBB -1.2 @@ CCC 3
    Expenses:Fees         CCC  0.2
    Assets                                  = CCC 4.9

I'm not sure why costs were being stripped. I seem to have added it
in 2019 (to Journal.balanceNoAssignmentTransactionB in 3b47b58ae),
but this bug seems to be present even before that.
2023-05-27 08:34:11 -10:00
Simon Michael
d2cefedffb ;doc: update manuals 2023-05-26 09:28:53 -10:00
Simon Michael
4a61caefd7 fix: infer amountless unbalanced virtual postings as zero
They were effectively zero already, but print always showed them with no amount, even with -x, which was unclear.
2023-05-20 17:41:59 -10:00
Simon Michael
e832c344c1 dev: comment 2023-05-20 17:29:06 -10:00
Simon Michael
029b59093b feat: csv: rules files can be read directly; data file can be specified
CSV rules files can now be read directly, eg you have the option of
writing `hledger -f foo.csv.rules CMD`. By default this will read data
from foo.csv in the same directory.  But you can also specify a
different data file with a new `source FILE` rule. This has some
convenience features:

- If the data file does not exist, it is treated as empty, not an
  error.

- If FILE is a relative path, it is relative to the rules file's
  directory. If it is just a file name with no path, it is relative
  to ~/Downloads/.

- If FILE is a glob pattern, the most recently modified matched file
  is used.

This helps remove some of the busywork of managing CSV downloads.
Most of your financial institutions's default CSV filenames are
different and can be recognised by a glob pattern.  So you can put a
rule like `source Checking1*.csv` in foo-checking.csv.rules,
periodically download CSV from Foo's website accepting your browser's
defaults, and then run `hledger import checking.csv.rules` to import
any new transactions. The next time, if you have done no cleanup, your
browser will probably save it as something like Checking1-2.csv, and
hledger will still see that because of the * wild card. You can choose
whether to delete CSVs after import, or keep them for a while as
temporary backups, or archive them somewhere.
2023-05-19 09:09:21 -10:00
Simon Michael
ddae3af8a3 lib: Hledger.Utils.IO: added expandGlob, sortByModTime 2023-05-19 09:09:21 -10:00
Simon Michael
3d2ef21081 lib: Hledger.Utils.IO: more robust monochrome pretty/debug printing 2023-05-18 07:19:36 -10:00
Simon Michael
83de76b67a lib: Hledger.Utils.IO: avoid excessively wide "compact" prettyprinting 2023-05-18 07:19:36 -10:00
Simon Michael
76f336695c lib: Hledger.Utils: added multicol 2023-05-18 07:19:36 -10:00
Simon Michael
577e4b6347 fix!: csv: skip now counts non-blank lines more robustly (fix #2024)
Inner empty lines were not being skipped automatically, contrary to
docs. Now all empty lines are skipped automatically, and the `skip`
rule is needed only for non-empty lines, as intended.

This may be a breaking change: it's possible that the `skip` count
might need to be adjusted in some CSV rules files.
2023-05-11 17:06:12 -10:00
Simon Michael
69be1d4ef7 ;dev: csv: refactor, clarify 2023-05-11 15:44:56 -10:00
Simon Michael
70d4c0c638 ;dev: csv: refactor, clarify 2023-05-11 15:35:05 -10:00
Simon Michael
755c3d3dbb ;dev: csv: refactor 2023-05-11 15:34:31 -10:00
Simon Michael
57c0205107 imp: cli: make some reporting flags toggle on/off when repeated
This can be useful to override defaults in scripts.
These flags will now toggle when repeated on the command line:

--invert
--transpose
-r/--related
-%/--percent
-E/--empty
-N/--no-total
-T/--row-total
-A/--average
-S/--sort-amount
2023-05-09 11:10:12 -10:00
Simon Michael
8735af77df lib: add toggleopt, for flags that toggle when repeated 2023-05-09 10:08:52 -10:00
Simon Michael
147d49c66c dev: cln: drop Hledger.Data.RawOptions.inRawOpts 2023-05-09 10:02:24 -10:00
Simon Michael
75a6c1e510 fix: "every 29th/30th/31st day of month" dates with a start date (fix #2032)
Since hledger 1.25, "every Nth day of month" period rules with N > 28
could be off by a couple of days if given certain forecast start dates.
Eg `~ every 31st day of month` with `--forecast='2023-03-30..'`.
2023-05-03 19:18:35 -10:00
Simon Michael
bbecd611f1 imp: timedot: make one multi-posting transaction per date line (#1754)
Descriptions and comments are now more straightforward and similar to
journal format.
2023-05-03 19:18:35 -10:00
Simon Michael
50349f81f7 imp: timeclock: support comments and tags (fix #1220)
Breaking change: previously timeclock descriptions could contain
semicolons. Now a semicolon in the description will end it and
start a comment (which may contain tags).
2023-05-03 00:05:11 -10:00
Simon Michael
f7f86a709b imp: timedot: fix day description/comment parsing; parse posting comments/tags 2023-05-02 17:03:03 -10:00
Simon Michael
1b19f3d330 dev: timedot: clarify, cleanup 2023-05-02 17:02:30 -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
7f713f6a44 imp: Generated/modified txns/postings are now tagged only with --verbose-tags 2023-04-29 18:25:11 -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
9d0eb20ac5 ;dev: improve comment 2023-04-27 09:17:29 -10:00
Simon Michael
f5c3bbcaf0 fix: cli: posting comment lines no longer disturb the error marker (fix #1927) 2023-04-26 22:53:01 -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
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
1c5dee2339 fix: doc: update manuals; regenerate all info manuals (fix #2023) 2023-04-06 14:13:39 -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