Release notes
Valuation fix, improved HTML and FODS output, multiple depths, terminal pagination, robust export to Beancount, ...
hledger 1.41
Breaking changes
-
Accounts named "equity:conversion", "equity:trading", or "equity:trade(s)", which are detected as type
V/Conversion, will now revert to typeE/Equityinstead if any other account has been declared as typeV/Conversion. -
When built with ghc 9.10.1, hledger shows two extra newlines after any error message.
Fixes
-
A somewhat severe, though hopefully rare, valuation bug has been fixed. In certain circumstances, values could be calculated inaccurately, because of display-rounding occurring inappropriately during calculations. #2254
Specifically: when there was no direct P price for the target commodity, so that hledger had to convert via a chain of prices, and if all of those price amounts had too few decimal places, then the result could be inaccurate. An example:
P 2000-01-01 A 10.5 B P 2000-01-01 B 100.5 C 2000-01-01 (a) 100 A $ hledger-1.40 print -X C 2000-01-01 (a) 105520 C ; wrong $ hledger-1.41 print -X C 2000-01-01 (a) 105525 C ; right -
bs/bse/cf/is's HTML output no longer includes excess heading cells, andbs/bse's HTML output no longer shows an inappropriate Total heading with-T. (balancesheetdoes not support-T.)
(Henning Thielemann) -
Balance commands' HTML, CSV and FODS output now show tree mode properly indented (using no-break spaces).
(Henning Thielemann) -
In the HTML output of
bs/bse/cf/isreports, Net amounts in the Net row are now formatted like the others.
(Bas van Dijk) -
In
bs/bse/cf/isHTML output, some unnecessary TH cells have been fixed.
#2225 (Henning Thielemann) -
The
printcommand now ignores a depth limit entirely.
Previously, a depth limit caused it to show only transactions referencing accounts as deep or deeper than that. -
In the
roicommand, a division by zero error (when all assets were sold) has been fixed.
#2281 (Dmitry Astapov) -
In a multi-line comment generated by CSV rules, tags on all lines now work (ie, can be matched). Posting dates in comments generated from CSV also now work.
#2241 -
hledger's bash shell completions are now up to date with the latest CLI.
#986 -
When showing output with a pager, if
$PAGERis set to something not found in PATH, we now ignore it instead of raising an error. -
hledger --color=yes | less -Rnow shows bold headings as you'd expect.
Features
-
The
print,registerandaregistercommands now support HTML and FODS output, and thebs/bse/cf/iscommands now support FODS output. This means all of the "STANDARD REPORTS" commands, and thebalancecommand, now support text, HTML, CSV, TSV, or FODS output.
(Henning Thielemann) -
When generating HTML output with the register or balance commands, the
--base-urloption will add hyperlinks to hledger-web, allowing you to view the detailed transactions if you have hledger-web running.
(Henning Thielemann) -
Reports can now specify different display depths for certain accounts, rather than showing all accounts with the same depth limit. Multiple
--depth=ACCTREGEX=DEPTHoptions (ordepth:ACCTREGEX=DEPTHarguments can be used. For example, this will clip all accounts matching "assets" to depth 3, all accounts matching "expenses" to depth 2, and all other accounts to depth 1:--depth assets=3 --depth expenses=2 --depth 1
(Stephen Morgan, #2292) -
In unix-like environments, hledger now uses a pager (
$PAGER,less, ormore) for all large terminal output, not just for help. You can override this with the new--pageroption. The pager is expected to handle hledger's ANSI colour output (unless you disable that). Iflessis used, it will be configured automatically, or you can override this by setting options in aHLEDGER_LESSenvironment variable. -
The
printcommand'sbeancountoutput is now much more Beancount-compatible #2295. Other than using--aliasto provide the top-level account names Beancount requires, you should rarely have to do anything special to produce a journal thatbean-checkaccepts. hledger will automatically adjust problematic names, encode unsupported characters, and so on. See hledger: Beancount output for the full details.This supersedes the
ledger2beancounttool, and makes using Beancount tools, especially Fava, practical for hledger users. In many cases this should just work:hledger [ALIASES] print -o tmp.beancount; fava tmp.beancount
Improvements
-
ifblocks in CSV rules now allow& !(AND NOT) on the same line. -
When reading
.latestfiles, whitespace is now ignored, and any date parse failure is reported with the file and line number. -
In journal format, P directives now require a space after the first symbol, preventing surprises like
P 2024-10-31 a0 1parsed asP 2024-10-31 a 01.
#2280 -
aregisterhas a new--heading=YNoption, for disabling the report heading. (Henning Thielemann) -
aregisternow supports the--invertand--cumulativeflags, like theregistercommand. (Henning Thielemann) -
The balance commands' HTML and FODS output now shows table borders consistently.
(Henning Thielemann) -
In the balance commands' HTML output, row headings now span multiple rows when appropriate, rather than being repeated.
(Henning Thielemann) -
Balance commands now support
--transposewhen generating HTML output.
(Henning Thielemann) -
The
balancecommand's--layout=tidynow affects HTML and FODS output at least to some extent (not just CSV output). And it always disables the totals row. (Henning Thielemann) -
The
balancecommand's FODS output now picks a report title based on the report mode: "Balance Report", "Multi-period Balance Report", or "Budget Report". (Henning Thielemann) -
balanceandaregister's HTML output will now use a hledger.css file if present, likebs/bse/cf/is. -
bs/bse/cf/isnow support the--count(postings count) report type, likebalance. -
The balance commands' options help has had some cleanup.
-
The error messages from
check accountsandcheck recentassertionsare now clearer. -
The
check commoditiescommand now also checks commodities used in P directives. #2280 -
The
commoditiescommand now also list commodities mentioned in P directives. #2280 -
All of hledger's internal hidden (but searchable) tags can now be made visible by
print --verbose-tags, which is useful for troubleshooting--infer-equity,
--infer-costs, and the detection of redundant costs and conversion postings. Also,- Some hidden tags have been renamed for clarity:
_modifiedis now_modified-transaction,
_cost-matchedis now_cost-posting,
_conversion-matchedis now_conversion-posting. - The
generated-posting:tag added by--infer-equityis now valueless. - The
modified-transaction:tag added by--autonow appears on its own line.
- Some hidden tags have been renamed for clarity:
-
Using the
-NUMshortcut (for--depth NUM) in a config file now works. -
Setting the
--coloroption in a config file now works (except it does not affect--debugoutput, currently). -
The
--coloroption's suggested values are nowyes/y,no/n, orauto/a.alwaysandneverare no longer documented, though still supported. -
More compact and informative
--debug=2output during valuation. Market prices are now shown using one line each, the known prices are listed, and the status of--infer-market-pricesis shown.
#2287 -
More informative
--debug=7output from CSV rules. -
The hledger packages have a new
debugbuild flag. Builds made with ghc 9.10+ and this flag will show some kind of stack trace if the program exits with an error. (These will improve in future ghc versions.) -
Disabled the unused
ghcdebugbuild flag and ghc-debug support, for now. -
Allow megaparsec 9.7.
-
ghc 9.10 / base 4.20 are now supported.
Docs
- Windows: added tips for setting
LEDGER_FILE(Amadeusz Wieczorek, hledger_site#119) - csv: if blocks: explain matchers and field names better #2289
- import: rewrite; rename "date skipping" to "overlap detection"
- import: added tips for first import
- assertions: mention their behaviour with posting status
- journal: rewrite the Tags section
- pager: note that
help -p TOPICuses less; link to less FAQ - query types: updates, add headings, mention tag:'s infix matching
- Regular expressions: note possible RTL/bidi limitation (?)
- Special characters: rewrite, more precision, mention some Windows differences
- Output formats: expand, document beancount and FODS output
- Text output: expand/consolidate terminal topics
- FODS output: describe the advantages over CSV (Henning Thielemann)
- Debug output: note that the --debug option doesn't work in config files.
- bal: improve --layout doc
- bal: also mention hledger.css and text encoding in balance doc
- html: note safari text encoding issue
- timedot: mention the common journal+timedot file setup #2238
- Install, manual: new shell completions doc. #986
- Config files: rewrite #2231
- examples/csv: an example of YNAB 4 data, and RTL text, with a workaround
- examples: hledger2beancount.conf
Scripts/addons
- bin/*: remove obsolete _FLAGS markers from --help
- examples/csv/csv-hledger-1.py: a python-based CSV converter script
API
- Hledger.Utils.IO's ansi color helpers now respect the --color option.
- Hledger.Utils.IO.rgb' now takes Float arguments instead of Word8.
- Hledger.Cli.Commands.Balance: export budgetReportAs* functions, for use in scripts.
(Dmitry Astapov)
hledger-ui 1.41
Breaking changes
- When built with ghc 9.10.1, error messages are displayed with two extra trailing newlines.
Fixes
-
V (value) and C (cost) toggle keys once again reset each other as they should
(broken since 1.21).
(Gal Lakovnik Gorenec, #2284) -
Bash shell completions are now up to date. #986
Features
Improvements
-
Allow clipping depth to be configured per account (until adjusted in app, at least).
(Stephen Morgan, #2292) -
Added helix as a supported editor for the
ekey. (amano.kenji) -
Added --pager and --color options as in hledger, affecting command line help. Also --color=no forces use of the "terminal" theme.
-
Added a new
debugbuild flag. Builds made with ghc 9.10+ and this flag will show some kind of partial stack trace if the program exits with an error. These will improve in future ghc versions. -
Disabled the unused
ghcdebugbuild flag and ghc-debug support, for now. -
Allow megaparsec 9.7.
-
Allow brick 2.5, 2.6.
-
Avoid brick 2.3.2, which doesn't build on windows.
-
ghc 9.10 / base 4.20 are now supported.
Docs
- Mention that period navigation uses standard periods #2293
- Install, manual: new shell completions doc. #986
hledger-web 1.41
Breaking changes
- When built with ghc 9.10.1, error messages are displayed with two extra trailing newlines.
Fixes
-
Autocompletions now work in newly created account fields. #2215
-
Bash shell completions are now up to date. #986
Features
Improvements
-
Added --pager and --color options as in hledger, affecting command line help.
-
Added a new
debugbuild flag. Builds made with ghc 9.10+ and this flag will show some kind of partial stack trace if the program exits with an error. These will improve in future ghc versions. -
Disabled the unused
ghcdebugbuild flag and ghc-debug support, for now. -
allow megaparsec 9.7
-
ghc 9.10 / base 4.20 are now supported.
Docs
- Install, manual: new shell completions doc. #986
project changes 1.41
Docs
- REGRESSIONS: new table format; updates.
- CODE: notes on the use of haddock #2222
- Simplify github bug report template
- Add man pages and info manuals to the release bindists on github
Scripts/addons
- Fixed build errors in all bin/ scripts. (Dmitry Astapov)
- hledger-install: fix installation of hledger-ui
Infrastructure/Misc
- GHC 9.10 is now the default for dev builds and most github workflows.
- Add consistent greppable summaries to all workflows; various other improvements
- Add bash shell completion script to the release bindists (#2223, gesh/hseg, Simon Michael)
- tools/gtree: -u shows untracked files, -I adds ignored files.
- just doctest: pass through doctest arg(s).
credits 1.41
Simon Michael (@simonmichael), This release may arrive in your local packaging system soon - look for green badges at hledger.org: Install. At the command line,
In a terminal window, run these commands to download, unpack, authorise, and install the binaries in your command line PATH. In a powershell window (press Windows-r, type powershell, press enter),
Once that journal file exists, you can start hledger-web by double-clicking on the icon if you wish.
Problems:
Henning Thielemann (@thielema),
Dmitry Astapov (@adept),
Stephen Morgan (@Xitian9),
Bas van Dijk (@basvandijk),
Gal Lakovnik Gorenec,
amano.kenji,
gesh.
How to install
Or you can build it from source, as described on that page.
Or you can use the binaries below:
GNU/Linux on 64-bit Intel
cd /usr/local/bin
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.41/hledger-linux-x64.zip
(unzip -p hledger-linux-x64.zip | tar xf -) && rm hledger-linux-x64.zip
cd
hledger --version # should show 1.41
Mac on 64-bit ARM or Intel
Note, don't use your web browser; it won't authorise the binaries.
cd /usr/local/bin
# for ARM macs:
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.41/hledger-mac-arm64.zip
(unzip -p hledger-mac-arm64.zip | tar xf -) && rm hledger-mac-arm64.zip
# or for Intel macs:
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.41/hledger-mac-x64.tar.gz
(unzip -p hledger-mac-x64.tar.gz | tar xf -) && rm -f hledger-mac-x64.zip
cd
hledger --version # should show 1.41
Windows on 64-bit Intel or ARM
mkdir -force $HOME\bin >$null
$ENV:PATH += ";"+$HOME+"\bin"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User)
cd $HOME\bin
cp hledger.exe hledger.old.exe # keep a backup of the old executables, if you like
cp hledger-ui.exe hledger-ui.old.exe
cp hledger-web.exe hledger-web.old.exe
curl https://github.com/simonmichael/hledger/releases/download/1.41/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force
cd $HOME
hledger --version # should show 1.41
hledger-ui --version
hledger-web --version
(Not sure why "ascii" is needed here - hledger likes utf8 and understands utf8 BOM headers..
but the state of our unicode support on Windows
is really unknown, your input welcome.)
out-file -append -encoding ascii $HOME/.hledger.journal
Windows 7 on 64-bit Intel
echo %PATH%, like C:\Windows (though that one will require administrator permission); otherwise, your home directory (C:\Users\YOURNAME)
\Windows, you'll need to scroll down)
hledger --version should show 1.41
echo # >> .hledger.journal to ensure a default journal file exists. (Important: the doubled >> is needed to avoid overwriting existing data.)
configure that to be larger, or run hledger-web from a command window instead.
Once installed, run hledger, and perhaps read hledger.org: Quick start.