From 4285efc0137bd59bd5246d65bb2320f84328780a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 4 Oct 2024 19:13:09 -1000 Subject: [PATCH] ;doc: beancount output: edits --- examples/hledger2beancount.conf | 2 +- hledger/hledger.m4.md | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/hledger2beancount.conf b/examples/hledger2beancount.conf index d5f888a2c..7476be58c 100755 --- a/examples/hledger2beancount.conf +++ b/examples/hledger2beancount.conf @@ -13,7 +13,7 @@ --alias dépenses=expenses # A regex alias that moves the level 2 names up to level 1: -# --alias /^([^:]+):([^:]+)/=\2:\1 +# --alias '/^([^:]+):([^:]+)/=\2:\1' # Print beancount output by default. [print] diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 647ca49f6..f973ad5a5 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -697,15 +697,13 @@ perhaps to query it with [Beancount Query Language] or with the [Fava] web app. #### Beancount account names -hledger will mostly adapt your account names to the more restricted +hledger will try adjust your account names to the more restricted [Beancount account names](https://beancount.github.io/docs/beancount_language_syntax.html#accounts), by - -- replacing unsupported characters with `-` -- capitalising each account name part -- and prepending `B` to any parts which don't begin with a letter or digit +capitalising, replacing unsupported characters with `-`, and/or +prepending `B` to parts which don't begin with a letter or digit. But you must ensure that the top level account names are `Assets`, `Liabilities`, `Equity`, `Income`, and `Expenses`. -If yours are different, you can use [account aliases](#alias-directive), usually in the form of `--alias` options, +If yours are not, you can use [account aliases](#alias-directive), usually in the form of `--alias` options, possibly stored in a [config file](#config-file). (Example: [hledger2beancount.conf](https://github.com/simonmichael/hledger/blob/master/examples/hledger2beancount.conf))