github simonmichael/hledger 1.27

latest releases: 1.33.1, hledger-web-1.33.1, hledger-ui-1.33.1...
20 months ago

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

2022-09-01 hledger-1.27

Infer costs from equity postings, new error checks, improved error messages, fixes.

hledger 1.27

Features

  • hledger check recentassertions (and flycheck-hledger in Emacs if
    you enable this check) requires that all balance-asserted accounts
    have a balance assertion within 7 days before their latest posting.

    This helps remind you to not only record transactions, but also to
    regularly check account balances against the real world, to catch
    errors sooner and avoid a time-consuming hunt.

  • The --infer-costs general flag has been added, as the inverse
    operation to --infer-equity. --infer-costs detects commodity
    conversion transactions which have been written with equity
    conversion postings (the traditional accounting notation) and adds
    PTA cost notation (@@) to them (allowing cost reporting).
    See https://hledger.org/hledger.html#equity-conversion-postings .
    (Stephen Morgan)

Improvements

  • Many error messages have been improved. Most error messages now use
    a consistent, more informative format.
    (#1436)

  • The accounts command has a new --directives flag which makes it
    show valid account directives which you can paste into a journal.

  • The accounts command has a new --positions flag which shows where
    accounts were declared, useful for troubleshooting.
    (#1909)

  • Bump lower bounds for Diff and githash. (Andrew Lelechenko)

  • GHC 8.6 and 8.8 are no longer supported. Building hledger now
    requires GHC 8.10 or greater.

Fixes

  • Account display order is now calculated correctly even when accounts
    are declared in multiple files.
    (#1909)

  • At --debug 5 and up, account declarations info is logged.
    (#1909)

  • hledger aregister and hledger-ui now show transactions correctly
    when there is a type: query.
    (#1905)

  • bal: Allow cumulative gain and valuechange reports.
    Previously, --cumulative with --gain or --valuechange would produce an
    empty report. This fixes this issue to produce a reasonable report.
    (Stephen Morgan)

  • bal: budget goal amounts now respect -c styles (fixes #1907)

  • bal: budget goals now respect -H (#1879)

  • bal: budget goals were ignoring rule-specified start date

  • cf/bs/is: Fixed non-display of child accounts when there is an
    intervening account of another type.
    (#1921) (Stephen Morgan)

  • roi: make sure empty cashflows are skipped when determining first cashflow (Charlotte Van Petegem)
    Empty cashflows are added when the begin date of the report is before the first
    transaction.

Scripts/addons

  • https://hledger.org/scripts.html - an overview of scripts and addons in bin/.

  • paypaljson, paypaljson2csv - download txns from paypal API

  • hledger-check-postable.hs - check that no postings are made to accounts with a postable:(n|no) tag

  • hledger-addon-example.hs - script template

hledger-ui 1.27

Improvements

  • At --debug=2 and up, log debug output to ./debug.log.

  • Use/require brick 1.0+. (#1889)

  • Use hledger 1.27

hledger-web 1.27

Improvements

  • Improve the add form's layout and space usage.

  • Pre-fill the add form's date field.

  • Highlight today in the add form's date picker.

  • Focus the add form's description field by default.

  • Allow an empty description in the add form.

  • Use hledger 1.27

Fixes

  • Respect the add form's file selector again.
    (Simon Michael, Kerstin, #1229)

project changes 1.27

Docs

  • https://hledger.org/ERRORS.html - an overview of hledger's error messages.

  • Rewrite/consolidate cost and conversion docs.

  • New template for github releases, with improved install instructions for binaries.

  • Add modern windows binary install instructions. (Lazar Lazarov, Simon Michael)

  • Fix tables of contents in developer documentation. (Alex Hirzel)

  • Update ACHIEVEMENTS. (Alex Hirzel)

  • Corrected the extension for the CREDITS file. (Pranesh Prakash)

  • Fix broken link in bin/README.md. (David D Lowe)

Examples

  • Add example for capital one credit cards CSV. (max thomas)

Process

  • Revive github projects, set up http://projects.hledger.org shortcut url

  • Many cleanups and improvements to the CI test and binary-generating
    github actions. The CI tests for master now also include
    hledger-lib's doctests.

  • All packages now disallow name shadowing in their code.

  • make scc gives a modern report of code line counts.

  • make ghci-unit-test loads hledger-lib unit tests in GHCI.

credits 1.27

Simon Michael,
Stephen Morgan,
Alex Hirzel,
Pranesh Prakash,
David D Lowe,
Charlotte Van Petegem,
Max Thomas,
Andrew Lelechenko.

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.27:
git clone https://github.com/simonmichael/hledger --depth 1 -b 1.27

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