Skip to content

1.40

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 09 Sep 22:03
· 192 commits to master since this release
1.40

Release notes

Config file support, sortable register, FODS output, prettier tables.

hledger 1.40

Fixes

  • Account tags (and type declarations) declared in multiple files are now combined correctly. #2202
  • Several kinds of report interval now choose a better start date:
    • every Nth day of month from DATE with periodic transactions #2218
    • every M/D from DATE
    • every Nth WEEKDAY from DATE
  • The balance commands' html output no longer repeats the "Total" and "Net" headings when the totals row has multiple lines. And the layout has been improved and made more consistent with the text output.
  • The --tldr flag now also works with the tealdeer tldr client.

Features

  • You can now save command line options in a config file, to be added to your hledger commands either on demand or automatically. (This supersedes the older arguments files feature.) This has been a popular feature request. It has pros and cons, and is experimental; your testing and feedback is welcome. It changes the nature of hledger somewhat, which I have marked by giving this release a more memorable version number (1.40).
  • The balance commands can now output in FODS format, a spreadsheet file format accepted by LibreOffice Calc. If you use LibreOffice this is better than CSV because it works across locales (decimal point vs. decimal comma, character encoding stored in XML header), and it supports fixed header rows and columns, cell types (string vs. number vs. date), separation of number and currency, styles (bold), and borders. You can still extract CSV from FODS/ODS with the ods2csv utility from Hackage. (Henning Thielemann)
  • The register report can now be sorted by date, description, account, amount, absolute amount, or a combination of these. (Michael Rees, #2211)

Improvements

  • Command line processing has been overhauled and should be more robust in certain cases, with tweaked error messages and debug output. Command-specific flags can now optionally appear before the command name. (Though writing them afterward is usually more readable. Addon-specific flags must still come last, after --.)
  • The --rules-file option has been renamed to --rules. The old spelling is still supported as a hidden option.
  • Weekly reports' week headings are now more compact, especially in single-year balance reports. (#2204, Victor Mihalache)
  • The balance command with no report interval, and also balance --budget, now support html output. (Henning Thielemann)
  • In balance commands' html and csv output, "Total:" and "Net:" headings are now capitalised consistently.
  • bs/cf/is reports now show the report interval in their title.
  • The balance commands' text output with the --pretty flag now shows an outer table border and inter-column borders.
  • The check recentassertions error message is now more readable.
  • Timedot format now allows comment lines to be indented.
  • When running the tldr-node-client client, auto-update of the tldr database is now suppressed.
  • When running a tldr client fails, the warning now mentions the required --render flag. #2201
  • The error message for unsupported regular expressions like (?:foo) has been improved.
  • --debug has moved to "General help flags", making it available in more situations.
  • Some verbose debug output from command line processing has been demoted to level 2.
  • Parsing timedot files now gives debug output at level 9.
  • Allow doclayout 0.5.

Docs

  • The hledger/hledger-ui/hledger-web manuals now list all command options as shown by --help.
  • Added an example config file, hledger.conf.sample.
  • The diff and prices commands' help layout has been improved.
  • add's doc described the effect of D wrongly, now fixed.
  • Date adjustments: rewrites and corrections
  • Period headings: added
  • Input: clarify that multiple -f options are allowed
  • Scripts and add-ons: edits, list add-ons again
  • Timeclock: edits, fix ti/to scripts
  • Fixed "hledger and Ledger" links [hledger_site#112]
  • examples/csv: Monzo CSV rules added
  • examples/csv: Tiller CSV rules added
  • examples/csv: Nordea CSV rules added (Arto Jonsson)

Scripts/addons

  • bin/bashrc updates; add years, eachyear scripts
  • bin/hledger-simplebal: ignore config files
  • bin/hledger-script-example: explain shebang commands better
  • bin/hledger-register-max: update/fix

hledger-ui 1.40

Improvements

  • The menu screen now supports the shift arrow and shift T keys, and its header shows any narrowed time period in effect, like other screens.
  • Support brick 2.4.

Docs

  • The description of the shift-T key (set period to today) has been fixed.
  • The shift arrow keys and period narrowing have been clarified

hledger-web 1.40

Improvements

  • We now guess a more robust base url when --base-url is not specified. Now relative links to js/css resources will use the same hostname etc. that the main page was requested from, making them work better when accessed via multiple IP addresses/hostnames without an explicit --base-url setting. (A followup to #2099, #2100 and #2127.)
  • We now require a http[s] scheme in --base-url's value. Previously it accepted just a hostname, and generated bad links.

project changes 1.40

Docs

  • In the hledger 1.29 release notes, Date adjustments has had some corrections.
  • Github release notes template cleanups; fix mac, linux install commands.
  • README: fixed contributors link.
  • RELEASING: updates

Scripts/addons

  • hledger-install: cleanups, bump versions, perhaps fix hledger-interest install
  • hledger-install: clarify some stack/cabal setup messages

Infrastructure/Misc

  • Shake.hs: fix partial warnings
  • Shake cmdhelp: renamed to cmddocs, and it now also updates the options listed in the manuals, and shows progress output. It should be run (at some point) after changing commands' docs or options.
  • Shake txtmanuals: silence all but wide table warnings
  • just file cleanups; update to support just 1.28+
  • just twih: date fixes
  • just ghci: -fobject-code was a mistake, keep everything interpreted
  • just functest: try again to reduce rebuilding/slowdowns when testing
  • just installrel: update for .tar.gz
  • ci scripts: cleanup, fix a macos-ism

credits 1.40

Simon Michael (@simonmichael),
Henning Thielemann (@thielema),
Michael Rees (@reesmichael1),
Arto Jonsson (@artoj),
Victor Mihalache (@victormihalache).

How to install

This release may arrive in your local packaging system soon - look for green badges at hledger.org: 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

At the command line,

cd /usr/local/bin
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.40/hledger-linux-x64.tar.gz
tar xvf hledger-linux-x64.tar.gz && rm -f hledger-linux-x64.tar.gz
cd
hledger --version    # should show 1.40

Mac on 64-bit ARM or Intel

In a terminal window, run these commands to download, unpack, authorise, and install the binaries in your command line PATH.
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.40/hledger-mac-arm64.tar.gz
tar xvf hledger-mac-arm64.tar.gz && rm -f hledger-mac-arm64.tar.gz

# or for Intel macs:
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.40/hledger-mac-x64.tar.gz
tar xvf hledger-mac-x64.tar.gz && rm -f hledger-mac-x64.tar.gz
cd
hledger --version    # should show 1.40

Windows on 64-bit Intel or ARM

In a powershell window (press Windows-r, type powershell, press enter),

  1. Make a place to keep hledger binaries, and add it to your PATH; this makes running hledger easier. You only need to do this once, not for every release:
mkdir -force $HOME\bin >$null
$ENV:PATH += ";"+$HOME+"\bin"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User)
  1. Download and install the release binaries:
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.40/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force
cd $HOME
hledger --version      # should show 1.40
hledger-ui --version
hledger-web --version
  1. Ensure a default journal file exists, and without a problematic encoding.
    (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

Once that journal file exists, you can start hledger-web by double-clicking on the icon if you wish.

Windows 7 on 64-bit Intel

  • click hledger-windows-x64.zip below
  • choose Open with Windows Explorer, OK
  • click Extract all files
  • choose a destination folder - ideally one that appears in echo %PATH%, like C:\Windows (though that one will require administrator permission); otherwise, your home directory (C:\Users\YOURNAME)
  • check "Show extracted files when complete"
  • click Extract, wait for the destination folder to open
  • find the hledger, hledger-web icons (if you extracted to \Windows, you'll need to scroll down)
  • for each icon: double-click, uncheck "Always ask before opening this file", click Run
  • close those Explorer windows
  • open a command window (press Windows-r, type CMD, press enter)
  • hledger --version should show 1.40
  • echo # >> .hledger.journal to ensure a default journal file exists. (Important: the doubled >> is needed to avoid overwriting existing data.)

Problems:

  • Starting hledger by double-clicking its icon won't work because it needs arguments; run it from the command window instead.
  • Starting hledger-web by double-clicking its icon may fail eg because Explorer's command window is too small;
    configure that to be larger, or run hledger-web from a command window instead.
  • hledger or hledger-web may fail to run if there is not enough memory available.


Once installed, run hledger, and perhaps read hledger.org: Quick start.