github simonmichael/hledger 1.28

latest releases: 1.40, hledger-web-1.40, hledger-ui-1.40...
23 months ago

Release notes (https://hledger.org/release-notes.html#hledger-1-28)

new hledger-ui screens, better debug output;
accounts, print, csv-reading improvements;
new hledger-move, watchaccounts scripts

hledger 1.28

Features

  • The accounts command has new flags: --undeclared (show accounts used but not declared),
    --unused (show accounts declared but not used), and --find (find the first account
    matched by the first command argument, a convenience for scripts).
    Also -u and -d short flags have been added for --used and --declared.

  • A new CSV rule intra-day-reversed helps generate transactions in correct order
    with CSVs where records are reversed within each day.

  • CSV rules can now correctly convert CSV date-times with a implicit or explicit timezone
    to dates in your local timezone. Previously, CSV date-times with a different time zone
    from yours could convert to off-by-one dates, because the CSV's timezone was ignored.
    Now,

    1. When a CSV has date-times with an implicit timezone different from yours,
      you can use the timezone rule to declare it.

    2. CSV date-times with a known timezone (either declared by timezone
      or parsed with %Z) will be localised to the system timezone
      (or to the timezone set with the TZ environment variable).

    (#1936)

Improvements

  • print --match now respects -o and -O.

  • print --match now returns a non-zero exit code when there is no acceptable match.

  • Support megaparsec 9.3. (Felix Yan)

  • Support GHC 9.4.

Fixes

  • In CSV rules, when assigning a parenthesised account name to accountN,
    extra whitespace is now ignored, allowing unbalanced postings to be detected correctly.

Scripts/addons

  • bin/hledger-move helps record transfers involving subaccounts and costs,
    eg when withdrawing some or all of an investment balance containing many lots and costs.

  • bin/hledger-git no longer uses the non-existent git record command.
    (#1942) (Patrick Fiaux)

  • bin/watchaccounts is a small shell script for watching the account tree as you make changes.

hledger-ui 1.28

Features

  • New "Balance sheet accounts" and "Income statement accounts" screens have been added,
    along with a new top-level "Menu" screen for navigating between these and the
    "All accounts" screen.

  • hledger-ui now starts in the "Balance sheet accounts" screen by default
    (unless no asset/liability/equity accounts can be detected,
    or command line account query arguments are provided).
    This provides a more useful default view than the giant "All accounts" list.
    Or, you can force a particular starting screen with the new --menu/--all/--bs/--is flags
    (eg, hledger-ui --all to replicate the old behaviour).

Improvements

  • The ENTER key is equivalent to RIGHT for navigation.

  • hledger-ui debug output is now always logged to ./hledger-ui.log rather than the console,
    --debug with no argument is equivalent to --debug=1,
    and debug output is much more informative.

  • Support GHC 9.4.

  • Support megaparsec 9.3 (Felix Yan)

  • Support (and require) brick 1.5, fsnotify 0.4.x.

Fixes

  • Mouse-clicking in empty space below the last list item no longer navigates
    back. It was too obtrusive, eg when you just want to focus the window.
    You can still navigate back with the mouse by clicking the left edge of the window.

  • A possible bug with detecting change of date while in --watch mode has been fixed.

API

  • hledger-ui's internal types have been changed to allow fewer invalid states
    and make it easier to develop and debug.
    (#1889, #1919).

  • Debug logging helpers have been added and cleaned up in Hledger.Ui.UIUtils:
    dbgui
    dbguiIO
    dbguiEv
    dbguiScreensEv
    mapScreens
    screenId
    screenRegisterDescriptions

hledger-web 1.28

Improvements

  • --debug with no argument is now equivalent to --debug=1.

  • Allow megaparsec 9.3 (Felix Yan)

  • Support GHC 9.4

project changes 1.28

Docs

  • Miscellaneous improvements.

Examples

  • Indian National Pension Service CSV rules (Pranesh Prakash)

Infrastructure

  • make site-watch: switch from entr to watchexec.

  • make hoogle-setup, hoogle-serve: run a local hoogle on hledger code.

  • make man-watch-PROG: watch a hledger program's man page as source files change.

credits 1.28

Simon Michael, Felix Yan, Patrick Fiaux.

Installing

At https://hledger.org/install, binary packages should be available for this release within a few days (look for green badges).

Or, you can build from source as described there, after cloning at tag 1.28:
git clone https://github.com/simonmichael/hledger --depth 1 -b 1.28

Or, if under "Assets" below there are release binaries suitable for your OS and hardware, you can use those.

Here are platform-specific instructions for the release binaries.
(You can copy & paste each block of commands as a unit to save time.):

GNU/Linux on 64-bit Intel

At the command line,
cd /usr/local/bin
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.28/hledger-linux-x64.zip   # can rerun if interrupted
unzip hledger-linux-x64.zip; tar xvf hledger-linux-x64.tar; rm hledger-linux-x64.{zip,tar}        # github workaround, preserves permissions
cd -
hledger --version  # should show the new version
touch $HOME/.hledger.journal   # ensure a default journal file exists

Mac on 64-bit Intel

In a terminal window,
cd /usr/local/bin
curl -LOC- https://github.com/simonmichael/hledger/releases/download/1.28/hledger-mac-x64.zip
unzip hledger-mac-x64.zip; tar xvf hledger-mac-x64.tar; rm hledger-mac-x64.{zip,tar}              # github workaround, preserves permissions
open .
# for the hledger, hledger-ui, hledger-web icons: right-click, Open, confirm it's ok to run
cd -
hledger --version  # should show the new version
touch $HOME/.hledger.journal   # ensure a default journal file exists

Windows on 64-bit Intel

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

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)

Download and install the release binaries:

cd $HOME\bin
curl https://github.com/simonmichael/hledger/releases/download/1.28/hledger-windows-x64.zip -OutFile hledger-windows-x64.zip
Expand-Archive hledger-windows-x64.zip -DestinationPath .
rm hledger-windows-x64.zip
cd $HOME
hledger --version           # should show the new version

And ensure a default journal file exists:

out-file -append -encoding ascii $HOME/.hledger.journal

Problems:

  • Starting hledger/hledger-web by double-clicking their icon won't work; run them from a cmd or powershell window instead.

Windows 7 on 64-bit Intel, using Firefox

  • 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.

Next steps

Don't miss a new hledger release

NewReleases is sending notifications on new releases.