;doc: regen manuals

[ci skip]
This commit is contained in:
Simon Michael 2020-01-22 12:03:39 -08:00
parent 7500002ee5
commit 9710c86c7f
7 changed files with 435 additions and 356 deletions

View File

@ -1275,21 +1275,24 @@ account assets:bank:checking
.fi .fi
.SS Account comments .SS Account comments
.PP .PP
Comments, beginning with a semicolon, optionally including tags, can be Comments, beginning with a semicolon, can be added:
written after the account name, and/or on following lines. .IP \[bu] 2
Eg: on the same line, \f[B]after two or more spaces\f[R] (because ; is
allowed in account names)
.IP \[bu] 2
on the next lines, indented
.PP
An example of both:
.IP .IP
.nf .nf
\f[C] \f[C]
account assets:bank:checking ; a comment account assets:bank:checking ; same-line comment, note 2+ spaces before ;
; another comment ; next-line comment
; acctno:12345, a tag ; another with tag, acctno:12345 (not used yet)
\f[R] \f[R]
.fi .fi
.PP .PP
Tip: comments on the same line require hledger 1.12+. Same-line comments are not supported by Ledger, or hledger <1.13.
If you need your journal to be compatible with older hledger versions,
write comments on the next line instead.
.SS Account subdirectives .SS Account subdirectives
.PP .PP
We also allow (and ignore) Ledger-style indented subdirectives, just for We also allow (and ignore) Ledger-style indented subdirectives, just for

View File

@ -1162,16 +1162,19 @@ File: hledger_journal.info, Node: Account comments, Next: Account subdirective
1.14.7.1 Account comments 1.14.7.1 Account comments
......................... .........................
Comments, beginning with a semicolon, optionally including tags, can be Comments, beginning with a semicolon, can be added:
written after the account name, and/or on following lines. Eg:
account assets:bank:checking ; a comment * on the same line, *after two or more spaces* (because ; is allowed
; another comment in account names)
; acctno:12345, a tag * on the next lines, indented
Tip: comments on the same line require hledger 1.12+. If you need An example of both:
your journal to be compatible with older hledger versions, write
comments on the next line instead. account assets:bank:checking ; same-line comment, note 2+ spaces before ;
; next-line comment
; another with tag, acctno:12345 (not used yet)
Same-line comments are not supported by Ledger, or hledger <1.13.
 
File: hledger_journal.info, Node: Account subdirectives, Next: Account types, Prev: Account comments, Up: Declaring accounts File: hledger_journal.info, Node: Account subdirectives, Next: Account types, Prev: Account comments, Up: Declaring accounts
@ -1825,44 +1828,44 @@ Node: Declaring accounts41126
Ref: #declaring-accounts41302 Ref: #declaring-accounts41302
Node: Account comments42227 Node: Account comments42227
Ref: #account-comments42390 Ref: #account-comments42390
Node: Account subdirectives42785 Node: Account subdirectives42814
Ref: #account-subdirectives42980 Ref: #account-subdirectives43009
Node: Account types43293 Node: Account types43322
Ref: #account-types43477 Ref: #account-types43506
Node: Account display order45119 Node: Account display order45148
Ref: #account-display-order45289 Ref: #account-display-order45318
Node: Rewriting accounts46418 Node: Rewriting accounts46447
Ref: #rewriting-accounts46603 Ref: #rewriting-accounts46632
Node: Basic aliases47329 Node: Basic aliases47358
Ref: #basic-aliases47475 Ref: #basic-aliases47504
Node: Regex aliases48179 Node: Regex aliases48208
Ref: #regex-aliases48351 Ref: #regex-aliases48380
Node: Combining aliases49069 Node: Combining aliases49098
Ref: #combining-aliases49247 Ref: #combining-aliases49276
Node: end aliases50523 Node: end aliases50552
Ref: #end-aliases50671 Ref: #end-aliases50700
Node: Default parent account50772 Node: Default parent account50801
Ref: #default-parent-account50938 Ref: #default-parent-account50967
Node: Periodic transactions51822 Node: Periodic transactions51851
Ref: #periodic-transactions52020 Ref: #periodic-transactions52049
Node: Periodic rule syntax53892 Node: Periodic rule syntax53921
Ref: #periodic-rule-syntax54098 Ref: #periodic-rule-syntax54127
Node: Two spaces between period expression and description!54802 Node: Two spaces between period expression and description!54831
Ref: #two-spaces-between-period-expression-and-description55121 Ref: #two-spaces-between-period-expression-and-description55150
Node: Forecasting with periodic transactions55805 Node: Forecasting with periodic transactions55834
Ref: #forecasting-with-periodic-transactions56110 Ref: #forecasting-with-periodic-transactions56139
Node: Budgeting with periodic transactions58136 Node: Budgeting with periodic transactions58165
Ref: #budgeting-with-periodic-transactions58375 Ref: #budgeting-with-periodic-transactions58404
Node: Auto postings / transaction modifiers58824 Node: Auto postings / transaction modifiers58853
Ref: #auto-postings-transaction-modifiers59035 Ref: #auto-postings-transaction-modifiers59064
Node: Auto postings and dates61264 Node: Auto postings and dates61293
Ref: #auto-postings-and-dates61521 Ref: #auto-postings-and-dates61550
Node: Auto postings and transaction balancing / inferred amounts / balance assertions61696 Node: Auto postings and transaction balancing / inferred amounts / balance assertions61725
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions62071 Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions62100
Node: Auto posting tags62449 Node: Auto posting tags62478
Ref: #auto-posting-tags62688 Ref: #auto-posting-tags62717
Node: EDITOR SUPPORT63353 Node: EDITOR SUPPORT63382
Ref: #editor-support63471 Ref: #editor-support63500
 
End Tag Table End Tag Table

View File

@ -900,16 +900,20 @@ FILE FORMAT
account assets:bank:checking account assets:bank:checking
Account comments Account comments
Comments, beginning with a semicolon, optionally including tags, can be Comments, beginning with a semicolon, can be added:
written after the account name, and/or on following lines. Eg:
account assets:bank:checking ; a comment o on the same line, after two or more spaces (because ; is allowed in
; another comment account names)
; acctno:12345, a tag
Tip: comments on the same line require hledger 1.12+. If you need your o on the next lines, indented
journal to be compatible with older hledger versions, write comments on
the next line instead. An example of both:
account assets:bank:checking ; same-line comment, note 2+ spaces before ;
; next-line comment
; another with tag, acctno:12345 (not used yet)
Same-line comments are not supported by Ledger, or hledger <1.13.
Account subdirectives Account subdirectives
We also allow (and ignore) Ledger-style indented subdirectives, just We also allow (and ignore) Ledger-style indented subdirectives, just

View File

