github simonmichael/hledger 1.34

29 days ago

Release notes

hledger 1.34

Breaking changes

  • check ordereddates no longer supports --date2. Also (not a breaking change): --date2 and secondary dates are now officially deprecated in hledger, though kept for compatibility.

Features

  • You can now get a quick list of example command lines for hledger or its most useful subcommands by adding the --tldr flag (or just --tl). For best appearance you should install the tldr client, though it's not required.

    These short "tldr pages" are a great counterbalance to verbose PTA docs. You can also use tldr without hledger to view the latest versions, or translations: tldr hledger[-COMMAND]. Or you can browse tldr pages online. Consider contributing translations! More tips at https://github.com/simonmichael/hledger/tree/master/doc/tldr.

Improvements

  • The hledger commands list has been reorganised, with commands listed roughly in the order you'll need them.

  • The general flags descriptions in --help have been updated and grouped.

  • Correctness checks now run in a documented order. commodities are now checked before accounts, and tags before recentassertions. When both ordereddates and assertions checks are enabled, ordereddates now runs first, giving more useful error messages.

  • -I/--ignore-assertions is now overridden by -s/--strict (or check assertions), enabling more flexible workflows. Eg you can alias hl="hledger -I" to delay balance assertions checking until you add -s to commands.

  • --color and --pretty now also accept y or n as argument.

  • When built with the ghcdebug flag and started with --debug=-1, hledger can be controlled by ghc-debug clients like ghc-debug-brick or a ghc-debug query script, for analysing memory/profile info.

Fixes

  • hledger COMMAND --man and hledger help TOPIC --man now properly scroll the man page to the TOPIC or COMMAND heading. The exact/prefix matching behaviour has been clarified in help --help.

  • In journal files, include directives with trailing whitespace are now parsed correctly.

  • The help command's help flags are now consistent with other commands (and it has --debug as a hidden flag).

  • Build errors with GHC 8.10 have been fixed. #2198

Docs

  • The tables of contents on hledger.org pages now just list top-level headings, (and the hledger manual structure has been adjusted for this). This makes the hledger manual on hledger.org more scannable and less scary.
  • add: drop lengthy transcript, add simpler example commands (from tldr)
  • Amount formatting: move down, it's not the best first topic
  • balance: mention the --summary-only flag
  • check: expand check descriptions
  • examples: CSV rules: vanguard, fidelity, paypal updates
  • Generating data: rewrite
  • JSON output: link to OpenAPI spec
  • manuals: synopsis, options cleanup/consistency
  • Options: correction, NO_COLOR does not override --color
  • PART 4: COMMANDS: reorganise into groups, like the CLI commands list.
  • Period expressions: mention last day of month adjusting #2005
  • Secondary dates: expand, and declare them deprecated.
  • Time periods cleanup, simplify markup
  • Unicode characters: mention UTF-8 on windows

Scripts/addons

  • Added hledger-pricehist, an alias for the pricehist market price fetcher so that it can appear in hledger's commands list.

hledger-ui 1.34

Features

  • You can now get a quick list of example command lines by running with --tldr (or just --tl). For best appearance, install the tldr client, though it's not required.

Improvements

  • The general flags in --help have been updated and grouped, consistent with hledger.

  • When built with the ghcdebug flag and started with --debug=-1, hledger-ui can be controlled by ghc-debug clients like ghc-debug-brick or a ghc-debug query script, for analysing memory/profile info.

hledger-web 1.34

Features

  • You can now get a quick list of example command lines by running with --tldr (or just --tl). For best appearance, install the tldr client, though it's not required.

Improvements

  • The general flags in --help have been updated and grouped, consistent with hledger.

  • When built with the ghcdebug flag and started with --debug=-1, hledger-web can be controlled by ghc-debug clients like ghc-debug-brick or a ghc-debug query script, for analysing memory/profile info.

Docs

  • A basic OpenAPI specification is provided for hledger-web's JSON-over-HTTP API. This is also applicable to hledger print's JSON output format.

project changes 1.34

Docs

  • move release notes from the hledger_site repo to the main hledger repo
  • github release notes: show the release notes, hide the install instructions by default
  • github release notes: improve windows install commands
  • github release notes: start mentioning github usernames, enabling the Contributors avatar list
  • dev docs: new Developer FAQ, Contributor Quick Start updates

Scripts/addons

  • hledger-install.sh now uses stackage nightly, and a failure on non-Windows platforms has been fixed.

Infrastructure/misc

  • A new release workflow creates github releases, uploads release binaries and generates release notes.
  • Github release binaries for mac and linux are now in .tar.gz format (no longer tarred and zipped).
  • There is a new oldest workflow for testing the oldest GHC we support (currently 8.10.7).
  • The binaries-mac-x64 workflow has been bumped from GHC 9.4 to 9.8.
  • The master branch's ci workflow has been updated to Ubuntu 24.04 and uses the preinstalled GHC & stack, saving some work.
  • md-issue-refs helps generate markdown issue links.
  • relnotes.hs helps generate release notes from changelogs.
  • The project Makefile has now been fully replaced by Justfile.

credits 1.34

Simon Michael (@simonmichael)

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.34/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.34

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.
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.34/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.34/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.34

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.34/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -DestinationPath . -Force
cd $HOME
hledger --version      # should show 1.34
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 the new version
  • 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.

Don't miss a new hledger release

NewReleases is sending notifications on new releases.