2019/03/01 hledger 1.14

project-wide changes for 1.14

hledger.org website: now uses https, home page updates, download page improved package list with status badges. Also the github wiki pages are now rendered as part of hledger.org, like the main site pages (with pandoc markdown and tables of contents). Building the site now requires that a copy of the wiki is checked out under wiki/.

project-wide changes for 1.13

packaging: A docker image providing the main hledger tools is now linked on the download page. This is another way to get up-to-date hledger tools without building them yourself (and, a way to run hledger-ui on windows ?) (Dmitry Astapov, Simon Michael)

update the project-wide and/or package changelogs, inserting new commits (touching the respective directory, since the tag version or commit hash which is the first word in the changelog's previous top heading) at the top, formatted as changelog entries.

hledger 1.13

cli: the command line help and manual section for all hledger's commands are now consistent, and generated from the same source.

cli: comprehensive bash completion support is now provided (in shell-completion/). See how-to in the Cookbook. (Jakob Schöttl)

balance --budget: budget amounts now aggregate hierarchically, like account balances. Unbudgeted accounts can be shown with -E/--empty (along with zero-balance accounts), and the --show-budgeted flag has been dropped. (Dmitry Astapov)

journal: balance assertion errors now show exact amounts with all decimal digits. Previously it was possible, in case of a commodity directive limiting the display precision, to have a balance assertion error with asserted and actual amounts looking the same. (#941)

journal format, bs/bse/cf/is commands: account directives can declare account types (#877)
Previously you had to use one of the standard english account names (assets, liabilities..) for top-level accounts, if you wanted them to appear in the right place in the balancesheet, balancesheetequity, cashflow or incomestatement reports.

Now you can use your preferred account names, and use account directives to declare which accounting class (Asset, Liability, Equity, Revenue or eXpense) an account (and its subaccounts) belongs to, by writing one of the letters A, L, E, R, X after the account name, after two or more spaces. This syntax may change (see issue). Experimental.

Currently we allow unlimited account type declarations anywhere in the account tree. So you could declare a liability account somewhere under assets, and maybe a revenue account under that, and another asset account even further down. In such cases you start to see oddities like accounts appearing in multiple places in a tree-mode report. I have left it this way for now in case it helps with, eg, modelling contra accounts, or combining multiple files each with their own account type declarations. (In that scenario, if we only allowed type declarations on top-level accounts, or only allowed a single account of each type, complications seem likely.)

journal format: periodic transaction rules now require a double space separator.
In periodic transaction rules which specify a transaction description or same-line transaction comment, this must be separated from the period expression by two or more spaces, to prevent ambiguous parsing. Eg this will parse correctly as "monthly" thanks to the double space:

~ monthly In 2020 we'll end this monthly transaction.

journal format: exact/complete balance assertions (Samuel May).
A stronger kind of balance assertion, written with a double equals sign, asserts an account's complete account balance, not just the balance in one commodity. (But only if it is a single-commodity balance, for now.) Eg:

Also, we now disallow the combination of balance assignments and transaction modifier rules which both affect the same account, which could otherwise cause confusing balance assertion failures (#912). (Because assignments now generate amounts to satisfy balance assertions before transaction modifier rules are applied (#908).)

journal format: periodic transaction rules are now aware of Y default year directives. (#892)
Ie when a default year Y is in effect, they resolve partial or relative dates using Y/1/1 as the reference date, rather than today's date.

hide future txns by default, add --future flag, toggle with F.
You may have transactions dated later than today, perhaps piped from print --forecast or recorded in the journal, which you don't want to see except when forecasting.

By default, we now hide future transactions, showing "today's balance". This can be toggled with the F key, which is easier than setting a date query. --present and --future flags have been added to set the initial mode.

(Experimental. Interactions with date queries have not been explored.)

register screen: positive amounts: green -> black
The green/red scheme helped distinguish the changes column from the black/red balance column, but the default green is hard to read on the pale background in some terminals. Also the changes column is non-bold now.

use hledger 1.12

hledger-web 1.12

fix duplicate package.yaml keys warned about by hpack

use hledger 1.12

hledger-api 1.12

use hledger 1.12

hledger-lib 1.12

switch to megaparsec 7 (Alex Chen)
We now track the stack of include files in Journal ourselves, since megaparsec dropped this feature.

add 'ExceptT' layer to our parser monad again (Alex Chen)
This was removed under the assumption that it would be possible to write our parser without this capability. However, after a hairy backtracking bug, we would now prefer to have the option to prevent backtracking.

more support for location-aware parse errors when re-parsing (Alex Chen)

make 'includedirectivep' an 'ErroringJournalParser' (Alex Chen)

drop Ord instance breaking GHC 8.6 build (Peter Simons)

flip the arguments of (divide|multiply)[Mixed]Amount

showTransaction: fix a case showing multiple missing amounts
showTransaction could sometimes hide the last posting's amount even if one of the other posting amounts was already implcit, producing invalid transaction output.

hledger 1.11

The default display order of accounts is now influenced by the order of account directives. Accounts declared by account directives are displayed first (top-most), in declaration order, followed by undeclared accounts in alphabetical order. Numeric account codes are no longer used, and are ignored and considered deprecated.

So if your accounts are displaying in a weird order after upgrading, and you want them alphabetical like before, just sort your account directives alphabetically.

Account sorting (by name, by declaration, by amount) is now more robust and supported consistently by all commands (accounts, balance, bs..) in all modes (tree & flat, tabular & non-tabular).

close: new --opening/--closing flags to print only the opening or closing transaction

files: a new command to list included files

prices: query arguments are now supported. Prices can be filtered by date, and postings providing transaction prices can also be filtered.

hledger-ui 1.11

hledger-web 1.11

hledger-api 1.11

hledger-lib 1.11

all unit tests have been converted from HUnit+test-framework to easytest

doctests now run quicker by default, by skipping reloading between tests. This can be disabled by passing --slow to the doctests test suite executable.

doctests test suite executable now supports --verbose, which shows progress output as tests are run if doctest 0.16.0+ is installed (and hopefully is harmless otherwise).

doctests now support file pattern arguments, provide more informative output. Limiting to just the file(s) you're interested can make doctest start much quicker. With one big caveat: you can limit the starting files, but it always imports and tests all other local files those import.

a bunch of custom Show instances have been replaced with defaults, for easier troubleshooting. These were sometimes obscuring important details, eg in test failure output. Our new policy is: stick with default derived Show instances as far as possible, but when necessary adjust them to valid haskell syntax so pretty-show can pretty-print them (eg when they contain Day values, cf https://github.com/haskell/time/issues/101). By convention, when fields are shown in less than full detail, and/or in double-quoted pseudo syntax, we show a double period (..) in the output.

Amount has a new Show instance. Amount's show instance hid important details by default, and showing more details required increasing the debug level, which was inconvenient. Now it has a single show instance which shows more information, is fairly compact, and is pretty-printable.

Same-line & next-line comments of transactions, postings, etc. are now parsed a bit more precisely (followingcommentp). Previously, parsing no comment gave the same result as an empty comment (a single newline); now it gives an empty string.
Also, and perhaps as a consequence of the above, when there's no same-line comment but there is a next-line comment, we'll insert an empty first line, since otherwise next-line comments would get moved up to the same line when rendered.

hledger 1.10

journal: transaction price amounts having their own price amounts is now a parse error

journal: amounts with space as digit group separator and trailing whitespace now parse correctly (#780)

journal: in amounts containing digits and a single space, the space is now interpreted as a digit group separator, not a decimal separator (#749)

journal: in commodity/format/D directives, the amount must now include a decimal separator.

When more precise control is needed over number parsing, our recommended solution is commodity directives. Commodity directives that don't specify the decimal separator leave things ambiguous, increasing the chance of misparsing numbers. In some cases it could cause amounts with a decimal point to be parsed as if with a digit group separator, so 1.234 became 1234.

It seems the simple and really only way to do this reliably is to require an explicit decimal point character. Most folks probably do this already. Unfortunately, it makes another potential incompatiblity with ledger and beancount journals. But the error message will be clear and easy to work around.

journal: directives currently have diverse and somewhat tricky semantics, especially with multiple files. The manual now describes their behaviour precisely.

cli: when the system text encoding is UTF-8, ignore any UTF-8 BOM prefix found when reading files. (Paypal's new CSV has this BOM prefix, causing a confusing parse error.)

cli: tabular reports no longer have a trailing blank line added. (This allows omitting the ">=0" delimiters in our functional tests, making them easier to read and maintain.)

acc: the accounts command now has --declared and --used flags

bal: the --invert flag flips all signs

bal: --drop now works with CSV output

bal/bs/bse/cf/is: show overall report span in title

bal/bs/bse/cf/is: show short month names as headings in monthly reports

bal/bs/bse/cf/is: these commands can now generate HTML output

bal/bs/is/cf: drop short name and indent fields from multicolumn CSV

bs/bse/cf/is: these, the "financial statement" commands, now show normal income, liability and equity balances as positive numbers. Negative numbers now indicate a contra-balance (eg an overdrawn checking account), a net loss, or a negative net worth. This makes these reports more like conventional financial statements, and easier to read and share with others. (Other commands, like balance, have not changed.) (experimental)

bs/cf/is: always show a tabular report, even with no report interval. Previously you would get a simple borderless report like the original balance command. Less code, fewer bugs.

bs/bse/cf/is: in CSV output, don't repeat the headings row for each subreport

budget: warn that CSV output with bal --budget is unimplemented

budget: bal --budget shows budget goals even with no or zero actual amounts. Makes budget reports more intuitive, at the cost of a temporary hack which may misorder columns in some cases (if actual and budget activity occur in a different range of columns).

budget: --budget uses only periodic txns with the selected interval.
Budgets with different interval, eg a daily and weekly budget, are independent.

budget: show mostly fixed-width columns for readability

budget: fix bug where a budget report could include budget goals ending on the day before the report start date (splitSpan issue)

close: the equity command has been renamed to close. It now ignores any begin date (it always closes historical end balances). It also ignores --date2.

project-wide changes for 1.5

remove upper bounds on all but hledger* and base (experimental) It's rare that my deps break their api or that newer versions must be avoided, and very common that they release new versions which I must tediously and promptly test and release hackage revisions for or risk falling out of stackage. Trying it this way for a bit.

hledger-lib 1.5

-V/--value uses today's market prices by default, not those of last transaction date. #683, #648)

project-wide changes for 1.4

update stack configs for the last three GHC versions, add "make test-stackage" for finding stackage build problems, switch to GHC 8.2.1 as default for developer builds

streamline docs page

improve changelog/release notes process

improve makefile help and speed

Added a new installer script for the hledger tools, which aims to dodge common pitfalls and just work. Based on the stack install script, this bash script is cross platform, uses cabal or stack, installs stack and GHC if needed, and installs the latest release of all major hledger packages. See http://hledger.org/download for details.

hledger-lib 1.4

add readJournalFile[s]WithOpts, with simpler arguments and support for detecting new transactions since the last read.

journal, cli: make trailing whitespace significant in regex account aliases Trailing whitespace in the replacement part of a regular expression account alias is now significant. Eg, converting a parent account to just an account name prefix: --alias '/:acct:/=:acct '

timedot: allow a quantity of seconds, minutes, days, weeks, months or years to be logged as Ns, Nm, Nd, Nw, Nmo, Ny

csv: switch the order of generated postings, so account1 is first. This simplifies things and facilitates future improvements.

Fix a bug with -H showing nothing for empty periods (#583, Nicholas Niro) This patch fixes a bug that happened when using the -H option on a period without any transaction. Previously, the behavior was no output at all even though it should have shown the previous ending balances of past transactions. (This is similar to previously using -H with -E, but with the extra advantage of not showing empty accounts)

refactor: new Commands module and subdirectory. Builtin commands are now gathered more tightly in a single module, Hledger.Cli.Commands, facilitating change. The legacy "convert" command has been dropped.

project-wide changes for 1.3

Tools

make site-reload opens an auto-reloading browser on the latest site html

make changelog-draft shows the commits since last tag as org nodes

hledger-lib 1.3

journal format

The "uncleared" transaction/posting status (and associated UI flags and keys) has been renamed to "unmarked" to remove ambiguity and confusion. See the issue and linked mail list discussion for more background. (#564)

csv format

In CSV conversion rules, assigning to the "balance" field name creates balance assertions (#537, Dmitry Astapov).

Misc

hledger 1.3

CLI

The "uncleared" transaction/posting status, and associated UI flags and keys, have been renamed to "unmarked" to remove ambiguity and confusion. This means that we have dropped the --uncleared flag, and our -U flag now matches only unmarked things and not pending ones. See the issue and linked mail list discussion for more background. (#564)

Also the -P short flag has been added for --pending, and the -U/-P/-C flags can be combined.

bal/bs/is/cf: show negative amounts in red (Simon Michael, Justin Le). These commands now show negative amounts in red, when hledger detects that ANSI codes are supported, (ie when TERM is not "dumb" and stdout is not being redirected or piped).

print: show pending mark on postings (fixes #563). A pending mark on postings is now displayed, just like a cleared mark. Also there will now be a space between the mark and account name.

print: amounts are now better aligned, eg when there are posting status marks or virtual postings.

Addons

rewrite: add support for rewriting multipler postings into different commodities. For example, postings in hours can be used to generate postings in USD. (#557) (Christian G. Warden)

make addons compiles the experimental add-ons.

hledger-ui 1.3

The register screen now shows transaction status marks.

The "uncleared" status, and associated UI flags and keys, have been renamed to "unmarked" to remove ambiguity and confusion. This means that we have dropped the --uncleared flag, and our -U flag now matches only unmarked things and not pending ones. See the issue and linked mail list discussion for more background. (#564)

The P key toggles pending mode, consistent with U (unmarked) and C (cleared). There is also a temporary --status-toggles flag for testing other toggle styles; see hledger-ui -h. (#564)

There is now less "warping" of selection when lists change:

When the selected account disappears, eg when toggling zero accounts, the selection moves to the alphabetically preceding item, instead of the first one.

When the selected transaction disappears, eg when toggling status filters, the selection moves to the nearest transaction by date (and if several have the same date, by journal order), instead of the last one.

In the accounts and register screens, you can now scroll down further so that the last item need not always be shown at the bottom of the screen. And we now try to show the selected item centered in the following situations:

after moving to the end with Page down/End

after toggling filters/display modes (status, real, historical..)

on pressing the control-l key (this forces a screen redraw, also)

on entering the register screen from the accounts screen (except the first time, a known problem).

Items near the top won't be centered because we don't scroll above the top of the list.

Emacs movement keys are now supported, as well as VI keys. CTRL-b/CTRL-f/CTRL-n/CTRL-p and hjkl should work wherever unmodified arrow keys work.

In the transaction screen, amounts are now better aligned, eg when there are posting status marks or virtual postings.

hledger-lib 1.2

journal format

A pipe character can optionally be used to delimit payee names in transaction descriptions, for more accurate querying and pivoting by payee. Eg, for a description like payee name | additional notes, the two parts will be accessible as pseudo-fields/tags named payee and note.

Some journal parse errors now show the range of lines involved, not just the first.

ledger format

The experimental ledger: reader based on the WIP ledger4 project has been disabled, reducing build dependencies.

Misc

Fix a bug when tying the knot between postings and their parent transaction, reducing memory usage by about 10% (#483) (Mykola Orliuk)

Improved docs: all addons now contain their own documentation. Most of them (all but hledger-budget) use a new reduced-boilerplate declaration format and can show short (-h) and long (--help) command line help. (Long help is declared with pre and postambles to the generated options help, short help is that truncated at the start of the hledger common flags.)

hledger now shows a cleaner list of addon commands, showing only the compiled version of an addon when both source and compiled versions are in $PATH. (Addons with .exe extension or no extension are considered compiled. Modification time is not checked, ie, an old compiled addon will override a newer source version. If there are three or more versions of an addon, all are shown. )

project-wide changes for 1.1

misc

When we don't recognise a file's extension, instead of choosing a subset of readers to try based on content sniffing, now we just try them all. Also, this can be overridden by prepending the reader name and a colon to the file path (eg timedot:file.dat, csv:-).

avoid creating junk CSV rules files when trying alternate readers. We now create it only after successfully reading a file as CSV.

journal format

ledger format

use ledger-parse from the ledger4 project as an alternate reader for C++ Ledger journals

The idea is that some day we might get better compatibility with Ledger files this way. Right now this reader is not very useful and will be used only if you explicitly select it with a ledger: prefix. It parses transaction dates, descriptions, accounts and amounts, and ignores everything else. Amount parsing is delegated to hledger's journal parser, and malformed amounts might be silently ignored.

This adds at least some of the following as new dependencies for hledger-lib: parsers, parsec, attoparsec, trifecta.

misc

update base lower bound to enforce GHC 7.10+

hledger-lib had a valid install plan with GHC 7.8, but currently requires GHC 7.10 to compile. Now we require base 4.8+ everywhere to ensure the right GHC version at the start.

Hledger.Read api cleanups

rename dbgIO to dbg0IO, consistent with dbg0, and document a bug in dbg*IO

misc

hledger-equity.hs now generates valid journal format when there are multiple commodities

hledger-ui 1.1

with --watch, the display updates automatically to show file or date changes

hledger-ui --watch will reload data when the journal file (or any included file) changes. Also, when viewing a current standard period (ie this day/week/month/quarter/year), the period will move as needed to track the current system date.

the --change flag shows period changes at startup instead of historical ending balances

the A key runs the hledger-iadd tool, if installed

always reload when g is pressed

Previously it would check the modification time and reload only if it looked newer than the last reload.

mark hledger-ui as "stable"

allow brick 0.15, vty 5.14, text-zipper 0.9

hledger-web 1.1

This came up in the context of Docker, but it seems it wasn't possible for hledger-web to serve remote clients directly (without a proxy) because of 127.0.0.1 being hardcoded. That can now be changed with --host=IPADDR. Also, the default base url uses this address rather than a hard-coded "localhost".

rename --server to --serve

The --server flag sounded too close in meaning to --host so I've renamed it to --serve. The old spelling is still accepted, but deprecated and will be removed in the next release.

the general and reporting options are now listed in all executable manuals.

We assume any of them which are unsupported are harmlessly ignored.

demo.hledger.org is using beancount's example journal.

This is the somewhat realistic example journal from the beancount project, tweaked for hledger.

minor copyedits (jungle-boogie)

cli

parsing multiple input files is now robust.

When multiple -f options are provided, we now parse each file individually rather than just concatenating them, so they can have different formats (#320). Note this also means that directives (like `Y` or `alias`) no longer carry over from one file to the next.

I has been added as the short flag for --ignore-assertions

(this is different from Ledger's CLI, but useful for hledger-ui).

parsing an argument-less --debug option is more robust

hledger-lib 1.0

timedot format

new "timedot" format for retroactive/approximate time logging.

Timedot is a plain text format for logging dated, categorised quantities (eg time), supported by hledger. It is convenient for approximate and retroactive time logging, eg when the real-time clock-in/out required with a timeclock file is too precise or too interruptive. It can be formatted like a bar chart, making clear at a glance where time was spent.

journal format

fixed an issue with ordering of same-date transactions included from other files

the "commodity" directive and "format" subdirective are now supported, allowing

full control of commodity style (#295) The commodity directive's format subdirective can now be used to override the inferred style for a commodity, eg to increase or decrease the precision. This is at least a good workaround for #295.

Ledger-style "apply account"/"end apply account" directives are now used to set a default parent account.

Bracketed posting dates were fragile; they worked only if you wrote full 10-character dates. Also some semantics were a bit unclear. Now they should be robust, and have been documented more clearly. This is a legacy undocumented Ledger syntax, but it improves compatibility and might be preferable to the more verbose "date:" tags if you write posting dates often (as I do). Internally, bracketed posting dates are no longer considered to be tags. Journal comment, tag, and posting date parsers have been reworked, all with doctests.

The journal/timeclock/timedot parsers, instead of constructing opaque journal update functions which are later applied to build the journal, now construct the journal directly by modifying the parser state. This is easier to understand and debug. It also rules out the possibility of journal updates being a space leak. (They weren't, in fact this change increased memory usage slightly, but that has been addressed in other ways). The ParsedJournal type alias has been added to distinguish "being-parsed" journals and "finalised" journals.

file format detection is more robust.

The Journal, Timelog and Timedot readers' detectors now check each line in the sample data, not just the first one. I think the sample data is only about 30 chars right now, but even so this fixed a format detection issue I was seeing. Also, we now always try parsing stdin as journal format (not just sometimes).

report more accurate dates in account transaction report when postings have their own dates

(affects hledger-ui and hledger-web registers). The newly-named "transaction register date" is the date to be displayed for that transaction in a transaction register, for some current account and filter query. It is either the transaction date from the journal ("transaction general date"), or if postings to the current account and matched by the register's filter query have their own dates, the earliest of those posting dates.

simplify account transactions report's running total.

The account transactions report used for hledger-ui and -web registers now gives either the "period total" or "historical total", depending strictly on the --historical flag. It doesn't try to indicate whether the historical total is the accurate historical balance (which depends on the user's report query).

reloading a file now preserves the effect of options, query arguments etc.

reloading a journal should now reload all included files as well.

the Hledger.Read.* modules have been reorganised for better reuse.

Hledger.Read.Utils has been renamed Hledger.Read.Common and holds low-level parsers & utilities; high-level read utilities are now in Hledger.Read.

Individual amounts still have styles; from these we derive the standard "commodity styles". In user docs, we might call these "commodity formats" since they can be controlled by the "format" subdirective in journal files.

with multiple --change/--cumulative/--historical flags, use the last one instead of complaining

don't add the "d" suffix when displaying day periods

stack-ify extra/hledger-rewrite.hs

hledger-ui 1.0

accounts screen

at depth 0, show accounts on one "All" line and show all transactions in the register

0 now sets depth limit to 0 instead of clearing it

always use --no-elide for a more regular accounts tree

register screen

registers can now include/exclude subaccount transactions.

The register screen now includes subaccounts' transactions if the accounts screen was in tree mode, or when showing an account which was at the depth limit. Ie, it always shows the transactions contributing to the balance displayed on the accounts screen. As on the accounts screen, F toggles between tree mode/subaccount txns included by default and flat mode/subaccount txns excluded by default. (At least, it does when it would make a difference.)

Two fixes for the account transactions report when --real/--cleared/real:/status: are in effect, affecting hledger-ui and hledger-web:

exclude transactions which affect the current account via an excluded posting type. Eg when --real is in effect, a transaction posting to the current account with only virtual postings will not appear in the report.

when showing historical balances, don't count excluded posting types in the starting balance. Eg with --real, the starting balance will be the sum of only the non-virtual prior postings.

This is complicated and there might be some ways to confuse it still, causing wrongly included/excluded transactions or wrong historical balances/running totals (transactions with both real and virtual postings to the current account, perhaps ?)

show more accurate dates when postings have their own dates.

If postings to the register account matched by the register's filter query have their own dates, we show the earliest of these as the transaction date.

misc

By default hledger-ui now shows historical balances, which include transactions before the report start date (like hledger balance --historical). Use the H key to toggle to "period" mode, where balances start from 0 on the report start date.

shift arrow keys allow quick period browsing

shift-down narrows to the next smaller standard period (year/quarter/month/week/day), shift-up does the reverse

when narrowed to a standard period, shift-right/left moves to the next/previous period

`t` sets the period to today.

a runs the add command

E runs $HLEDGERUIEDITOR or $EDITOR or a default editor (vi) on the journal file.

When using emacs or vi, if a transaction is selected the cursor will be positioned at its journal entry.

/ key sets the filter query; BACKSPACE/DELETE clears it

Z toggles display of zero items (like --empty), and they are shown by default.

-E/--empty is now the default for hledger-ui, so accounts with 0 balance and transactions posting 0 change are shown by default. The Z key toggles this, entering "nonzero" mode which hides zero items.

R toggles inclusion of only real (non-virtual) postings

U toggles inclusion of only uncleared transactions/postings

I toggles balance assertions checking, useful for troubleshooting

vi-style movement keys are now supported (for help, you must now use ? not h) (#357)

ESC cancels minibuffer/help or clears the filter query and jumps to top screen

ENTER has been reserved for later use

reloading now preserves any options and modes in effect

reloading on the error screen now updates the message rather than entering a new error screen

the help dialog is more detailed, includes the hledger-ui manual, and uses the full terminal width if needed

the header/footer content is more efficient; historical/period and tree/flat modes are now indicated in the footer

date: query args on the command line now affect the report period.

A date2: arg or --date2 flag might also affect it (untested).

hledger-ui now uses the quicker-building microlens

hledger-web 1.0

ui

use full width on large screens, hide sidebar on small screens, more standard bootstrap styling (#418, #422) (Dominik Süß)

2015/10/30 hledger 0.27

Regular expression account aliases are now fast enough that you can use lots of them without slowing things down. They now take O(aliases x accounts) time, instead of O(aliases x transactions); also, regular expressions are no longer recompiled unnecessarily.

Documentation:

The hledger packages now have man pages, based on the current user manual, thanks to the mighty pandoc (#282).

Journal format:

Dates must now begin with a digit (not /, eg).

The comment directive longer requires an end comment, and will extend to the end of the file(s) without it.

Journal entries are now saved with all amounts explicit, to avoid losing price info (#283).

Fixed a bug which sometimes (when the same letter pair was repeated) caused it not to pick the most similar past transaction for defaults.

balance:

There is now a -V/--value flag to report current market value (as in Ledger). It converts all reported amounts using their "default market price". "Market price" is the new name for "historical prices", defined with the P directive. The default market price for a commodity is the most recent one found in the journal on or before the report end date.

Unlike Ledger, hledger's -V uses only the market prices recorded with P directives; it does not use the transaction prices recorded as part of posting amounts. Using both -B and -V at the same time is possible.

Fixed a bug in amount normalization which caused amount styles (commodity symbol placement, decimal point character, etc.) to be lost in certain cases (#230, #276).

The balance command's --format option can now adjust the rendering style of multi-commodity amounts, if you begin the format string with one of:

The balance report's final total (and the line above it) now adapt themselves to a custom --format.

print:

The --match option prints the journal entry that best matches a description (ie whose description field is most similar to the value given, and if there are several equally similar, the most recent). This was originally an add-on I used to guess account names for ledger-autosync. It's nice for quickly looking up a recent transaction from a guessed or partial description.

print now always right-aligns the amounts in an entry, even when they are wider than 12 characters. (If there is a price, it's considered part of the amount for right-alignment.)

register:

Amount columns now resize automatically, using more space if it's needed and available.

hledger-ui 0.27:

hledger-ui is a new curses-style UI, intended to be a standard part of the hledger toolset for all users (except on native MS Windows, where the vty lib is not yet supported).

The UI is quite simple, allowing just browsing of accounts and transactions, but it has a number of improvements over the old hledger-vty, which it replaces:

adapts to screen size

handles wide characters

shows multi-commodity amounts on one line

manages cursor and scroll position better

allows depth adjustment

allows --flat toggle

allows --cleared toggle

allows journal reloading

shows a more useful transaction register, like hledger-web

offers multiple color themes

includes some built-in help

hledger-ui is built with brick, a new higher-level UI library based on vty, making it relatively easy to grow and maintain.

hledger-web 0.27:

Fix keyboard shortcut for adding a transaction (Carlos Lopez-Camey)

Clear the form when clicking 'Add a transaction' (just like the shortcut) (Carlos Lopez-Camey)

Disallow -f- (reading from standard input) which currently doesn't work (#202)

Show fewer "other accounts" in the account register: to reduce clutter in the "other accounts" field, if there are both real and virtual postings to other accounts, show only the accounts posted to by real postings.

Account aliases are once again non-regular-expression-based, by default. (#252)

The regex account aliases added in 0.24 tend to trip up people switching between hledger and Ledger. (Also they are currently slow). We now use the old non-regular-expression aliases again, by default; these are unsurprising, useful, and pretty close in functionality to Ledger's aliases.

The new regex aliases are still available, but they must now be enclosed in forward slashes. (Ledger effectively ignores these.)

Journal format:

We now parse, and also print, journal entries with no postings, as proposed on the mail lists. These are not well-formed General Journal entries/transactions, but on the other hand: Ledger and beancount parse them; if they are parsed, they should be printed; they provide a convenient way to record (and report) non-transaction events; and they permit more gradual introduction and learning of the concepts (so eg a beginner can keep a simple journal before learning about accounts and postings).

Trailing whitespace after a comment directive is now ignored.

Command-line interface:

The -f/file option may now be used multiple times. This is equivalent to concatenating the input files before running hledger. The add command adds entries to the first file specified.

Queries:

real: (no argument) is now a synonym for real:1

tag: now matches tag names with a regular expression, like most other queries

empty: is no longer supported, as it overlaps a bit confusingly with amt:0. The --empty flag is still available.

You can now match on pending status (#250)

A transaction/posting status of ! (pending) was effectively equivalent to * (cleared). Now it's a separate state, not matched by --cleared. The new Ledger-compatible --pending flag matches it, and so does --uncleared.

The relevant search query terms are now status:*, status:! and status: (the old status:1 and status:0 spellings are deprecated).

Since we interpret --uncleared and status: as "any state except cleared", it's not currently possible to match things which are neither cleared nor pending.

activity:

activity no longer excludes 0-amount postings by default.

add:

Don't show quotes around the journal file path in the "Creating..." message, for consistency with the subsequent "Adding..." message.

balancesheet:

Accounts beginning with "debt" or now also recognised as liabilities.

print:

We now limit the display precision of inferred prices. (#262)

When a transaction posts to two commodities without specifying the conversion price, we generate a price which makes it balance (cf http://hledger.org/manual.html#prices). The print command showed this with full precision (so that manual calculations with the displayed numbers would look right), but this sometimes meant we showed 255 digits (when there are multiple postings in the commodity being priced, and the averaged unit price is an irrational number). In this case we now set the price's display precision to the sum of the (max) display precisions of the commodities involved. An example: ``` hledger -f- print <<< 1/1 c C 10.00 c C 11.00 d D -320.00 >>> 2015/01/01 c C 10.00 @ D 15.2381 c C 11.00 @ D 15.2381 d D -320.00

=0 ``` There might still be cases where this will show more price decimal places than necessary.

We now show inferred unit prices with at least 2 decimal places.

When inferring prices, if the commodities involved have low display precisions, we don't do a good job of rendering accurate-looking unit prices. Eg if the journal doesn't use any decimal places, any inferred unit prices are also displayed with no decimal places, which makes them look wrong to the user. Now, we always give inferred unit prices a minimum display precision of 2, which helps a bit.

register:

Postings with no amounts could give a runtime error in some obscure case, now fixed.

The deprecated shakespeare-text dependency has been removed more thoroughly.

The bench script invoked by "cabal bench" or "stack bench" now runs some simple benchmarks. You can get more accurate benchmark times by running with --criterion. This will usually give much the same numbers and takes much longer. Or with --simplebench, it benchmarks whatever commands are configured in bench/default.bench. This mode uses the first "hledger" executable in $PATH.

User-visible changes in hledger-web since 0.25.1:

make the j keybinding respect --base-url (fixes #271)

respect command line options (fixes #225)

include the unminified jquery source again (#161)

fix build breakage from #165 (fixes #268)

fix a js error breaking add form in browsers other than firefox (fixes #251)

On POSIX systems, the register command now uses the full terminal width by default. Specifically, the output width is set from:

a --width option

or a COLUMNS environment variable (NB: not the same as a bash shell var)

or on POSIX (non-windows) systems, the current terminal width

or the default, 80 characters.

This feature requires the C curses dev libraries, making installation slightly harder. If that's a problem you can disable curses support with a cabal flag: cabal install -f-curses ....

register's --width option now accepts an optional description column width following the overall width (--width WIDTH[,DESCWIDTH]). This also sets the account column width, since the available space (WIDTH-41) is divided up between these two columns. Here's a diagram:

balance assertions now are specific to a single commodity, like Ledger (#195)

support multi-line comments using "comment", "end comment" directives, like Ledger

CSV format:

fix: reading CSV data from stdin now works better

the original order of same-day transactions is now usually preserved (if the records appear to be in reverse date order, we reverse them before finally sorting by transaction date)

the rules file include directive is now relative to the current file's directory (#198)

CSV output is now built in to the balance, print, and register commands, controlled by -O/--output-format (and -o/--output-file, see below). This means that hledger data can be easily exported, eg for spreadsheet reporting or to migrate to a different tool.

when an option is repeated, the last value takes precedence (#219). This is helpful eg for customising your reporting command aliases on the fly.

smart dates (used in -p/-b/-e/date:/date2:) now must use a consistent separator character, and must be parseable to the end

output destination and format selection is now built in to the balance, print and register commands, controlled by -o/--output-file and -O/--output-format options. Notes: -o - means stdout. An output file name suffix matching a supported format will also set the output format, unless overridden by --output-format. Commands' supported output formats are listed in their command-line help. Two formats are currently available: txt (the default) and csv.

balance assertions can be disabled with --ignore-assertions

Account aliases:

all matching account aliases are now applied, not just one directive and one option

account aliases now match by case insensitive regular expressions matching anywhere in the account name

account aliases can replace multiple occurrences of the pattern within an account name

2014/9/12 hledger-web 0.23.3

2014/9/12 hledger 0.23.3

2014/5/8 hledger 0.23.2

2014/5/7 hledger 0.23.1

register: fix a refactoring-related regression that the tests missed: if transactions were not ordered by date in the journal, register could include postings before the report start date in the output. (#184)

2014/5/1 hledger 0.23

announcementcommand-line fixes and polish, a new accounts command, and a number of changes to the balance command relating to --depth, --flat, and multicolumn mode, which I find has made it much more useful.

Changes since 0.22.2:

Journal format:

A # (hash) in column 0 is now also supported for starting a top-level journal comment, like Ledger.

The "too many missing amounts" error now reminds about the 2-space rule.

Currency/commodity queries are applied more strongly in register and balance reports, filtering out unwanted currencies entirely. Eg hledger balance cur:'$' now reports only the dollar amounts even if there are multi-currency transactions or postings.

Amount queries like amt:N, amt:N, where N is not 0, now do an unsigned comparison of the amount and N. That is, they compare the absolute magnitude. To do a signed comparison instead, write N with its sign (eg amt:+N, amt:<+N, amt:>-N).

2013/12/13 hledger 0.22

balance: with a reporting interval (monthly, yearly etc.), the balance command will now show a multi-column report, showing either the per-period changes in balance (by default), the period ending balances starting from zero (--cumulative), or the actual period ending balances (--historical). A more detailed specification of the balance command's behaviour has been added to Hledger.Cli.Balance.

csv: rules files can now include other rules files, useful for factoring out common rules

queries: sym:REGEXP matches commodity symbols

register: --average/-A shows a running average, like ledger

in period expressions, - (hyphen) can be used as a more compact synonym for from and to. Eg: -p 2012/12/1-2013/2/1 or date:aug-.

the add-on script examples in extra/ have been updated; get the hledger source and add .../hledger/extra/ to your PATH to make them available. They include:

queries: amt now uses the = operator by default, eg amt:50 is equivalent to amt:=50

command line processing has been overhauled and made more consistent, and now has tests and debug output. More flags now work both before and after COMMAND: -f, --rule-file, --alias, --help, --debug, --version. Command line help, command aliases, API docs and code have been improved.

--debug now takes an optional numeric argument to set the debug level higher than 1, for more verbose debug output in a few cases.

2013/5/4 hledger 0.20.0.1

web: require at least version 1.1.7 of yesod-core to avoid a potential build error

Update the bug tracker and source repository links on hackage

2013/5/1 hledger 0.20

Bugs fixed:

balance: a 0.19 regression which showed wrong total balance with --flat has been fixed (#94)

register: when --date2 is used, the register is now sorted by the secondary date

web: some missing static & template files have been added to the package, fixing cabal-dev and hackage builds (#97, #98)

web: some hardcoded static urls have been fixed

Dependencies and code have been updated to support the latest libraries and GHC versions. For now, hledger requires GHC 7.2+ and hledger-web requires GHC 7.4+.

Journal reading:

DOS-style line-endings are now also supported in journal and rules files.

! is now accepted in the status field as well as *, like ledger

The actual date and effective date terminology has changed to primary date and secondary date. Use --date2 to select the secondary date for reports. (--aux-date or --effective are also accepted for ledger and backwards compatibility).

format conversion is now done on demand, and the convert command has been dropped. So instead of hledger convert FILE.csv just do hledger -f FILE.csv print or any other command. You can also pipe any supported format into hledger -f- CMD and hledger will try to do the right thing.

support for GHC 6.12 has been dropped; this release has been tested with GHC 7.0.4, 7.2.2, and 7.4.1

unicode is now handled properly on all supported GHC versions

API and internal cleanups

2012/3/3 hledger-web 0.17.1

set more upper bounds to fix cabal install issues with latest packages

2010/12/6 hledger 0.13

announcementreadline editing and tab completion from Judah Jacobson, more ledger compatibility, a more robust and installable web interface, bugfixes, and a much-deliberated package split.

move web, vty, chart commands into separate hledger-web, hledger-vty, hledger-chart packages. This both simplifies (no more build flags) and complicates (more room for dependency hassles), but I hope overall it will be easier and more scalable.

all packages but chart are now marked "beta", ie "not finished but suitable for everyday use"

2009/12/11 hledger 0.7

price history support (first cut): P directives now work, though differently from ledger. Each posting amount takes its fixed unit price from the price history (or

when available. This is simple and useful for things like foreign currency expenses (but not investment tracking). Like ledger, balance and register don't show amount prices any more, and don't separate differently-priced amounts. Unlike ledger, print shows all amount prices, and supports -B.

web: allow data entry, react to data file changes, better layout, help links, remove histogram command and filter fields for now, fix bad localhost redirect, filter form did not work in eg firefox (issue #7), reset link did not work in all browsers

new "histogram" command shows transaction counts per day or other reporting interval

most commands now work properly with UTF8-encoded text (Sergey Astanin)

invoking as "hours" is now less different: it just uses your timelog, not your ledger

..quarterly/-Q option summarises by quarter

..uncleared/-U option looks only at uncleared transactions

be more accurate about checking balanced amounts, don't rely on display precision

enforce balancing for bracketed virtual postings

fix bug in eliding of posting amounts

don't show trailing spaces on amountless postings

parse null input as an empty ledger

don't treat comments as part of transaction descriptions

require some postings in ledger transactions

require a non-empty description in ledger transactions

don't fail when matching an empty pattern, as in "not:"

make the web server handle the null path

code, api and documentation updates

add a contributor agreement/list

Release stats:

Contributors: Simon Michael, Sergey Astanin

Days since last release: 51

Commits: 101

Lines of non-test code: 2795

Tests: 76

Known errors: 0

2009/04/03 hledger 0.4

announcementThere is also a new website at hledger.org, with screenshots (textual!), a demo (will it survive!?), and docs (not too many!) ... I wrote it because I did not want to hack on c++ and because haskell seemed a good fit ... new happstack-based web interface.

new "web" command serves reports in a web browser (install with -f happs to build this)

make the vty-based curses ui a cabal build option, which will be ignored on MS windows

drop the ..options-anywhere flag, that is now the default

patterns now use not: and desc: prefixes instead of ^ and ^^

patterns are now case-insensitive, like ledger

!include directives are now relative to the including file (Tim Docker)

"Y2009" default year directives are now supported, allowing m/d dates in ledger

when we fail because of more than one missing amount in an entry, show the full entry

document the built-in test runner in ..help

add a ..verbose/-v flag, use it to show more test-running detail

Release stats:

Contributors: Simon Michael, Tim Docker

Lines of non-test code: 1350

Tests: 43

Known errors: 0

2008/10/15 hledger 0.1

announcementI'm pleased to announce the first release of hledger, a command-line accounting tool similar to John Wiegley's c++ ledger. hledger generates simple ledger-compatible transaction & account balance reports from a plain text ledger file. It's simple to use, at least for techies. This has been my "learning Haskell" project, but I think it's also useful. It is much less featureful than ledger, and not quite as fast, but it has the virtue of being fun for haskellers to hack on. I am documenting the code, the app is simple, and I'm not too far up the haskell learning curve, so I think other people learning haskell might enjoy a look. It is currently ~1100 lines of haskell excluding tests. My thanks to John Wiegley for help with compatibility and for his very useful ledger tool. I use it (and now, both of them) daily to track time and money. This is of course a hot topic around our planet. I hope you find it useful or intriguing.