@ -7,15 +7,34 @@ end of a period.
_FLAGS _FLAGS
The closing transaction transfers balances to "equity:closing balances", You can choose to print just one of the transactions by using the
and the opening transaction transfers balances from "equity:opening --opening or --closing flag.
balances", or you can customise these with the --close-to and
--open-from options. You can choose to print just one of the
transactions by using the --opening or --closing flag.
The equity postings appear at the end of the transaction by default; The closing transaction transfers balances to equity:closing balances,
with --interleaved, they appear beside their corresponding closing and the opening transaction transfers balances from
postings. equity:opening balances, by default. You can choose different account
names with the --close-to and --open-from options. If you specify only
one of these, it is used for both.
By default, a single balancing equity posting is added at the end of
these journal entries, with the amount left implicit.
With --x/--explicit, the balancing amount is shown, and if multiple
commodities are involved, multiple single-commodity equity postings are
shown (like the print command).
With --interleaved, the equity postings are shown next to each posting
they balance, which can be better for troubleshooting (and can generate
more postings).
By default, transaction prices in the journal are ignored when
generating the closing/opening transactions. With --show-costs, this
cost information is preserved, so that balance -B reports will be
unchanged after the transition. Separate postings are generated for each
cost in each commodity. Note this can generate very large journal
entries, if you have many foreign currency or investment transactions.
close usage
If you split your journal files by time (eg yearly), you will typically If you split your journal files by time (eg yearly), you will typically
run this command at the end of the year, and save the closing run this command at the end of the year, and save the closing
@ -46,10 +65,6 @@ balance assertions will depend on these flags. Likewise, if you run this
command with --auto, the balance assertions will probably always require command with --auto, the balance assertions will probably always require
--auto. --auto.
When account balances have cost information (transaction prices), the
closing/opening transactions will preserve it, so that eg balance -B
reports will not be affected.
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019, all from

View File

@ -2714,16 +2714,35 @@ Useful for bringing asset/liability balances forward into a new journal
file, or for closing out revenues/expenses to retained earnings at the file, or for closing out revenues/expenses to retained earnings at the
end of a period. end of a period.
.PP .PP
The closing transaction transfers balances to \[dq]equity:closing
balances\[dq], and the opening transaction transfers balances from
\[dq]equity:opening balances\[dq], or you can customise these with the
\f[C]--close-to\f[R] and \f[C]--open-from\f[R] options.
You can choose to print just one of the transactions by using the You can choose to print just one of the transactions by using the
\f[C]--opening\f[R] or \f[C]--closing\f[R] flag. \f[C]--opening\f[R] or \f[C]--closing\f[R] flag.
.PP .PP
The equity postings appear at the end of the transaction by default; The closing transaction transfers balances to
with \f[C]--interleaved\f[R], they appear beside their corresponding \f[C]equity:closing balances\f[R], and the opening transaction transfers
closing postings. balances from \f[C]equity:opening balances\f[R], by default.
You can choose different account names with the \f[C]--close-to\f[R] and
\f[C]--open-from\f[R] options.
If you specify only one of these, it is used for both.
.PP
By default, a single balancing equity posting is added at the end of
these journal entries, with the amount left implicit.
.PP
With \f[C]--x/--explicit\f[R], the balancing amount is shown, and if
multiple commodities are involved, multiple single-commodity equity
postings are shown (like the print command).
.PP
With \f[C]--interleaved\f[R], the equity postings are shown next to each
posting they balance, which can be better for troubleshooting (and can
generate more postings).
.PP
By default, transaction prices in the journal are ignored when
generating the closing/opening transactions.
With \f[C]--show-costs\f[R], this cost information is preserved, so that
\f[C]balance -B\f[R] reports will be unchanged after the transition.
Separate postings are generated for each cost in each commodity.
Note this can generate very large journal entries, if you have many
foreign currency or investment transactions.
.SS close usage
.PP .PP
If you split your journal files by time (eg yearly), you will typically If you split your journal files by time (eg yearly), you will typically
run this command at the end of the year, and save the closing run this command at the end of the year, and save the closing
@ -2761,10 +2780,6 @@ assertions will depend on these flags.
Likewise, if you run this command with --auto, the balance assertions Likewise, if you run this command with --auto, the balance assertions
will probably always require --auto. will probably always require --auto.
.PP .PP
When account balances have cost information (transaction prices), the
closing/opening transactions will preserve it, so that eg balance -B
reports will not be affected.
.PP
Examples: Examples:
.PP .PP
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019, all from

View File

@ -2213,18 +2213,45 @@ Useful for bringing asset/liability balances forward into a new journal
file, or for closing out revenues/expenses to retained earnings at the file, or for closing out revenues/expenses to retained earnings at the
end of a period. end of a period.
The closing transaction transfers balances to "equity:closing You can choose to print just one of the transactions by using the
balances", and the opening transaction transfers balances from '--opening' or '--closing' flag.
"equity:opening balances", or you can customise these with the
'--close-to' and '--open-from' options. You can choose to print just
one of the transactions by using the '--opening' or '--closing' flag.
The equity postings appear at the end of the transaction by default; The closing transaction transfers balances to 'equity:closing
with '--interleaved', they appear beside their corresponding closing balances', and the opening transaction transfers balances from
postings. 'equity:opening balances', by default. You can choose different account
names with the '--close-to' and '--open-from' options. If you specify
only one of these, it is used for both.
If you split your journal files by time (eg yearly), you will By default, a single balancing equity posting is added at the end of
typically run this command at the end of the year, and save the closing these journal entries, with the amount left implicit.
With '--x/--explicit', the balancing amount is shown, and if multiple
commodities are involved, multiple single-commodity equity postings are
shown (like the print command).
With '--interleaved', the equity postings are shown next to each
posting they balance, which can be better for troubleshooting (and can
generate more postings).
By default, transaction prices in the journal are ignored when
generating the closing/opening transactions. With '--show-costs', this
cost information is preserved, so that 'balance -B' reports will be
unchanged after the transition. Separate postings are generated for
each cost in each commodity. Note this can generate very large journal
entries, if you have many foreign currency or investment transactions.
* Menu:
* close usage::

File: hledger.info, Node: close usage, Up: close
4.10.1 close usage
------------------
If you split your journal files by time (eg yearly), you will typically
run this command at the end of the year, and save the closing
transaction as last entry of the old file, and the opening transaction transaction as last entry of the old file, and the opening transaction
as the first entry of the new file. This makes the files self as the first entry of the new file. This makes the files self
contained, so that correct balances are reported no matter which of them contained, so that correct balances are reported no matter which of them
@ -2254,10 +2281,6 @@ balance assertions will depend on these flags. Likewise, if you run
this command with -auto, the balance assertions will probably always this command with -auto, the balance assertions will probably always
require -auto. require -auto.
When account balances have cost information (transaction prices), the
closing/opening transactions will preserve it, so that eg balance -B
reports will not be affected.
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019, all from
@ -3300,74 +3323,76 @@ Node: check-dupes76317
Ref: #check-dupes76441 Ref: #check-dupes76441
Node: close76734 Node: close76734
Ref: #close76848 Ref: #close76848
Node: commodities80666 Node: close usage78492
Ref: #commodities80793 Ref: #close-usage78585
Node: descriptions80875 Node: commodities81430
Ref: #descriptions81003 Ref: #commodities81557
Node: diff81184 Node: descriptions81639
Ref: #diff81290 Ref: #descriptions81767
Node: files82337 Node: diff81948
Ref: #files82437 Ref: #diff82054
Node: help82584 Node: files83101
Ref: #help82684 Ref: #files83201
Node: import83765 Node: help83348
Ref: #import83879 Ref: #help83448
Node: Importing balance assignments84772 Node: import84529
Ref: #importing-balance-assignments84920 Ref: #import84643
Node: incomestatement85569 Node: Importing balance assignments85536
Ref: #incomestatement85702 Ref: #importing-balance-assignments85684
Node: notes87106 Node: incomestatement86333
Ref: #notes87219 Ref: #incomestatement86466
Node: payees87345 Node: notes87870
Ref: #payees87451 Ref: #notes87983
Node: prices87609 Node: payees88109
Ref: #prices87715 Ref: #payees88215
Node: print88056 Node: prices88373
Ref: #print88166 Ref: #prices88479
Node: print-unique92810 Node: print88820
Ref: #print-unique92936 Ref: #print88930
Node: register93221 Node: print-unique93574
Ref: #register93348 Ref: #print-unique93700
Node: Custom register output97520 Node: register93985
Ref: #custom-register-output97649 Ref: #register94112
Node: register-match98911 Node: Custom register output98284
Ref: #register-match99045 Ref: #custom-register-output98413
Node: rewrite99396 Node: register-match99675
Ref: #rewrite99511 Ref: #register-match99809
Node: Re-write rules in a file101366 Node: rewrite100160
Ref: #re-write-rules-in-a-file101500 Ref: #rewrite100275
Node: Diff output format102710 Node: Re-write rules in a file102130
Ref: #diff-output-format102879 Ref: #re-write-rules-in-a-file102264
Node: rewrite vs print --auto103971 Node: Diff output format103474
Ref: #rewrite-vs.-print---auto104150 Ref: #diff-output-format103643
Node: roi104706 Node: rewrite vs print --auto104735
Ref: #roi104804 Ref: #rewrite-vs.-print---auto104914
Node: stats105816 Node: roi105470
Ref: #stats105915 Ref: #roi105568
Node: tags106703 Node: stats106580
Ref: #tags106801 Ref: #stats106679
Node: test107095 Node: tags107467
Ref: #test107179 Ref: #tags107565
Node: ADD-ON COMMANDS107926 Node: test107859
Ref: #add-on-commands108036 Ref: #test107943
Node: Official add-ons109324 Node: ADD-ON COMMANDS108690
Ref: #official-add-ons109464 Ref: #add-on-commands108800
Node: ui109544 Node: Official add-ons110088
Ref: #ui109631 Ref: #official-add-ons110228
Node: web109685 Node: ui110308
Ref: #web109774 Ref: #ui110395
Node: Third party add-ons109820 Node: web110449
Ref: #third-party-add-ons109995 Ref: #web110538
Node: iadd110114 Node: Third party add-ons110584
Ref: #iadd110215 Ref: #third-party-add-ons110759
Node: interest110297 Node: iadd110878
Ref: #interest110406 Ref: #iadd110979
Node: Experimental add-ons110501 Node: interest111061
Ref: #experimental-add-ons110653 Ref: #interest111170
Node: autosync110891 Node: Experimental add-ons111265
Ref: #autosync111002 Ref: #experimental-add-ons111417
Node: chart111241 Node: autosync111655
Ref: #chart111346 Ref: #autosync111766
Node: chart112005
Ref: #chart112110
 
End Tag Table End Tag Table

View File

@ -1949,56 +1949,70 @@ COMMANDS
file, or for closing out revenues/expenses to retained earnings at the file, or for closing out revenues/expenses to retained earnings at the
end of a period. end of a period.
The closing transaction transfers balances to "equity:closing bal- You can choose to print just one of the transactions by using the
ances", and the opening transaction transfers balances from "eq- --opening or --closing flag.
uity:opening balances", or you can customise these with the --close-to
and --open-from options. You can choose to print just one of the
transactions by using the --opening or --closing flag.
The equity postings appear at the end of the transaction by default; The closing transaction transfers balances to equity:closing balances,
with --interleaved, they appear beside their corresponding closing and the opening transaction transfers balances from equity:opening bal-
postings. ances, by default. You can choose different account names with the
--close-to and --open-from options. If you specify only one of these,
it is used for both.
By default, a single balancing equity posting is added at the end of
these journal entries, with the amount left implicit.
With --x/--explicit, the balancing amount is shown, and if multiple
commodities are involved, multiple single-commodity equity postings are
shown (like the print command).
With --interleaved, the equity postings are shown next to each posting
they balance, which can be better for troubleshooting (and can generate
more postings).
By default, transaction prices in the journal are ignored when generat-
ing the closing/opening transactions. With --show-costs, this cost in-
formation is preserved, so that balance -B reports will be unchanged
after the transition. Separate postings are generated for each cost in
each commodity. Note this can generate very large journal entries, if
you have many foreign currency or investment transactions.
close usage
If you split your journal files by time (eg yearly), you will typically If you split your journal files by time (eg yearly), you will typically
run this command at the end of the year, and save the closing transac- run this command at the end of the year, and save the closing transac-
tion as last entry of the old file, and the opening transaction as the tion as last entry of the old file, and the opening transaction as the
first entry of the new file. This makes the files self contained, so first entry of the new file. This makes the files self contained, so
that correct balances are reported no matter which of them are loaded. that correct balances are reported no matter which of them are loaded.
Ie, if you load just one file, the balances are initialised correctly; Ie, if you load just one file, the balances are initialised correctly;
or if you load several files, the redundant closing/opening transac- or if you load several files, the redundant closing/opening transac-
tions cancel each other out. (They will show up in print or register tions cancel each other out. (They will show up in print or register
reports; you can exclude them with a query like not:desc:'(open- reports; you can exclude them with a query like not:desc:'(open-
ing|closing) balances'.) ing|closing) balances'.)
If you're running a business, you might also use this command to "close If you're running a business, you might also use this command to "close
the books" at the end of an accounting period, transferring income the books" at the end of an accounting period, transferring income
statement account balances to retained earnings. (You may want to statement account balances to retained earnings. (You may want to
change the equity account name to something like "equity:retained earn- change the equity account name to something like "equity:retained earn-
ings".) ings".)
By default, the closing transaction is dated yesterday, the balances By default, the closing transaction is dated yesterday, the balances
are calculated as of end of yesterday, and the opening transaction is are calculated as of end of yesterday, and the opening transaction is
dated today. To close on some other date, use: hledger close -e OPEN- dated today. To close on some other date, use: hledger close -e OPEN-
INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019. INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019.
You can also use -p or date:PERIOD (any starting date is ignored). You can also use -p or date:PERIOD (any starting date is ignored).
Both transactions will include balance assertions for the closed/re- Both transactions will include balance assertions for the closed/re-
opened accounts. You probably shouldn't use status or realness filters opened accounts. You probably shouldn't use status or realness filters
(like -C or -R or status:) with this command, or the generated balance (like -C or -R or status:) with this command, or the generated balance
assertions will depend on these flags. Likewise, if you run this com- assertions will depend on these flags. Likewise, if you run this com-
mand with --auto, the balance assertions will probably always require mand with --auto, the balance assertions will probably always require
--auto. --auto.
When account balances have cost information (transaction prices), the
closing/opening transactions will preserve it, so that eg balance -B
reports will not be affected.
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019, all from
command line: command line:
Warning: we use >> here to append; be careful not to type a single > Warning: we use >> here to append; be careful not to type a single >
which would wipe your journal! which would wipe your journal!
$ hledger close -f 2018.journal -e 2019 assets liabilities --opening >>2019.journal $ hledger close -f 2018.journal -e 2019 assets liabilities --opening >>2019.journal
@ -2047,18 +2061,18 @@ COMMANDS
diff diff
diff diff
Compares a particular account's transactions in two input files. It Compares a particular account's transactions in two input files. It
shows any transactions to this account which are in one file but not in shows any transactions to this account which are in one file but not in
the other. the other.
More precisely, for each posting affecting this account in either file, More precisely, for each posting affecting this account in either file,
it looks for a corresponding posting in the other file which posts the it looks for a corresponding posting in the other file which posts the
same amount to the same account (ignoring date, description, etc.) same amount to the same account (ignoring date, description, etc.)
Since postings not transactions are compared, this also works when mul- Since postings not transactions are compared, this also works when mul-
tiple bank transactions have been combined into a single journal entry. tiple bank transactions have been combined into a single journal entry.
This is useful eg if you have downloaded an account's transactions from This is useful eg if you have downloaded an account's transactions from
your bank (eg as CSV data). When hledger and your bank disagree about your bank (eg as CSV data). When hledger and your bank disagree about
the account balance, you can compare the bank data with your journal to the account balance, you can compare the bank data with your journal to
find out the cause. find out the cause.
@ -2076,20 +2090,20 @@ COMMANDS
files files
files files
List all files included in the journal. With a REGEX argument, only List all files included in the journal. With a REGEX argument, only
file names matching the regular expression (case sensitive) are shown. file names matching the regular expression (case sensitive) are shown.
help help
help help
Show any of the hledger manuals. Show any of the hledger manuals.
The help command displays any of the main hledger manuals, in one of The help command displays any of the main hledger manuals, in one of
several ways. Run it with no argument to list the manuals, or provide several ways. Run it with no argument to list the manuals, or provide
a full or partial manual name to select one. a full or partial manual name to select one.
hledger manuals are available in several formats. hledger help will hledger manuals are available in several formats. hledger help will
use the first of these display methods that it finds: info, man, use the first of these display methods that it finds: info, man,
$PAGER, less, stdout (or when non-interactive, just stdout). You can $PAGER, less, stdout (or when non-interactive, just stdout). You can
force a particular viewer with the --info, --man, --pager, --cat flags. force a particular viewer with the --info, --man, --pager, --cat flags.
Examples: Examples:
@ -2116,9 +2130,9 @@ COMMANDS
import import
import import
Read new transactions added to each FILE since last run, and add them Read new transactions added to each FILE since last run, and add them
to the main journal file. Or with --dry-run, just print the transac- to the main journal file. Or with --dry-run, just print the transac-
tions that would be added. Or with --catchup, just mark all of the tions that would be added. Or with --catchup, just mark all of the
FILEs' transactions as imported, without actually importing any. FILEs' transactions as imported, without actually importing any.
The input files are specified as arguments - no need to write -f before The input files are specified as arguments - no need to write -f before
@ -2129,36 +2143,36 @@ COMMANDS
ing transactions are always added to the input files in increasing date ing transactions are always added to the input files in increasing date
order, and by saving .latest.FILE state files. order, and by saving .latest.FILE state files.
The --dry-run output is in journal format, so you can filter it, eg to The --dry-run output is in journal format, so you can filter it, eg to
see only uncategorised transactions: see only uncategorised transactions:
$ hledger import --dry ... | hledger -f- print unknown --ignore-assertions $ hledger import --dry ... | hledger -f- print unknown --ignore-assertions
Importing balance assignments Importing balance assignments
Entries added by import will have their posting amounts made explicit Entries added by import will have their posting amounts made explicit
(like hledger print -x). This means that any balance assignments in (like hledger print -x). This means that any balance assignments in
imported files must be evaluated; but, imported files don't get to see imported files must be evaluated; but, imported files don't get to see
the main file's account balances. As a result, importing entries with the main file's account balances. As a result, importing entries with
balance assignments (eg from an institution that provides only balances balance assignments (eg from an institution that provides only balances
and not posting amounts) will probably generate incorrect posting and not posting amounts) will probably generate incorrect posting
amounts. To avoid this problem, use print instead of import: amounts. To avoid this problem, use print instead of import:
$ hledger print IMPORTFILE [--new] >> $LEDGER_FILE $ hledger print IMPORTFILE [--new] >> $LEDGER_FILE
(If you think import should leave amounts implicit like print does, (If you think import should leave amounts implicit like print does,
please test it and send a pull request.) please test it and send a pull request.)
incomestatement incomestatement
incomestatement, is incomestatement, is
This command displays a simple income statement, showing revenues and This command displays a simple income statement, showing revenues and
expenses during a period. It assumes that these accounts are under a expenses during a period. It assumes that these accounts are under a
top-level revenue or income or expense account (case insensitive, plu- top-level revenue or income or expense account (case insensitive, plu-
ral forms also allowed). Note this report shows all account balances ral forms also allowed). Note this report shows all account balances
with normal positive sign (like conventional financial statements, un- with normal positive sign (like conventional financial statements, un-
like balance/print/register) (experimental). like balance/print/register) (experimental).
This command displays a simple income statement. It currently assumes This command displays a simple income statement. It currently assumes
that you have top-level accounts named income (or revenue) and expense that you have top-level accounts named income (or revenue) and expense
(plural forms also allowed.) (plural forms also allowed.)
$ hledger incomestatement $ hledger incomestatement
@ -2183,12 +2197,12 @@ COMMANDS
0 0
With a reporting interval, multiple columns will be shown, one for each With a reporting interval, multiple columns will be shown, one for each
report period. Normally incomestatement shows revenues/expenses per report period. Normally incomestatement shows revenues/expenses per
period, though as with multicolumn balance reports you can alter the period, though as with multicolumn balance reports you can alter the
report mode with --change/--cumulative/--historical. Instead of abso- report mode with --change/--cumulative/--historical. Instead of abso-
lute values percentages can be displayed with -%. lute values percentages can be displayed with -%.
This command also supports output destination and output format selec- This command also supports output destination and output format selec-
tion. tion.
notes notes
@ -2216,10 +2230,10 @@ COMMANDS
prices prices
prices prices
Print market price directives from the journal. With --costs, also Print market price directives from the journal. With --costs, also
print synthetic market prices based on transaction prices. With --in- print synthetic market prices based on transaction prices. With --in-
verted-costs, also print inverse prices based on transaction prices. verted-costs, also print inverse prices based on transaction prices.
Prices (and postings providing prices) can be filtered by a query. Prices (and postings providing prices) can be filtered by a query.
Price amounts are always displayed with their full precision. Price amounts are always displayed with their full precision.
print print
@ -2227,11 +2241,11 @@ COMMANDS
Show transaction journal entries, sorted by date. Show transaction journal entries, sorted by date.
The print command displays full journal entries (transactions) from the The print command displays full journal entries (transactions) from the
journal file in date order, tidily formatted. With --date2, transac- journal file in date order, tidily formatted. With --date2, transac-
tions are sorted by secondary date instead. tions are sorted by secondary date instead.
print's output is always a valid hledger journal. print's output is always a valid hledger journal.
It preserves all transaction information, but it does not preserve di- It preserves all transaction information, but it does not preserve di-
rectives or inter-transaction comments rectives or inter-transaction comments
$ hledger print $ hledger print
@ -2258,41 +2272,41 @@ COMMANDS
Normally, the journal entry's explicit or implicit amount style is pre- Normally, the journal entry's explicit or implicit amount style is pre-
served. For example, when an amount is omitted in the journal, it will served. For example, when an amount is omitted in the journal, it will
not appear in the output. Similarly, when a transaction price is im- not appear in the output. Similarly, when a transaction price is im-
plied but not written, it will not appear in the output. You can use plied but not written, it will not appear in the output. You can use
the -x/--explicit flag to make all amounts and transaction prices ex- the -x/--explicit flag to make all amounts and transaction prices ex-
plicit, which can be useful for troubleshooting or for making your plicit, which can be useful for troubleshooting or for making your
journal more readable and robust against data entry errors. journal more readable and robust against data entry errors.
Note, -x/--explicit will cause postings with a multi-commodity amount Note, -x/--explicit will cause postings with a multi-commodity amount
(these can arise when a multi-commodity transaction has an implicit (these can arise when a multi-commodity transaction has an implicit
amount) to be split into multiple single-commodity postings, keeping amount) to be split into multiple single-commodity postings, keeping
the output parseable. the output parseable.
With -B/--cost, amounts with transaction prices are converted to cost With -B/--cost, amounts with transaction prices are converted to cost
using that price. This can be used for troubleshooting. using that price. This can be used for troubleshooting.
With -m/--match and a STR argument, print will show at most one trans- With -m/--match and a STR argument, print will show at most one trans-
action: the one one whose description is most similar to STR, and is action: the one one whose description is most similar to STR, and is
most recent. STR should contain at least two characters. If there is most recent. STR should contain at least two characters. If there is
no similar-enough match, no transaction will be shown. no similar-enough match, no transaction will be shown.
With --new, for each FILE being read, hledger reads (and writes) a spe- With --new, for each FILE being read, hledger reads (and writes) a spe-
cial state file (.latest.FILE in the same directory), containing the cial state file (.latest.FILE in the same directory), containing the
latest transaction date(s) that were seen last time FILE was read. latest transaction date(s) that were seen last time FILE was read.
When this file is found, only transactions with newer dates (and new When this file is found, only transactions with newer dates (and new
transactions on the latest date) are printed. This is useful for ig- transactions on the latest date) are printed. This is useful for ig-
noring already-seen entries in import data, such as downloaded CSV noring already-seen entries in import data, such as downloaded CSV
files. Eg: files. Eg:
$ hledger -f bank1.csv print --new $ hledger -f bank1.csv print --new
# shows transactions added since last print --new on this file # shows transactions added since last print --new on this file
This assumes that transactions added to FILE always have same or in- This assumes that transactions added to FILE always have same or in-
creasing dates, and that transactions on the same day do not get re- creasing dates, and that transactions on the same day do not get re-
ordered. See also the import command. ordered. See also the import command.
This command also supports output destination and output format selec- This command also supports output destination and output format selec-
tion. Here's an example of print's CSV output: tion. Here's an example of print's CSV output:
$ hledger print -Ocsv $ hledger print -Ocsv
@ -2309,20 +2323,20 @@ COMMANDS
"5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","","" "5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","",""
"5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","","" "5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","",""
o There is one CSV record per posting, with the parent transaction's o There is one CSV record per posting, with the parent transaction's
fields repeated. fields repeated.
o The "txnidx" (transaction index) field shows which postings belong to o The "txnidx" (transaction index) field shows which postings belong to
the same transaction. (This number might change if transactions are the same transaction. (This number might change if transactions are
reordered within the file, files are parsed/included in a different reordered within the file, files are parsed/included in a different
order, etc.) order, etc.)
o The amount is separated into "commodity" (the symbol) and "amount" o The amount is separated into "commodity" (the symbol) and "amount"
(numeric quantity) fields. (numeric quantity) fields.
o The numeric amount is repeated in either the "credit" or "debit" col- o The numeric amount is repeated in either the "credit" or "debit" col-
umn, for convenience. (Those names are not accurate in the account- umn, for convenience. (Those names are not accurate in the account-
ing sense; it just puts negative amounts under credit and zero or ing sense; it just puts negative amounts under credit and zero or
greater amounts under debit.) greater amounts under debit.)
print-unique print-unique
@ -2346,7 +2360,7 @@ COMMANDS
Show postings and their running total. Show postings and their running total.
The register command displays postings in date order, one per line, and The register command displays postings in date order, one per line, and
their running total. This is typically used with a query selecting a their running total. This is typically used with a query selecting a
particular account, to see that account's activity: particular account, to see that account's activity:
$ hledger register checking $ hledger register checking
@ -2357,8 +2371,8 @@ COMMANDS
With --date2, it shows and sorts by secondary date instead. With --date2, it shows and sorts by secondary date instead.
The --historical/-H flag adds the balance from any undisplayed prior The --historical/-H flag adds the balance from any undisplayed prior
postings to the running total. This is useful when you want to see postings to the running total. This is useful when you want to see
only recent activity, with a historically accurate running balance: only recent activity, with a historically accurate running balance:
$ hledger register checking -b 2008/6 --historical $ hledger register checking -b 2008/6 --historical
@ -2368,18 +2382,18 @@ COMMANDS
The --depth option limits the amount of sub-account detail displayed. The --depth option limits the amount of sub-account detail displayed.
The --average/-A flag shows the running average posting amount instead The --average/-A flag shows the running average posting amount instead
of the running total (so, the final number displayed is the average for of the running total (so, the final number displayed is the average for
the whole report period). This flag implies --empty (see below). It the whole report period). This flag implies --empty (see below). It
is affected by --historical. It works best when showing just one ac- is affected by --historical. It works best when showing just one ac-
count and one commodity. count and one commodity.
The --related/-r flag shows the other postings in the transactions of The --related/-r flag shows the other postings in the transactions of
the postings which would normally be shown. the postings which would normally be shown.
The --invert flag negates all amounts. For example, it can be used on The --invert flag negates all amounts. For example, it can be used on
an income account where amounts are normally displayed as negative num- an income account where amounts are normally displayed as negative num-
bers. It's also useful to show postings on the checking account to- bers. It's also useful to show postings on the checking account to-
gether with the related account: gether with the related account:
$ hledger register --related --invert assets:checking $ hledger register --related --invert assets:checking
@ -2391,7 +2405,7 @@ COMMANDS
2008/01 income:salary $-1 $-1 2008/01 income:salary $-1 $-1
2008/06 income:gifts $-1 $-2 2008/06 income:gifts $-1 $-2
Periods with no activity, and summary postings with a zero amount, are Periods with no activity, and summary postings with a zero amount, are
not shown by default; use the --empty/-E flag to see them: not shown by default; use the --empty/-E flag to see them:
$ hledger register --monthly income -E $ hledger register --monthly income -E
@ -2408,7 +2422,7 @@ COMMANDS
2008/11 0 $-2 2008/11 0 $-2
2008/12 0 $-2 2008/12 0 $-2
Often, you'll want to see just one line per interval. The --depth op- Often, you'll want to see just one line per interval. The --depth op-
tion helps with this, causing subaccounts to be aggregated: tion helps with this, causing subaccounts to be aggregated:
$ hledger register --monthly assets --depth 1h $ hledger register --monthly assets --depth 1h
@ -2416,17 +2430,17 @@ COMMANDS
2008/06 assets $-1 0 2008/06 assets $-1 0
2008/12 assets $-1 $-1 2008/12 assets $-1 $-1
Note when using report intervals, if you specify start/end dates these Note when using report intervals, if you specify start/end dates these
will be adjusted outward if necessary to contain a whole number of in- will be adjusted outward if necessary to contain a whole number of in-
tervals. This ensures that the first and last intervals are full tervals. This ensures that the first and last intervals are full
length and comparable to the others in the report. length and comparable to the others in the report.
Custom register output Custom register output
register uses the full terminal width by default, except on windows. register uses the full terminal width by default, except on windows.
You can override this by setting the COLUMNS environment variable (not You can override this by setting the COLUMNS environment variable (not
a bash shell variable) or by using the --width/-w option. a bash shell variable) or by using the --width/-w option.
The description and account columns normally share the space equally The description and account columns normally share the space equally
(about half of (width - 40) each). You can adjust this by adding a de- (about half of (width - 40) each). You can adjust this by adding a de-
scription width as part of --width's argument, comma-separated: --width scription width as part of --width's argument, comma-separated: --width
W,D . Here's a diagram (won't display correctly in --help): W,D . Here's a diagram (won't display correctly in --help):
@ -2444,27 +2458,27 @@ COMMANDS
$ hledger reg -w 100,40 # set overall width 100, description width 40 $ hledger reg -w 100,40 # set overall width 100, description width 40
$ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40 $ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40
This command also supports output destination and output format selec- This command also supports output destination and output format selec-
tion. tion.
register-match register-match
register-match register-match
Print the one posting whose transaction description is closest to DESC, Print the one posting whose transaction description is closest to DESC,
in the style of the register command. If there are multiple equally in the style of the register command. If there are multiple equally
good matches, it shows the most recent. Query options (options, not good matches, it shows the most recent. Query options (options, not
arguments) can be used to restrict the search space. Helps ledger-au- arguments) can be used to restrict the search space. Helps ledger-au-
tosync detect already-seen transactions when importing. tosync detect already-seen transactions when importing.
rewrite rewrite
rewrite rewrite
Print all transactions, rewriting the postings of matched transactions. Print all transactions, rewriting the postings of matched transactions.
For now the only rewrite available is adding new postings, like print For now the only rewrite available is adding new postings, like print
--auto. --auto.
This is a start at a generic rewriter of transaction entries. It reads This is a start at a generic rewriter of transaction entries. It reads
the default journal and prints the transactions, like print, but adds the default journal and prints the transactions, like print, but adds
one or more specified postings to any transactions matching QUERY. The one or more specified postings to any transactions matching QUERY. The
posting amounts can be fixed, or a multiplier of the existing transac- posting amounts can be fixed, or a multiplier of the existing transac-
tion's first posting amount. tion's first posting amount.
Examples: Examples:
@ -2480,7 +2494,7 @@ COMMANDS
(reserve:grocery) *0.25 ; reserve 25% for grocery (reserve:grocery) *0.25 ; reserve 25% for grocery
(reserve:) *0.25 ; reserve 25% for grocery (reserve:) *0.25 ; reserve 25% for grocery
Note the single quotes to protect the dollar sign from bash, and the Note the single quotes to protect the dollar sign from bash, and the
two spaces between account and amount. two spaces between account and amount.
More: More:
@ -2490,16 +2504,16 @@ COMMANDS
$ hledger rewrite -- expenses:gifts --add-posting '(budget:gifts) *-1"' $ hledger rewrite -- expenses:gifts --add-posting '(budget:gifts) *-1"'
$ hledger rewrite -- ^income --add-posting '(budget:foreign currency) *0.25 JPY; diversify' $ hledger rewrite -- ^income --add-posting '(budget:foreign currency) *0.25 JPY; diversify'
Argument for --add-posting option is a usual posting of transaction Argument for --add-posting option is a usual posting of transaction
with an exception for amount specification. More precisely, you can with an exception for amount specification. More precisely, you can
use '*' (star symbol) before the amount to indicate that that this is a use '*' (star symbol) before the amount to indicate that that this is a
factor for an amount of original matched posting. If the amount in- factor for an amount of original matched posting. If the amount in-
cludes a commodity name, the new posting amount will be in the new com- cludes a commodity name, the new posting amount will be in the new com-
modity; otherwise, it will be in the matched posting amount's commod- modity; otherwise, it will be in the matched posting amount's commod-
ity. ity.
Re-write rules in a file Re-write rules in a file
During the run this tool will execute so called "Automated Transac- During the run this tool will execute so called "Automated Transac-
tions" found in any journal it process. I.e instead of specifying this tions" found in any journal it process. I.e instead of specifying this
operations in command line you can put them in a journal file. operations in command line you can put them in a journal file.
@ -2514,7 +2528,7 @@ COMMANDS
budget:gifts *-1 budget:gifts *-1
assets:budget *1 assets:budget *1
Note that '=' (equality symbol) that is used instead of date in trans- Note that '=' (equality symbol) that is used instead of date in trans-
actions you usually write. It indicates the query by which you want to actions you usually write. It indicates the query by which you want to
match the posting to add new ones. match the posting to add new ones.
@ -2527,12 +2541,12 @@ COMMANDS
--add-posting 'assets:budget *1' \ --add-posting 'assets:budget *1' \
> rewritten-tidy-output.journal > rewritten-tidy-output.journal
It is important to understand that relative order of such entries in It is important to understand that relative order of such entries in
journal is important. You can re-use result of previously added post- journal is important. You can re-use result of previously added post-
ings. ings.
Diff output format Diff output format
To use this tool for batch modification of your journal files you may To use this tool for batch modification of your journal files you may
find useful output in form of unified diff. find useful output in form of unified diff.
$ hledger rewrite -- --diff -f examples/sample.journal '^income' --add-posting '(liabilities:tax) *.33' $ hledger rewrite -- --diff -f examples/sample.journal '^income' --add-posting '(liabilities:tax) *.33'
@ -2556,10 +2570,10 @@ COMMANDS
If you'll pass this through patch tool you'll get transactions contain- If you'll pass this through patch tool you'll get transactions contain-
ing the posting that matches your query be updated. Note that multiple ing the posting that matches your query be updated. Note that multiple
files might be update according to list of input files specified via files might be update according to list of input files specified via
--file options and include directives inside of these files. --file options and include directives inside of these files.
Be careful. Whole transaction being re-formatted in a style of output Be careful. Whole transaction being re-formatted in a style of output
from hledger print. from hledger print.
See also: See also:
@ -2567,48 +2581,48 @@ COMMANDS
https://github.com/simonmichael/hledger/issues/99 https://github.com/simonmichael/hledger/issues/99
rewrite vs. print --auto rewrite vs. print --auto
This command predates print --auto, and currently does much the same This command predates print --auto, and currently does much the same
thing, but with these differences: thing, but with these differences:
o with multiple files, rewrite lets rules in any file affect all other o with multiple files, rewrite lets rules in any file affect all other
files. print --auto uses standard directive scoping; rules affect files. print --auto uses standard directive scoping; rules affect
only child files. only child files.
o rewrite's query limits which transactions can be rewritten; all are o rewrite's query limits which transactions can be rewritten; all are
printed. print --auto's query limits which transactions are printed. printed. print --auto's query limits which transactions are printed.
o rewrite applies rules specified on command line or in the journal. o rewrite applies rules specified on command line or in the journal.
print --auto applies rules specified in the journal. print --auto applies rules specified in the journal.
roi roi
roi roi
Shows the time-weighted (TWR) and money-weighted (IRR) rate of return Shows the time-weighted (TWR) and money-weighted (IRR) rate of return
on your investments. on your investments.
This command assumes that you have account(s) that hold nothing but This command assumes that you have account(s) that hold nothing but
your investments and whenever you record current appraisal/valuation of your investments and whenever you record current appraisal/valuation of
these investments you offset unrealized profit and loss into account(s) these investments you offset unrealized profit and loss into account(s)
that, again, hold nothing but unrealized profit and loss. that, again, hold nothing but unrealized profit and loss.
Any transactions affecting balance of investment account(s) and not Any transactions affecting balance of investment account(s) and not
originating from unrealized profit and loss account(s) are assumed to originating from unrealized profit and loss account(s) are assumed to
be your investments or withdrawals. be your investments or withdrawals.
At a minimum, you need to supply a query (which could be just an ac- At a minimum, you need to supply a query (which could be just an ac-
count name) to select your investments with --inv, and another query to count name) to select your investments with --inv, and another query to
identify your profit and loss transactions with --pnl. identify your profit and loss transactions with --pnl.
It will compute and display the internalized rate of return (IRR) and It will compute and display the internalized rate of return (IRR) and
time-weighted rate of return (TWR) for your investments for the time time-weighted rate of return (TWR) for your investments for the time
period requested. Both rates of return are annualized before display, period requested. Both rates of return are annualized before display,
regardless of the length of reporting interval. regardless of the length of reporting interval.
stats stats
stats stats
Show some journal statistics. Show some journal statistics.
The stats command displays summary information for the whole journal, The stats command displays summary information for the whole journal,
or a matched part of it. With a reporting interval, it shows a report or a matched part of it. With a reporting interval, it shows a report
for each report period. for each report period.
Example: Example:
@ -2626,14 +2640,14 @@ COMMANDS
Commodities : 1 ($) Commodities : 1 ($)
Market prices : 12 ($) Market prices : 12 ($)
This command also supports output destination and output format selec- This command also supports output destination and output format selec-
tion. tion.
tags tags
tags tags
List all the tag names used in the journal. With a TAGREGEX argument, List all the tag names used in the journal. With a TAGREGEX argument,
only tag names matching the regular expression (case insensitive) are only tag names matching the regular expression (case insensitive) are
shown. With QUERY arguments, only transactions matching the query are shown. With QUERY arguments, only transactions matching the query are
considered. With --values flag, the tags' unique values are listed in- considered. With --values flag, the tags' unique values are listed in-
stead. stead.
@ -2641,13 +2655,13 @@ COMMANDS
test test
Run built-in unit tests. Run built-in unit tests.
This command runs the unit tests built in to hledger and hledger-lib, This command runs the unit tests built in to hledger and hledger-lib,
printing the results on stdout. If any test fails, the exit code will printing the results on stdout. If any test fails, the exit code will
be non-zero. be non-zero.
This is mainly used by hledger developers, but you can also use it to This is mainly used by hledger developers, but you can also use it to
sanity-check the installed hledger executable on your platform. All sanity-check the installed hledger executable on your platform. All
tests are expected to pass - if you ever see a failure, please report tests are expected to pass - if you ever see a failure, please report
as a bug! as a bug!
This command also accepts tasty test runner options, written after a -- This command also accepts tasty test runner options, written after a --
@ -2656,32 +2670,32 @@ COMMANDS
$ hledger test -- -pData.Amount --color=never $ hledger test -- -pData.Amount --color=never
For help on these, see https://github.com/feuerbach/tasty#options (-- For help on these, see https://github.com/feuerbach/tasty#options (--
--help currently doesn't show them). --help currently doesn't show them).
ADD-ON COMMANDS ADD-ON COMMANDS
hledger also searches for external add-on commands, and will include hledger also searches for external add-on commands, and will include
these in the commands list. These are programs or scripts in your PATH these in the commands list. These are programs or scripts in your PATH
whose name starts with hledger- and ends with a recognised file exten- whose name starts with hledger- and ends with a recognised file exten-
sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh). sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).
Add-ons can be invoked like any hledger command, but there are a few Add-ons can be invoked like any hledger command, but there are a few
things to be aware of. Eg if the hledger-web add-on is installed, things to be aware of. Eg if the hledger-web add-on is installed,
o hledger -h web shows hledger's help, while hledger web -h shows o hledger -h web shows hledger's help, while hledger web -h shows
hledger-web's help. hledger-web's help.
o Flags specific to the add-on must have a preceding -- to hide them o Flags specific to the add-on must have a preceding -- to hide them
from hledger. So hledger web --serve --port 9000 will be rejected; from hledger. So hledger web --serve --port 9000 will be rejected;
you must use hledger web -- --serve --port 9000. you must use hledger web -- --serve --port 9000.
o You can always run add-ons directly if preferred: hledger-web --serve o You can always run add-ons directly if preferred: hledger-web --serve
--port 9000. --port 9000.
Add-ons are a relatively easy way to add local features or experiment Add-ons are a relatively easy way to add local features or experiment
with new ideas. They can be written in any language, but haskell with new ideas. They can be written in any language, but haskell
scripts have a big advantage: they can use the same hledger (and scripts have a big advantage: they can use the same hledger (and
haskell) library functions that built-in commands do, for command-line haskell) library functions that built-in commands do, for command-line
options, journal parsing, reporting, etc. options, journal parsing, reporting, etc.
Here are some hledger add-ons available: Here are some hledger add-ons available:
@ -2696,7 +2710,7 @@ ADD-ON COMMANDS
hledger-web provides a simple web interface. hledger-web provides a simple web interface.
Third party add-ons Third party add-ons
These are maintained separately, and usually updated shortly after a These are maintained separately, and usually updated shortly after a
hledger release. hledger release.
iadd iadd
@ -2708,35 +2722,35 @@ ADD-ON COMMANDS
ing to various schemes. ing to various schemes.
Experimental add-ons Experimental add-ons
These are available in source form in the hledger repo's bin/ direc- These are available in source form in the hledger repo's bin/ direc-
tory. They may be less mature and documented than built-in commands. tory. They may be less mature and documented than built-in commands.
Reading and tweaking these is a good way to start making your own! Reading and tweaking these is a good way to start making your own!
autosync autosync
hledger-autosync is a symbolic link for easily running ledger-autosync, hledger-autosync is a symbolic link for easily running ledger-autosync,
if installed. ledger-autosync does deduplicating conversion of OFX if installed. ledger-autosync does deduplicating conversion of OFX
data and some CSV formats, and can also download the data if your bank data and some CSV formats, and can also download the data if your bank
offers OFX Direct Connect. offers OFX Direct Connect.
chart chart
hledger-chart.hs is an old very basic pie chart generator. hledger-chart.hs is an old very basic pie chart generator.
ENVIRONMENT ENVIRONMENT
COLUMNS The screen width used by the register command. Default: the COLUMNS The screen width used by the register command. Default: the
full terminal width. full terminal width.
LEDGER_FILE The journal file path when not specified with -f. Default: LEDGER_FILE The journal file path when not specified with -f. Default:
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal). nal).
FILES FILES
Reads data from one or more files in hledger journal, timeclock, time- Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal). C:/Users/USER/.hledger.journal).
LIMITATIONS LIMITATIONS
The need to precede addon command options with -- when invoked from The need to precede addon command options with -- when invoked from
hledger is awkward. hledger is awkward.
When input data contains non-ascii characters, a suitable system locale When input data contains non-ascii characters, a suitable system locale
@ -2752,33 +2766,33 @@ LIMITATIONS
In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger
add. add.
Not all of Ledger's journal file syntax is supported. See file format Not all of Ledger's journal file syntax is supported. See file format
differences. differences.
On large data files, hledger is slower and uses more memory than On large data files, hledger is slower and uses more memory than
Ledger. Ledger.
TROUBLESHOOTING TROUBLESHOOTING
Here are some issues you might encounter when you run hledger (and re- Here are some issues you might encounter when you run hledger (and re-
member you can also seek help from the IRC channel, mail list or bug member you can also seek help from the IRC channel, mail list or bug
tracker): tracker):
Successfully installed, but "No command 'hledger' found" Successfully installed, but "No command 'hledger' found"
stack and cabal install binaries into a special directory, which should stack and cabal install binaries into a special directory, which should
be added to your PATH environment variable. Eg on unix-like systems, be added to your PATH environment variable. Eg on unix-like systems,
that is ~/.local/bin and ~/.cabal/bin respectively. that is ~/.local/bin and ~/.cabal/bin respectively.
I set a custom LEDGER_FILE, but hledger is still using the default file I set a custom LEDGER_FILE, but hledger is still using the default file
LEDGER_FILE should be a real environment variable, not just a shell LEDGER_FILE should be a real environment variable, not just a shell
variable. The command env | grep LEDGER_FILE should show it. You may variable. The command env | grep LEDGER_FILE should show it. You may
need to use export. Here's an explanation. need to use export. Here's an explanation.
"Illegal byte sequence" or "Invalid or incomplete multibyte or wide "Illegal byte sequence" or "Invalid or incomplete multibyte or wide
character" errors character" errors
In order to handle non-ascii letters and symbols (like ), hledger needs In order to handle non-ascii letters and symbols (like ), hledger needs
an appropriate locale. This is usually configured system-wide; you can an appropriate locale. This is usually configured system-wide; you can
also configure it temporarily. The locale may need to be one that sup- also configure it temporarily. The locale may need to be one that sup-
ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always, ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always,
I'm not sure yet). I'm not sure yet).
Here's an example of setting the locale temporarily, on ubuntu Here's an example of setting the locale temporarily, on ubuntu
@ -2797,7 +2811,7 @@ TROUBLESHOOTING
$ echo "export LANG=en_US.UTF-8" >>~/.bash_profile $ echo "export LANG=en_US.UTF-8" >>~/.bash_profile
$ bash --login $ bash --login
If we preferred to use eg fr_FR.utf8, we might have to install that If we preferred to use eg fr_FR.utf8, we might have to install that
first: first:
$ apt-get install language-pack-fr $ apt-get install language-pack-fr
@ -2818,7 +2832,7 @@ TROUBLESHOOTING
REPORTING BUGS REPORTING BUGS
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list) or hledger mail list)
@ -2832,7 +2846,7 @@ COPYRIGHT
SEE ALSO SEE ALSO
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1) dot(5), ledger(1)