;doc: regen manuals

[ci skip]
This commit is contained in:
Simon Michael 2020-01-20 18:02:42 -08:00
parent 69bc8f803b
commit 090f65ec83
20 changed files with 705 additions and 531 deletions

View File

@ -9,9 +9,9 @@
CSV - how hledger reads CSV data, and the CSV rules file format CSV - how hledger reads CSV data, and the CSV rules file format
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
hledger can read CSV (comma-separated value, or character-separated hledger can read CSV (Comma Separated Value/Character Separated Value)
value) files as if they were journal files, automatically converting files as if they were journal files, automatically converting each CSV
each CSV record into a transaction. record into a transaction.
(To learn about \f[I]writing\f[R] CSV, see CSV output.) (To learn about \f[I]writing\f[R] CSV, see CSV output.)
.PP .PP
We describe each CSV file\[aq]s format with a corresponding \f[I]rules We describe each CSV file\[aq]s format with a corresponding \f[I]rules
@ -83,7 +83,11 @@ inline another CSV rules file
T} T}
.TE .TE
.PP .PP
There\[aq]s also a Convert CSV files tutorial on hledger.org. Note, for best error messages when reading CSV files, use a
\f[C].csv\f[R], \f[C].tsv\f[R] or \f[C].ssv\f[R] file extension or file
prefix - see File Extension below.
.PP
There\[aq]s an introductory Convert CSV files tutorial on hledger.org.
.SH EXAMPLES .SH EXAMPLES
.PP .PP
Here are some sample hledger CSV rules files. Here are some sample hledger CSV rules files.
@ -118,7 +122,7 @@ date-format %d/%m/%Y
.nf .nf
\f[C] \f[C]
$ hledger print -f basic.csv $ hledger print -f basic.csv
2019/11/12 Foo 2019-11-12 Foo
expenses:unknown 10.23 expenses:unknown 10.23
income:unknown -10.23 income:unknown -10.23
\f[R] \f[R]
@ -172,11 +176,11 @@ account1 assets:bank:boi:checking
.nf .nf
\f[C] \f[C]
$ hledger -f bankofireland-checking.csv print $ hledger -f bankofireland-checking.csv print
2012/12/07 LODGMENT 529898 2012-12-07 LODGMENT 529898
assets:bank:boi:checking EUR10.0 = EUR131.2 assets:bank:boi:checking EUR10.0 = EUR131.2
income:unknown EUR-10.0 income:unknown EUR-10.0
2012/12/07 PAYMENT 2012-12-07 PAYMENT
assets:bank:boi:checking EUR-5.0 = EUR126.0 assets:bank:boi:checking EUR-5.0 = EUR126.0
expenses:unknown EUR5.0 expenses:unknown EUR5.0
\f[R] \f[R]
@ -244,11 +248,11 @@ if ,\[rs]$[1-9][.0-9]+(,[\[ha],]*){1}$
.nf .nf
\f[C] \f[C]
$ hledger -f amazon-orders.csv print $ hledger -f amazon-orders.csv print
2012/07/29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed 2012-07-29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
assets:amazon assets:amazon
expenses:misc $20.00 expenses:misc $20.00
2012/07/30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed 2012-07-30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
assets:amazon assets:amazon
expenses:misc $25.00 expenses:misc $25.00
expenses:fees $1.00 expenses:fees $1.00
@ -391,32 +395,32 @@ if Google
.nf .nf
\f[C] \f[C]
$ hledger -f paypal-custom.csv print $ hledger -f paypal-custom.csv print
2019/10/01 (60P57143A8206782E) Calm Radio MONTHLY - $1 for the first 2 Months: Me - Order 99309. Item total: $1.00 USD first 2 months, then $6.99 / Month ; itemid:, fromemail:simon\[at]joyful.com, toemail:memberships\[at]calmradio.com, time:03:46:20, type:Subscription Payment, status:Completed 2019-10-01 (60P57143A8206782E) Calm Radio MONTHLY - $1 for the first 2 Months: Me - Order 99309. Item total: $1.00 USD first 2 months, then $6.99 / Month ; itemid:, fromemail:simon\[at]joyful.com, toemail:memberships\[at]calmradio.com, time:03:46:20, type:Subscription Payment, status:Completed
assets:online:paypal $-6.99 = $-6.99 assets:online:paypal $-6.99 = $-6.99
expenses:online:apps $6.99 expenses:online:apps $6.99
2019/10/01 (0TU1544T080463733) Bank Deposit to PP Account for 60P57143A8206782E ; itemid:, fromemail:, toemail:simon\[at]joyful.com, time:03:46:20, type:Bank Deposit to PP Account, status:Pending 2019-10-01 (0TU1544T080463733) Bank Deposit to PP Account for 60P57143A8206782E ; itemid:, fromemail:, toemail:simon\[at]joyful.com, time:03:46:20, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $6.99 = $0.00 assets:online:paypal $6.99 = $0.00
assets:bank:wf:pchecking $-6.99 assets:bank:wf:pchecking $-6.99
2019/10/01 (2722394R5F586712G) Patreon Patreon* Membership ; itemid:, fromemail:simon\[at]joyful.com, toemail:support\[at]patreon.com, time:08:57:01, type:PreApproved Payment Bill User Payment, status:Completed 2019-10-01 (2722394R5F586712G) Patreon Patreon* Membership ; itemid:, fromemail:simon\[at]joyful.com, toemail:support\[at]patreon.com, time:08:57:01, type:PreApproved Payment Bill User Payment, status:Completed
assets:online:paypal $-7.00 = $-7.00 assets:online:paypal $-7.00 = $-7.00
expenses:dues $7.00 expenses:dues $7.00
2019/10/01 (71854087RG994194F) Bank Deposit to PP Account for 2722394R5F586712G Patreon* Membership ; itemid:, fromemail:, toemail:simon\[at]joyful.com, time:08:57:01, type:Bank Deposit to PP Account, status:Pending 2019-10-01 (71854087RG994194F) Bank Deposit to PP Account for 2722394R5F586712G Patreon* Membership ; itemid:, fromemail:, toemail:simon\[at]joyful.com, time:08:57:01, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $7.00 = $0.00 assets:online:paypal $7.00 = $0.00
assets:bank:wf:pchecking $-7.00 assets:bank:wf:pchecking $-7.00
2019/10/19 (K9U43044RY432050M) Wikimedia Foundation, Inc. Monthly donation to the Wikimedia Foundation ; itemid:, fromemail:simon\[at]joyful.com, toemail:tle\[at]wikimedia.org, time:03:02:12, type:Subscription Payment, status:Completed 2019-10-19 (K9U43044RY432050M) Wikimedia Foundation, Inc. Monthly donation to the Wikimedia Foundation ; itemid:, fromemail:simon\[at]joyful.com, toemail:tle\[at]wikimedia.org, time:03:02:12, type:Subscription Payment, status:Completed
assets:online:paypal $-2.00 = $-2.00 assets:online:paypal $-2.00 = $-2.00
expenses:dues $2.00 expenses:dues $2.00
expenses:banking:paypal ; business: expenses:banking:paypal ; business:
2019/10/19 (3XJ107139A851061F) Bank Deposit to PP Account for K9U43044RY432050M ; itemid:, fromemail:, toemail:simon\[at]joyful.com, time:03:02:12, type:Bank Deposit to PP Account, status:Pending 2019-10-19 (3XJ107139A851061F) Bank Deposit to PP Account for K9U43044RY432050M ; itemid:, fromemail:, toemail:simon\[at]joyful.com, time:03:02:12, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $2.00 = $0.00 assets:online:paypal $2.00 = $0.00
assets:bank:wf:pchecking $-2.00 assets:bank:wf:pchecking $-2.00
2019/10/22 (6L8L1662YP1334033) Noble Benefactor Joyful Systems ; itemid:, fromemail:noble\[at]bene.fac.tor, toemail:simon\[at]joyful.com, time:05:07:06, type:Subscription Payment, status:Completed 2019-10-22 (6L8L1662YP1334033) Noble Benefactor Joyful Systems ; itemid:, fromemail:noble\[at]bene.fac.tor, toemail:simon\[at]joyful.com, time:05:07:06, type:Subscription Payment, status:Completed
assets:online:paypal $9.41 = $9.41 assets:online:paypal $9.41 = $9.41
revenues:foss donations:darcshub $-10.00 ; business: revenues:foss donations:darcshub $-10.00 ; business:
expenses:banking:paypal $0.59 ; business: expenses:banking:paypal $0.59 ; business:
@ -575,6 +579,8 @@ Eg to read TSV (Tab Separated Values), use:
separator TAB separator TAB
\f[R] \f[R]
.fi .fi
.PP
See also: File Extension.
.SS \f[C]if\f[R] .SS \f[C]if\f[R]
.IP .IP
.nf .nf
@ -819,6 +825,32 @@ When CSV values are enclosed in quotes, note:
they must be double quotes (not single quotes) they must be double quotes (not single quotes)
.IP \[bu] 2 .IP \[bu] 2
spaces outside the quotes are not allowed spaces outside the quotes are not allowed
.SS File Extension
.PP
CSV (\[dq]Character Separated Values\[dq]) files should be named with
one of these filename extensions: \f[C].csv\f[R], \f[C].ssv\f[R],
\f[C].tsv\f[R].
Or, the file path should be prefixed with one of \f[C]csv:\f[R],
\f[C]ssv:\f[R], \f[C]tsv:\f[R].
This helps hledger identify the format and show the right error
messages.
For example:
.IP
.nf
\f[C]
$ hledger -f foo.ssv print
\f[R]
.fi
.PP
or:
.IP
.nf
\f[C]
$ cat foo | hledger -f ssv:- foo
\f[R]
.fi
.PP
More about this: Input files in the hledger manual.
.SS Reading multiple CSV files .SS Reading multiple CSV files
.PP .PP
If you use multiple \f[C]-f\f[R] options to read multiple CSV files at If you use multiple \f[C]-f\f[R] options to read multiple CSV files at

View File

@ -6,10 +6,10 @@ File: hledger_csv.info, Node: Top, Next: EXAMPLES, Up: (dir)
hledger_csv(5) hledger 1.16.99 hledger_csv(5) hledger 1.16.99
****************************** ******************************
hledger can read CSV (comma-separated value, or character-separated hledger can read CSV (Comma Separated Value/Character Separated Value)
value) files as if they were journal files, automatically converting files as if they were journal files, automatically converting each CSV
each CSV record into a transaction. (To learn about _writing_ CSV, see record into a transaction. (To learn about _writing_ CSV, see CSV
CSV output.) output.)
We describe each CSV file's format with a corresponding _rules file_. We describe each CSV file's format with a corresponding _rules file_.
By default this is named like the CSV file with a '.rules' extension By default this is named like the CSV file with a '.rules' extension
@ -37,7 +37,11 @@ assignment*
*'newest-first'* disambiguate record order when there's only one date *'newest-first'* disambiguate record order when there's only one date
*'include'* inline another CSV rules file *'include'* inline another CSV rules file
There's also a Convert CSV files tutorial on hledger.org. Note, for best error messages when reading CSV files, use a '.csv',
'.tsv' or '.ssv' file extension or file prefix - see File Extension
below.
There's an introductory Convert CSV files tutorial on hledger.org.
* Menu: * Menu:
@ -81,7 +85,7 @@ fields date, description, _, amount
date-format %d/%m/%Y date-format %d/%m/%Y
$ hledger print -f basic.csv $ hledger print -f basic.csv
2019/11/12 Foo 2019-11-12 Foo
expenses:unknown 10.23 expenses:unknown 10.23
income:unknown -10.23 income:unknown -10.23
@ -128,11 +132,11 @@ currency EUR
account1 assets:bank:boi:checking account1 assets:bank:boi:checking
$ hledger -f bankofireland-checking.csv print $ hledger -f bankofireland-checking.csv print
2012/12/07 LODGMENT 529898 2012-12-07 LODGMENT 529898
assets:bank:boi:checking EUR10.0 = EUR131.2 assets:bank:boi:checking EUR10.0 = EUR131.2
income:unknown EUR-10.0 income:unknown EUR-10.0
2012/12/07 PAYMENT 2012-12-07 PAYMENT
assets:bank:boi:checking EUR-5.0 = EUR126.0 assets:bank:boi:checking EUR-5.0 = EUR126.0
expenses:unknown EUR5.0 expenses:unknown EUR5.0
@ -192,11 +196,11 @@ if ,\$[1-9][.0-9]+(,[^,]*){1}$
amount3 %fees amount3 %fees
$ hledger -f amazon-orders.csv print $ hledger -f amazon-orders.csv print
2012/07/29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed 2012-07-29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
assets:amazon assets:amazon
expenses:misc $20.00 expenses:misc $20.00
2012/07/30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed 2012-07-30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
assets:amazon assets:amazon
expenses:misc $25.00 expenses:misc $25.00
expenses:fees $1.00 expenses:fees $1.00
@ -328,32 +332,32 @@ if Google
description google | music description google | music
$ hledger -f paypal-custom.csv print $ hledger -f paypal-custom.csv print
2019/10/01 (60P57143A8206782E) Calm Radio MONTHLY - $1 for the first 2 Months: Me - Order 99309. Item total: $1.00 USD first 2 months, then $6.99 / Month ; itemid:, fromemail:simon@joyful.com, toemail:memberships@calmradio.com, time:03:46:20, type:Subscription Payment, status:Completed 2019-10-01 (60P57143A8206782E) Calm Radio MONTHLY - $1 for the first 2 Months: Me - Order 99309. Item total: $1.00 USD first 2 months, then $6.99 / Month ; itemid:, fromemail:simon@joyful.com, toemail:memberships@calmradio.com, time:03:46:20, type:Subscription Payment, status:Completed
assets:online:paypal $-6.99 = $-6.99 assets:online:paypal $-6.99 = $-6.99
expenses:online:apps $6.99 expenses:online:apps $6.99
2019/10/01 (0TU1544T080463733) Bank Deposit to PP Account for 60P57143A8206782E ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:46:20, type:Bank Deposit to PP Account, status:Pending 2019-10-01 (0TU1544T080463733) Bank Deposit to PP Account for 60P57143A8206782E ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:46:20, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $6.99 = $0.00 assets:online:paypal $6.99 = $0.00
assets:bank:wf:pchecking $-6.99 assets:bank:wf:pchecking $-6.99
2019/10/01 (2722394R5F586712G) Patreon Patreon* Membership ; itemid:, fromemail:simon@joyful.com, toemail:support@patreon.com, time:08:57:01, type:PreApproved Payment Bill User Payment, status:Completed 2019-10-01 (2722394R5F586712G) Patreon Patreon* Membership ; itemid:, fromemail:simon@joyful.com, toemail:support@patreon.com, time:08:57:01, type:PreApproved Payment Bill User Payment, status:Completed
assets:online:paypal $-7.00 = $-7.00 assets:online:paypal $-7.00 = $-7.00
expenses:dues $7.00 expenses:dues $7.00
2019/10/01 (71854087RG994194F) Bank Deposit to PP Account for 2722394R5F586712G Patreon* Membership ; itemid:, fromemail:, toemail:simon@joyful.com, time:08:57:01, type:Bank Deposit to PP Account, status:Pending 2019-10-01 (71854087RG994194F) Bank Deposit to PP Account for 2722394R5F586712G Patreon* Membership ; itemid:, fromemail:, toemail:simon@joyful.com, time:08:57:01, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $7.00 = $0.00 assets:online:paypal $7.00 = $0.00
assets:bank:wf:pchecking $-7.00 assets:bank:wf:pchecking $-7.00
2019/10/19 (K9U43044RY432050M) Wikimedia Foundation, Inc. Monthly donation to the Wikimedia Foundation ; itemid:, fromemail:simon@joyful.com, toemail:tle@wikimedia.org, time:03:02:12, type:Subscription Payment, status:Completed 2019-10-19 (K9U43044RY432050M) Wikimedia Foundation, Inc. Monthly donation to the Wikimedia Foundation ; itemid:, fromemail:simon@joyful.com, toemail:tle@wikimedia.org, time:03:02:12, type:Subscription Payment, status:Completed
assets:online:paypal $-2.00 = $-2.00 assets:online:paypal $-2.00 = $-2.00
expenses:dues $2.00 expenses:dues $2.00
expenses:banking:paypal ; business: expenses:banking:paypal ; business:
2019/10/19 (3XJ107139A851061F) Bank Deposit to PP Account for K9U43044RY432050M ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:02:12, type:Bank Deposit to PP Account, status:Pending 2019-10-19 (3XJ107139A851061F) Bank Deposit to PP Account for K9U43044RY432050M ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:02:12, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $2.00 = $0.00 assets:online:paypal $2.00 = $0.00
assets:bank:wf:pchecking $-2.00 assets:bank:wf:pchecking $-2.00
2019/10/22 (6L8L1662YP1334033) Noble Benefactor Joyful Systems ; itemid:, fromemail:noble@bene.fac.tor, toemail:simon@joyful.com, time:05:07:06, type:Subscription Payment, status:Completed 2019-10-22 (6L8L1662YP1334033) Noble Benefactor Joyful Systems ; itemid:, fromemail:noble@bene.fac.tor, toemail:simon@joyful.com, time:05:07:06, type:Subscription Payment, status:Completed
assets:online:paypal $9.41 = $9.41 assets:online:paypal $9.41 = $9.41
revenues:foss donations:darcshub $-10.00 ; business: revenues:foss donations:darcshub $-10.00 ; business:
expenses:banking:paypal $0.59 ; business: expenses:banking:paypal $0.59 ; business:
@ -523,6 +527,8 @@ words 'TAB' or 'SPACE'. Eg to read TSV (Tab Separated Values), use:
separator TAB separator TAB
See also: File Extension.
 
File: hledger_csv.info, Node: if, Next: end, Prev: separator, Up: CSV RULES File: hledger_csv.info, Node: if, Next: end, Prev: separator, Up: CSV RULES
@ -705,6 +711,7 @@ File: hledger_csv.info, Node: TIPS, Prev: CSV RULES, Up: Top
* Rapid feedback:: * Rapid feedback::
* Valid CSV:: * Valid CSV::
* File Extension::
* Reading multiple CSV files:: * Reading multiple CSV files::
* Valid transactions:: * Valid transactions::
* Deduplicating importing:: * Deduplicating importing::
@ -731,7 +738,7 @@ a separator each time the command re-runs, making it easier to read the
output. output.
 
File: hledger_csv.info, Node: Valid CSV, Next: Reading multiple CSV files, Prev: Rapid feedback, Up: TIPS File: hledger_csv.info, Node: Valid CSV, Next: File Extension, Prev: Rapid feedback, Up: TIPS
3.2 Valid CSV 3.2 Valid CSV
============= =============
@ -743,9 +750,29 @@ enclosed in quotes, note:
* spaces outside the quotes are not allowed * spaces outside the quotes are not allowed
 
File: hledger_csv.info, Node: Reading multiple CSV files, Next: Valid transactions, Prev: Valid CSV, Up: TIPS File: hledger_csv.info, Node: File Extension, Next: Reading multiple CSV files, Prev: Valid CSV, Up: TIPS
3.3 Reading multiple CSV files 3.3 File Extension
==================
CSV ("Character Separated Values") files should be named with one of
these filename extensions: '.csv', '.ssv', '.tsv'. Or, the file path
should be prefixed with one of 'csv:', 'ssv:', 'tsv:'. This helps
hledger identify the format and show the right error messages. For
example:
$ hledger -f foo.ssv print
or:
$ cat foo | hledger -f ssv:- foo
More about this: Input files in the hledger manual.

File: hledger_csv.info, Node: Reading multiple CSV files, Next: Valid transactions, Prev: File Extension, Up: TIPS
3.4 Reading multiple CSV files
============================== ==============================
If you use multiple '-f' options to read multiple CSV files at once, If you use multiple '-f' options to read multiple CSV files at once,
@ -756,7 +783,7 @@ used for all the CSV files.
 
File: hledger_csv.info, Node: Valid transactions, Next: Deduplicating importing, Prev: Reading multiple CSV files, Up: TIPS File: hledger_csv.info, Node: Valid transactions, Next: Deduplicating importing, Prev: Reading multiple CSV files, Up: TIPS
3.4 Valid transactions 3.5 Valid transactions
====================== ======================
After reading a CSV file, hledger post-processes and validates the After reading a CSV file, hledger post-processes and validates the
@ -775,7 +802,7 @@ $ hledger -f file.csv print | hledger -f- print
 
File: hledger_csv.info, Node: Deduplicating importing, Next: Setting amounts, Prev: Valid transactions, Up: TIPS File: hledger_csv.info, Node: Deduplicating importing, Next: Setting amounts, Prev: Valid transactions, Up: TIPS
3.5 Deduplicating, importing 3.6 Deduplicating, importing
============================ ============================
When you download a CSV file periodically, eg to get your latest bank When you download a CSV file periodically, eg to get your latest bank
@ -805,7 +832,7 @@ CSV data. See:
 
File: hledger_csv.info, Node: Setting amounts, Next: Setting currency/commodity, Prev: Deduplicating importing, Up: TIPS File: hledger_csv.info, Node: Setting amounts, Next: Setting currency/commodity, Prev: Deduplicating importing, Up: TIPS
3.6 Setting amounts 3.7 Setting amounts
=================== ===================
A posting amount can be set in one of these ways: A posting amount can be set in one of these ways:
@ -834,7 +861,7 @@ A posting amount can be set in one of these ways:
 
File: hledger_csv.info, Node: Setting currency/commodity, Next: Referencing other fields, Prev: Setting amounts, Up: TIPS File: hledger_csv.info, Node: Setting currency/commodity, Next: Referencing other fields, Prev: Setting amounts, Up: TIPS
3.7 Setting currency/commodity 3.8 Setting currency/commodity
============================== ==============================
If the currency/commodity symbol is included in the CSV's amount If the currency/commodity symbol is included in the CSV's amount
@ -861,7 +888,7 @@ field(s), you don't have to do anything special.
 
File: hledger_csv.info, Node: Referencing other fields, Next: How CSV rules are evaluated, Prev: Setting currency/commodity, Up: TIPS File: hledger_csv.info, Node: Referencing other fields, Next: How CSV rules are evaluated, Prev: Setting currency/commodity, Up: TIPS
3.8 Referencing other fields 3.9 Referencing other fields
============================ ============================
In field assignments, you can interpolate only CSV fields, not hledger In field assignments, you can interpolate only CSV fields, not hledger
@ -898,8 +925,8 @@ if something
 
File: hledger_csv.info, Node: How CSV rules are evaluated, Prev: Referencing other fields, Up: TIPS File: hledger_csv.info, Node: How CSV rules are evaluated, Prev: Referencing other fields, Up: TIPS
3.9 How CSV rules are evaluated 3.10 How CSV rules are evaluated
=============================== ================================
Here's how to think of CSV rules being evaluated (if you really need Here's how to think of CSV rules being evaluated (if you really need
to). First, to). First,
@ -939,62 +966,64 @@ command the user specified.
 
Tag Table: Tag Table:
Node: Top72 Node: Top72
Node: EXAMPLES1879 Node: EXAMPLES2031
Ref: #examples1985 Ref: #examples2137
Node: Basic2193 Node: Basic2345
Ref: #basic2293 Ref: #basic2445
Node: Bank of Ireland2835 Node: Bank of Ireland2987
Ref: #bank-of-ireland2970 Ref: #bank-of-ireland3122
Node: Amazon4433 Node: Amazon4585
Ref: #amazon4551 Ref: #amazon4703
Node: Paypal6484 Node: Paypal6636
Ref: #paypal6578 Ref: #paypal6730
Node: CSV RULES14461 Node: CSV RULES14613
Ref: #csv-rules14570 Ref: #csv-rules14722
Node: skip14846 Node: skip14998
Ref: #skip14939 Ref: #skip15091
Node: fields15314 Node: fields15466
Ref: #fields15436 Ref: #fields15588
Node: Transaction field names16601 Node: Transaction field names16753
Ref: #transaction-field-names16761 Ref: #transaction-field-names16913
Node: Posting field names16872 Node: Posting field names17024
Ref: #posting-field-names17024 Ref: #posting-field-names17176
Node: field assignment18315 Node: field assignment18467
Ref: #field-assignment18458 Ref: #field-assignment18610
Node: separator19276 Node: separator19428
Ref: #separator19405 Ref: #separator19557
Node: if19786 Node: if19968
Ref: #if19888 Ref: #if20070
Node: end21604 Node: end21786
Ref: #end21710 Ref: #end21892
Node: date-format21934 Node: date-format22116
Ref: #date-format22066 Ref: #date-format22248
Node: newest-first22815 Node: newest-first22997
Ref: #newest-first22953 Ref: #newest-first23135
Node: include23636 Node: include23818
Ref: #include23765 Ref: #include23947
Node: balance-type24209 Node: balance-type24391
Ref: #balance-type24329 Ref: #balance-type24511
Node: TIPS25029 Node: TIPS25211
Ref: #tips25111 Ref: #tips25293
Node: Rapid feedback25348 Node: Rapid feedback25549
Ref: #rapid-feedback25465 Ref: #rapid-feedback25666
Node: Valid CSV25925 Node: Valid CSV26126
Ref: #valid-csv26067 Ref: #valid-csv26256
Node: Reading multiple CSV files26259 Node: File Extension26448
Ref: #reading-multiple-csv-files26439 Ref: #file-extension26600
Node: Valid transactions26680 Node: Reading multiple CSV files27010
Ref: #valid-transactions26858 Ref: #reading-multiple-csv-files27195
Node: Deduplicating importing27486 Node: Valid transactions27436
Ref: #deduplicating-importing27665 Ref: #valid-transactions27614
Node: Setting amounts28698 Node: Deduplicating importing28242
Ref: #setting-amounts28867 Ref: #deduplicating-importing28421
Node: Setting currency/commodity29853 Node: Setting amounts29454
Ref: #setting-currencycommodity30045 Ref: #setting-amounts29623
Node: Referencing other fields30848 Node: Setting currency/commodity30609
Ref: #referencing-other-fields31048 Ref: #setting-currencycommodity30801
Node: How CSV rules are evaluated31945 Node: Referencing other fields31604
Ref: #how-csv-rules-are-evaluated32116 Ref: #referencing-other-fields31804
Node: How CSV rules are evaluated32701
Ref: #how-csv-rules-are-evaluated32874
 
End Tag Table End Tag Table

View File

@ -7,10 +7,10 @@ NAME
CSV - how hledger reads CSV data, and the CSV rules file format CSV - how hledger reads CSV data, and the CSV rules file format
DESCRIPTION DESCRIPTION
hledger can read CSV (comma-separated value, or character-separated hledger can read CSV (Comma Separated Value/Character Separated Value)
value) files as if they were journal files, automatically converting files as if they were journal files, automatically converting each CSV
each CSV record into a transaction. (To learn about writing CSV, see record into a transaction. (To learn about writing CSV, see CSV out-
CSV output.) put.)
We describe each CSV file's format with a corresponding rules file. By We describe each CSV file's format with a corresponding rules file. By
default this is named like the CSV file with a .rules extension added. default this is named like the CSV file with a .rules extension added.
@ -46,7 +46,10 @@ DESCRIPTION
include inline another CSV rules include inline another CSV rules
file file
There's also a Convert CSV files tutorial on hledger.org. Note, for best error messages when reading CSV files, use a .csv, .tsv
or .ssv file extension or file prefix - see File Extension below.
There's an introductory Convert CSV files tutorial on hledger.org.
EXAMPLES EXAMPLES
Here are some sample hledger CSV rules files. See also the full col- Here are some sample hledger CSV rules files. See also the full col-
@ -67,7 +70,7 @@ EXAMPLES
date-format %d/%m/%Y date-format %d/%m/%Y
$ hledger print -f basic.csv $ hledger print -f basic.csv
2019/11/12 Foo 2019-11-12 Foo
expenses:unknown 10.23 expenses:unknown 10.23
income:unknown -10.23 income:unknown -10.23
@ -109,11 +112,11 @@ EXAMPLES
account1 assets:bank:boi:checking account1 assets:bank:boi:checking
$ hledger -f bankofireland-checking.csv print $ hledger -f bankofireland-checking.csv print
2012/12/07 LODGMENT 529898 2012-12-07 LODGMENT 529898
assets:bank:boi:checking EUR10.0 = EUR131.2 assets:bank:boi:checking EUR10.0 = EUR131.2
income:unknown EUR-10.0 income:unknown EUR-10.0
2012/12/07 PAYMENT 2012-12-07 PAYMENT
assets:bank:boi:checking EUR-5.0 = EUR126.0 assets:bank:boi:checking EUR-5.0 = EUR126.0
expenses:unknown EUR5.0 expenses:unknown EUR5.0
@ -168,11 +171,11 @@ EXAMPLES
amount3 %fees amount3 %fees
$ hledger -f amazon-orders.csv print $ hledger -f amazon-orders.csv print
2012/07/29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed 2012-07-29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
assets:amazon assets:amazon
expenses:misc $20.00 expenses:misc $20.00
2012/07/30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed 2012-07-30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
assets:amazon assets:amazon
expenses:misc $25.00 expenses:misc $25.00
expenses:fees $1.00 expenses:fees $1.00
@ -299,32 +302,32 @@ EXAMPLES
description google | music description google | music
$ hledger -f paypal-custom.csv print $ hledger -f paypal-custom.csv print
2019/10/01 (60P57143A8206782E) Calm Radio MONTHLY - $1 for the first 2 Months: Me - Order 99309. Item total: $1.00 USD first 2 months, then $6.99 / Month ; itemid:, fromemail:simon@joyful.com, toemail:memberships@calmradio.com, time:03:46:20, type:Subscription Payment, status:Completed 2019-10-01 (60P57143A8206782E) Calm Radio MONTHLY - $1 for the first 2 Months: Me - Order 99309. Item total: $1.00 USD first 2 months, then $6.99 / Month ; itemid:, fromemail:simon@joyful.com, toemail:memberships@calmradio.com, time:03:46:20, type:Subscription Payment, status:Completed
assets:online:paypal $-6.99 = $-6.99 assets:online:paypal $-6.99 = $-6.99
expenses:online:apps $6.99 expenses:online:apps $6.99
2019/10/01 (0TU1544T080463733) Bank Deposit to PP Account for 60P57143A8206782E ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:46:20, type:Bank Deposit to PP Account, status:Pending 2019-10-01 (0TU1544T080463733) Bank Deposit to PP Account for 60P57143A8206782E ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:46:20, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $6.99 = $0.00 assets:online:paypal $6.99 = $0.00
assets:bank:wf:pchecking $-6.99 assets:bank:wf:pchecking $-6.99
2019/10/01 (2722394R5F586712G) Patreon Patreon* Membership ; itemid:, fromemail:simon@joyful.com, toemail:support@patreon.com, time:08:57:01, type:PreApproved Payment Bill User Payment, status:Completed 2019-10-01 (2722394R5F586712G) Patreon Patreon* Membership ; itemid:, fromemail:simon@joyful.com, toemail:support@patreon.com, time:08:57:01, type:PreApproved Payment Bill User Payment, status:Completed
assets:online:paypal $-7.00 = $-7.00 assets:online:paypal $-7.00 = $-7.00
expenses:dues $7.00 expenses:dues $7.00
2019/10/01 (71854087RG994194F) Bank Deposit to PP Account for 2722394R5F586712G Patreon* Membership ; itemid:, fromemail:, toemail:simon@joyful.com, time:08:57:01, type:Bank Deposit to PP Account, status:Pending 2019-10-01 (71854087RG994194F) Bank Deposit to PP Account for 2722394R5F586712G Patreon* Membership ; itemid:, fromemail:, toemail:simon@joyful.com, time:08:57:01, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $7.00 = $0.00 assets:online:paypal $7.00 = $0.00
assets:bank:wf:pchecking $-7.00 assets:bank:wf:pchecking $-7.00
2019/10/19 (K9U43044RY432050M) Wikimedia Foundation, Inc. Monthly donation to the Wikimedia Foundation ; itemid:, fromemail:simon@joyful.com, toemail:tle@wikimedia.org, time:03:02:12, type:Subscription Payment, status:Completed 2019-10-19 (K9U43044RY432050M) Wikimedia Foundation, Inc. Monthly donation to the Wikimedia Foundation ; itemid:, fromemail:simon@joyful.com, toemail:tle@wikimedia.org, time:03:02:12, type:Subscription Payment, status:Completed
assets:online:paypal $-2.00 = $-2.00 assets:online:paypal $-2.00 = $-2.00
expenses:dues $2.00 expenses:dues $2.00
expenses:banking:paypal ; business: expenses:banking:paypal ; business:
2019/10/19 (3XJ107139A851061F) Bank Deposit to PP Account for K9U43044RY432050M ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:02:12, type:Bank Deposit to PP Account, status:Pending 2019-10-19 (3XJ107139A851061F) Bank Deposit to PP Account for K9U43044RY432050M ; itemid:, fromemail:, toemail:simon@joyful.com, time:03:02:12, type:Bank Deposit to PP Account, status:Pending
assets:online:paypal $2.00 = $0.00 assets:online:paypal $2.00 = $0.00
assets:bank:wf:pchecking $-2.00 assets:bank:wf:pchecking $-2.00
2019/10/22 (6L8L1662YP1334033) Noble Benefactor Joyful Systems ; itemid:, fromemail:noble@bene.fac.tor, toemail:simon@joyful.com, time:05:07:06, type:Subscription Payment, status:Completed 2019-10-22 (6L8L1662YP1334033) Noble Benefactor Joyful Systems ; itemid:, fromemail:noble@bene.fac.tor, toemail:simon@joyful.com, time:05:07:06, type:Subscription Payment, status:Completed
assets:online:paypal $9.41 = $9.41 assets:online:paypal $9.41 = $9.41
revenues:foss donations:darcshub $-10.00 ; business: revenues:foss donations:darcshub $-10.00 ; business:
expenses:banking:paypal $0.59 ; business: expenses:banking:paypal $0.59 ; business:
@ -440,6 +443,8 @@ CSV RULES
separator TAB separator TAB
See also: File Extension.
if if
if PATTERN if PATTERN
RULE RULE
@ -607,6 +612,20 @@ TIPS
o spaces outside the quotes are not allowed o spaces outside the quotes are not allowed
File Extension
CSV ("Character Separated Values") files should be named with one of
these filename extensions: .csv, .ssv, .tsv. Or, the file path should
be prefixed with one of csv:, ssv:, tsv:. This helps hledger identify
the format and show the right error messages. For example:
$ hledger -f foo.ssv print
or:
$ cat foo | hledger -f ssv:- foo
More about this: Input files in the hledger manual.
Reading multiple CSV files Reading multiple CSV files
If you use multiple -f options to read multiple CSV files at once, If you use multiple -f options to read multiple CSV files at once,
hledger will look for a correspondingly-named rules file for each CSV hledger will look for a correspondingly-named rules file for each CSV

View File

@ -156,14 +156,14 @@ unspecified.
.nf .nf
\f[C] \f[C]
$ hledger register checking $ hledger register checking
2010/02/23 movie ticket assets:checking $-10 $-10 2010-02-23 movie ticket assets:checking $-10 $-10
\f[R] \f[R]
.fi .fi
.IP .IP
.nf .nf
\f[C] \f[C]
$ hledger register checking --date2 $ hledger register checking --date2
2010/02/19 movie ticket assets:checking $-10 $-10 2010-02-19 movie ticket assets:checking $-10 $-10
\f[R] \f[R]
.fi .fi
.PP .PP
@ -193,14 +193,14 @@ reconciliation:
.nf .nf
\f[C] \f[C]
$ hledger -f t.j register food $ hledger -f t.j register food
2015/05/30 expenses:food $10 $10 2015-05-30 expenses:food $10 $10
\f[R] \f[R]
.fi .fi
.IP .IP
.nf .nf
\f[C] \f[C]
$ hledger -f t.j register checking $ hledger -f t.j register checking
2015/06/01 assets:checking $-10 $-10 2015-06-01 assets:checking $-10 $-10
\f[R] \f[R]
.fi .fi
.PP .PP
@ -718,7 +718,7 @@ amount to have that price attached:
.nf .nf
\f[C] \f[C]
$ hledger print --explicit $ hledger print --explicit
2019/01/01 2019-01-01
(a) $1 \[at] \[Eu]2 = $1 \[at] \[Eu]2 (a) $1 \[at] \[Eu]2 = $1 \[at] \[Eu]2
\f[R] \f[R]
.fi .fi
@ -1825,12 +1825,12 @@ Some examples:
.nf .nf
\f[C] \f[C]
$ hledger print --auto $ hledger print --auto
2017/12/01 2017-12-01
expenses:food $10 expenses:food $10
assets:checking assets:checking
(liabilities:charity) $-1 (liabilities:charity) $-1
2017/12/14 2017-12-14
expenses:gifts $20 expenses:gifts $20
assets:checking assets:checking
assets:checking:gifts -$20 assets:checking:gifts -$20

View File

@ -189,10 +189,10 @@ the primary date if unspecified.
assets:checking assets:checking
$ hledger register checking $ hledger register checking
2010/02/23 movie ticket assets:checking $-10 $-10 2010-02-23 movie ticket assets:checking $-10 $-10
$ hledger register checking --date2 $ hledger register checking --date2
2010/02/19 movie ticket assets:checking $-10 $-10 2010-02-19 movie ticket assets:checking $-10 $-10
Secondary dates require some effort; you must use them consistently Secondary dates require some effort; you must use them consistently
in your journal entries and remember whether to use or not use the in your journal entries and remember whether to use or not use the
@ -218,10 +218,10 @@ easy bank reconciliation:
assets:checking ; bank cleared it on monday, date:6/1 assets:checking ; bank cleared it on monday, date:6/1
$ hledger -f t.j register food $ hledger -f t.j register food
2015/05/30 expenses:food $10 $10 2015-05-30 expenses:food $10 $10
$ hledger -f t.j register checking $ hledger -f t.j register checking
2015/06/01 assets:checking $-10 $-10 2015-06-01 assets:checking $-10 $-10
DATE should be a simple date; if the year is not specified it will DATE should be a simple date; if the year is not specified it will
use the year of the transaction's date. You can set the secondary date use the year of the transaction's date. You can set the secondary date
@ -709,7 +709,7 @@ amount to have that price attached:
(a) = $1 @ €2 (a) = $1 @ €2
$ hledger print --explicit $ hledger print --explicit
2019/01/01 2019-01-01
(a) $1 @ €2 = $1 @ €2 (a) $1 @ €2 = $1 @ €2
 
@ -1667,12 +1667,12 @@ recorded above it or in another file.
assets:checking assets:checking
$ hledger print --auto $ hledger print --auto
2017/12/01 2017-12-01
expenses:food $10 expenses:food $10
assets:checking assets:checking
(liabilities:charity) $-1 (liabilities:charity) $-1
2017/12/14 2017-12-14
expenses:gifts $20 expenses:gifts $20
assets:checking assets:checking
assets:checking:gifts -$20 assets:checking:gifts -$20

View File

@ -134,10 +134,10 @@ FILE FORMAT
assets:checking assets:checking
$ hledger register checking $ hledger register checking
2010/02/23 movie ticket assets:checking $-10 $-10 2010-02-23 movie ticket assets:checking $-10 $-10
$ hledger register checking --date2 $ hledger register checking --date2
2010/02/19 movie ticket assets:checking $-10 $-10 2010-02-19 movie ticket assets:checking $-10 $-10
Secondary dates require some effort; you must use them consistently in Secondary dates require some effort; you must use them consistently in
your journal entries and remember whether to use or not use the --date2 your journal entries and remember whether to use or not use the --date2
@ -158,10 +158,10 @@ FILE FORMAT
assets:checking ; bank cleared it on monday, date:6/1 assets:checking ; bank cleared it on monday, date:6/1
$ hledger -f t.j register food $ hledger -f t.j register food
2015/05/30 expenses:food $10 $10 2015-05-30 expenses:food $10 $10
$ hledger -f t.j register checking $ hledger -f t.j register checking
2015/06/01 assets:checking $-10 $-10 2015-06-01 assets:checking $-10 $-10
DATE should be a simple date; if the year is not specified it will use DATE should be a simple date; if the year is not specified it will use
the year of the transaction's date. You can set the secondary date the year of the transaction's date. You can set the secondary date
@ -525,7 +525,7 @@ FILE FORMAT
(a) = $1 @ EUR2 (a) = $1 @ EUR2
$ hledger print --explicit $ hledger print --explicit
2019/01/01 2019-01-01
(a) $1 @ EUR2 = $1 @ EUR2 (a) $1 @ EUR2 = $1 @ EUR2
Transaction prices Transaction prices
@ -1332,12 +1332,12 @@ FILE FORMAT
assets:checking assets:checking
$ hledger print --auto $ hledger print --auto
2017/12/01 2017-12-01
expenses:food $10 expenses:food $10
assets:checking assets:checking
(liabilities:charity) $-1 (liabilities:charity) $-1
2017/12/14 2017-12-14
expenses:gifts $20 expenses:gifts $20
assets:checking assets:checking
assets:checking:gifts -$20 assets:checking:gifts -$20

View File

@ -36,13 +36,13 @@ entries:
.nf .nf
\f[C] \f[C]
$ hledger -f t.timeclock print $ hledger -f t.timeclock print
2015/03/30 * optional description after two spaces 2015-03-30 * optional description after two spaces
(some:account name) 0.33h (some:account name) 0.33h
2015/03/31 * 22:21-23:59 2015-03-31 * 22:21-23:59
(another account) 1.64h (another account) 1.64h
2015/04/01 * 00:00-02:00 2015-04-01 * 00:00-02:00
(another account) 2.01h (another account) 2.01h
\f[R] \f[R]
.fi .fi

View File

@ -25,13 +25,13 @@ one day, it is split into several transactions, one for each day. For
the above time log, 'hledger print' generates these journal entries: the above time log, 'hledger print' generates these journal entries:
$ hledger -f t.timeclock print $ hledger -f t.timeclock print
2015/03/30 * optional description after two spaces 2015-03-30 * optional description after two spaces
(some:account name) 0.33h (some:account name) 0.33h
2015/03/31 * 22:21-23:59 2015-03-31 * 22:21-23:59
(another account) 1.64h (another account) 1.64h
2015/04/01 * 00:00-02:00 2015-04-01 * 00:00-02:00
(another account) 2.01h (another account) 2.01h
Here is a sample.timeclock to download and some queries to try: Here is a sample.timeclock to download and some queries to try:

View File

@ -25,13 +25,13 @@ DESCRIPTION
the above time log, hledger print generates these journal entries: the above time log, hledger print generates these journal entries:
$ hledger -f t.timeclock print $ hledger -f t.timeclock print
2015/03/30 * optional description after two spaces 2015-03-30 * optional description after two spaces
(some:account name) 0.33h (some:account name) 0.33h
2015/03/31 * 22:21-23:59 2015-03-31 * 22:21-23:59
(another account) 1.64h (another account) 1.64h
2015/04/01 * 00:00-02:00 2015-04-01 * 00:00-02:00
(another account) 2.01h (another account) 2.01h
Here is a sample.timeclock to download and some queries to try: Here is a sample.timeclock to download and some queries to try:

View File

@ -81,10 +81,10 @@ Reporting:
.nf .nf
\f[C] \f[C]
$ hledger -f t.timedot print date:2016/2/2 $ hledger -f t.timedot print date:2016/2/2
2016/02/02 * 2016-02-02 *
(inc:client1) 2.00 (inc:client1) 2.00
2016/02/02 * 2016-02-02 *
(biz:research) 0.25 (biz:research) 0.25
\f[R] \f[R]
.fi .fi
@ -92,9 +92,9 @@ $ hledger -f t.timedot print date:2016/2/2
.nf .nf
\f[C] \f[C]
$ hledger -f t.timedot bal --daily --tree $ hledger -f t.timedot bal --daily --tree
Balance changes in 2016/02/01-2016/02/03: Balance changes in 2016-02-01-2016-02-03:
|| 2016/02/01d 2016/02/02d 2016/02/03d || 2016-02-01d 2016-02-02d 2016-02-03d
============++======================================== ============++========================================
biz || 0.25 0.25 1.00 biz || 0.25 0.25 1.00
research || 0.25 0.25 1.00 research || 0.25 0.25 1.00

View File

@ -71,16 +71,16 @@ biz:research 1
Reporting: Reporting:
$ hledger -f t.timedot print date:2016/2/2 $ hledger -f t.timedot print date:2016/2/2
2016/02/02 * 2016-02-02 *
(inc:client1) 2.00 (inc:client1) 2.00
2016/02/02 * 2016-02-02 *
(biz:research) 0.25 (biz:research) 0.25
$ hledger -f t.timedot bal --daily --tree $ hledger -f t.timedot bal --daily --tree
Balance changes in 2016/02/01-2016/02/03: Balance changes in 2016-02-01-2016-02-03:
|| 2016/02/01d 2016/02/02d 2016/02/03d || 2016-02-01d 2016-02-02d 2016-02-03d
============++======================================== ============++========================================
biz || 0.25 0.25 1.00 biz || 0.25 0.25 1.00
research || 0.25 0.25 1.00 research || 0.25 0.25 1.00

View File

@ -62,16 +62,16 @@ FILE FORMAT
Reporting: Reporting:
$ hledger -f t.timedot print date:2016/2/2 $ hledger -f t.timedot print date:2016/2/2
2016/02/02 * 2016-02-02 *
(inc:client1) 2.00 (inc:client1) 2.00
2016/02/02 * 2016-02-02 *
(biz:research) 0.25 (biz:research) 0.25
$ hledger -f t.timedot bal --daily --tree $ hledger -f t.timedot bal --daily --tree
Balance changes in 2016/02/01-2016/02/03: Balance changes in 2016-02-01-2016-02-03:
|| 2016/02/01d 2016/02/02d 2016/02/03d || 2016-02-01d 2016-02-02d 2016-02-03d
============++======================================== ============++========================================
biz || 0.25 0.25 1.00 biz || 0.25 0.25 1.00
research || 0.25 0.25 1.00 research || 0.25 0.25 1.00

View File

@ -64,6 +64,13 @@ listen on this IP address (default: 127.0.0.1)
\f[B]\f[CB]--port=PORT\f[B]\f[R] \f[B]\f[CB]--port=PORT\f[B]\f[R]
listen on this TCP port (default: 5000) listen on this TCP port (default: 5000)
.TP .TP
\f[B]\f[CB]--socket=SOCKETFILE\f[B]\f[R]
use a unix domain socket file to listen for requests instead of a TCP
socket.
Implies \f[C]--serve\f[R].
It can only be used if the operating system can provide this type of
socket.
.TP
\f[B]\f[CB]--base-url=URL\f[B]\f[R] \f[B]\f[CB]--base-url=URL\f[B]\f[R]
set the base url (default: http://IPADDR:PORT). set the base url (default: http://IPADDR:PORT).
You would change this when sharing over the network, or integrating You would change this when sharing over the network, or integrating
@ -210,6 +217,26 @@ to listen on all configured addresses.
Similarly, use \f[C]--port\f[R] to set a TCP port other than 5000, eg if Similarly, use \f[C]--port\f[R] to set a TCP port other than 5000, eg if
you are running multiple hledger-web instances. you are running multiple hledger-web instances.
.PP .PP
Both of these options are ignored when \f[C]--socket\f[R] is used.
In this case, it creates an \f[C]AF_UNIX\f[R] socket file at the
supplied path and uses that for communication.
This is an alternative way of running multiple hledger-web instances
behind a reverse proxy that handles authentication for different users.
The path can be derived in a predictable way, eg by using the username
within the path.
As an example, \f[C]nginx\f[R] as reverse proxy can use the variabel
\f[C]$remote_user\f[R] to derive a path from the username used in a HTTP
basic authentication.
The following \f[C]proxy_pass\f[R] directive allows access to all
\f[C]hledger-web\f[R] instances that created a socket in
\f[C]/tmp/hledger/\f[R]:
.IP
.nf
\f[C]
proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;
\f[R]
.fi
.PP
You can use \f[C]--base-url\f[R] to change the protocol, hostname, port You can use \f[C]--base-url\f[R] to change the protocol, hostname, port
and path that appear in hyperlinks, useful eg for integrating and path that appear in hyperlinks, useful eg for integrating
hledger-web within a larger website. hledger-web within a larger website.

View File

@ -60,6 +60,11 @@ before options, as shown in the synopsis above.
'--port=PORT' '--port=PORT'
listen on this TCP port (default: 5000) listen on this TCP port (default: 5000)
'--socket=SOCKETFILE'
use a unix domain socket file to listen for requests instead of a
TCP socket. Implies '--serve'. It can only be used if the
operating system can provide this type of socket.
'--base-url=URL' '--base-url=URL'
set the base url (default: http://IPADDR:PORT). You would change set the base url (default: http://IPADDR:PORT). You would change
@ -209,6 +214,19 @@ only to local requests. You can use '--host' to change this, eg '--host
Similarly, use '--port' to set a TCP port other than 5000, eg if you Similarly, use '--port' to set a TCP port other than 5000, eg if you
are running multiple hledger-web instances. are running multiple hledger-web instances.
Both of these options are ignored when '--socket' is used. In this
case, it creates an 'AF_UNIX' socket file at the supplied path and uses
that for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentication
for different users. The path can be derived in a predictable way, eg
by using the username within the path. As an example, 'nginx' as
reverse proxy can use the variabel '$remote_user' to derive a path from
the username used in a HTTP basic authentication. The following
'proxy_pass' directive allows access to all 'hledger-web' instances that
created a socket in '/tmp/hledger/':
proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;
You can use '--base-url' to change the protocol, hostname, port and You can use '--base-url' to change the protocol, hostname, port and
path that appear in hyperlinks, useful eg for integrating hledger-web path that appear in hyperlinks, useful eg for integrating hledger-web
within a larger website. The default is 'http://HOST:PORT/' using the within a larger website. The default is 'http://HOST:PORT/' using the
@ -343,14 +361,14 @@ Tag Table:
Node: Top72 Node: Top72
Node: OPTIONS1361 Node: OPTIONS1361
Ref: #options1466 Ref: #options1466
Node: PERMISSIONS6790 Node: PERMISSIONS7739
Ref: #permissions6929 Ref: #permissions7878
Node: EDITING UPLOADING DOWNLOADING8141 Node: EDITING UPLOADING DOWNLOADING9090
Ref: #editing-uploading-downloading8322 Ref: #editing-uploading-downloading9271
Node: RELOADING9156 Node: RELOADING10105
Ref: #reloading9290 Ref: #reloading10239
Node: JSON API9723 Node: JSON API10672
Ref: #json-api9817 Ref: #json-api10766
 
End Tag Table End Tag Table

View File

@ -56,6 +56,11 @@ OPTIONS
--port=PORT --port=PORT
listen on this TCP port (default: 5000) listen on this TCP port (default: 5000)
--socket=SOCKETFILE
use a unix domain socket file to listen for requests instead of
a TCP socket. Implies --serve. It can only be used if the op-
erating system can provide this type of socket.
--base-url=URL --base-url=URL
set the base url (default: http://IPADDR:PORT). You would set the base url (default: http://IPADDR:PORT). You would
change this when sharing over the network, or integrating within change this when sharing over the network, or integrating within
@ -200,6 +205,19 @@ OPTIONS
Similarly, use --port to set a TCP port other than 5000, eg if you are Similarly, use --port to set a TCP port other than 5000, eg if you are
running multiple hledger-web instances. running multiple hledger-web instances.
Both of these options are ignored when --socket is used. In this case,
it creates an AF_UNIX socket file at the supplied path and uses that
for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentica-
tion for different users. The path can be derived in a predictable
way, eg by using the username within the path. As an example, nginx as
reverse proxy can use the variabel $remote_user to derive a path from
the username used in a HTTP basic authentication. The following
proxy_pass directive allows access to all hledger-web instances that
created a socket in /tmp/hledger/:
proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;
You can use --base-url to change the protocol, hostname, port and path You can use --base-url to change the protocol, hostname, port and path
that appear in hyperlinks, useful eg for integrating hledger-web within that appear in hyperlinks, useful eg for integrating hledger-web within
a larger website. The default is http://HOST:PORT/ using the server's a larger website. The default is http://HOST:PORT/ using the server's

View File

@ -13,6 +13,10 @@ balances", or you can customise these with the --close-to and
--open-from options. You can choose to print just one of the --open-from options. You can choose to print just one of the
transactions by using the --opening or --closing flag. transactions by using the --opening or --closing flag.
The equity postings appear at the end of the transaction by default;
with --interleaved, they appear beside their corresponding closing
postings.
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
transaction as last entry of the old file, and the opening transaction transaction as last entry of the old file, and the opening transaction

View File

@ -34,13 +34,17 @@ $ hledger print
assets:bank:checking $-1 assets:bank:checking $-1
Normally, the journal entry's explicit or implicit amount style is Normally, the journal entry's explicit or implicit amount style is
preserved. Ie when an amount is omitted in the journal, it will be preserved. For example, when an amount is omitted in the journal, it
omitted in the output. You can use the -x/--explicit flag to make all will not appear in the output. Similarly, when a transaction price is
amounts explicit, which can be useful for troubleshooting or for making implied but not written, it will not appear in the output. You can use
your journal more readable and robust against data entry errors. Note, the -x/--explicit flag to make all amounts and transaction prices
-x will cause postings with a multi-commodity amount (these can arise explicit, which can be useful for troubleshooting or for making your
when a multi-commodity transaction has an implicit amount) will be split journal more readable and robust against data entry errors.
into multiple single-commodity postings, for valid journal output.
Note, -x/--explicit will cause postings with a multi-commodity amount
(these can arise when a multi-commodity transaction has an implicit
amount) to be split into multiple single-commodity postings, keeping 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.

View File

@ -94,11 +94,11 @@ Some basic reports:
.nf .nf
\f[C] \f[C]
$ hledger print $ hledger print
2015/09/30 gift received 2015-09-30 gift received
assets:cash $20 assets:cash $20
income:gifts $-20 income:gifts $-20
2015/10/16 farmers market 2015-10-16 farmers market
expenses:food $10 expenses:food $10
assets:cash $-10 assets:cash $-10
\f[R] \f[R]
@ -130,8 +130,8 @@ $ hledger balance
.nf .nf
\f[C] \f[C]
$ hledger register cash $ hledger register cash
2015/09/30 gift received assets:cash $20 $20 2015-09-30 gift received assets:cash $20 $20
2015/10/16 farmers market assets:cash $-10 $10 2015-10-16 farmers market assets:cash $-10 $10
\f[R] \f[R]
.fi .fi
.PP .PP
@ -1210,13 +1210,13 @@ Show the cost of each posting:
.nf .nf
\f[C] \f[C]
$ hledger -f- print --value=cost $ hledger -f- print --value=cost
2000/01/01 2000-01-01
(a) 5 B (a) 5 B
2000/02/01 2000-02-01
(a) 6 B (a) 6 B
2000/03/01 2000-03-01
(a) 7 B (a) 7 B
\f[R] \f[R]
.fi .fi
@ -1240,13 +1240,13 @@ of the journal (2000-03-01):
.nf .nf
\f[C] \f[C]
$ hledger -f- print --value=end $ hledger -f- print --value=end
2000/01/01 2000-01-01
(a) 3 B (a) 3 B
2000/02/01 2000-02-01
(a) 3 B (a) 3 B
2000/03/01 2000-03-01
(a) 3 B (a) 3 B
\f[R] \f[R]
.fi .fi
@ -1272,13 +1272,13 @@ Show the value on 2000/01/15:
.nf .nf
\f[C] \f[C]
$ hledger -f- print --value=2000-01-15 $ hledger -f- print --value=2000-01-15
2000/01/01 2000-01-01
(a) 1 B (a) 1 B
2000/02/01 2000-02-01
(a) 1 B (a) 1 B
2000/03/01 2000-03-01
(a) 1 B (a) 1 B
\f[R] \f[R]
.fi .fi
@ -1300,7 +1300,7 @@ P 2000-01-01 A 2B
.nf .nf
\f[C] \f[C]
$ hledger print -x -X A $ hledger print -x -X A
2000/01/01 2000-01-01
a 0 a 0
b 0 b 0
\f[R] \f[R]
@ -1327,7 +1327,7 @@ commodity 0.00A
.nf .nf
\f[C] \f[C]
$ hledger print -X A $ hledger print -X A
2000/01/01 2000-01-01
a 0.50A a 0.50A
b -0.50A b -0.50A
\f[R] \f[R]
@ -2721,6 +2721,10 @@ balances\[dq], and the opening transaction transfers balances from
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;
with \f[C]--interleaved\f[R], they appear beside their corresponding
closing postings.
.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
transaction as last entry of the old file, and the opening transaction transaction as last entry of the old file, and the opening transaction
@ -3123,15 +3127,19 @@ $ hledger print
.PP .PP
Normally, the journal entry\[aq]s explicit or implicit amount style is Normally, the journal entry\[aq]s explicit or implicit amount style is
preserved. preserved.
Ie when an amount is omitted in the journal, it will be omitted in the For example, when an amount is omitted in the journal, it will not
output. appear in the output.
Similarly, when a transaction price is implied but not written, it will
not appear in the output.
You can use the \f[C]-x\f[R]/\f[C]--explicit\f[R] flag to make all You can use the \f[C]-x\f[R]/\f[C]--explicit\f[R] flag to make all
amounts explicit, which can be useful for troubleshooting or for making amounts and transaction prices explicit, which can be useful for
your journal more readable and robust against data entry errors. troubleshooting or for making your journal more readable and robust
Note, \f[C]-x\f[R] will cause postings with a multi-commodity amount against data entry errors.
(these can arise when a multi-commodity transaction has an implicit .PP
amount) will be split into multiple single-commodity postings, for valid Note, \f[C]-x\f[R]/\f[C]--explicit\f[R] will cause postings with a
journal output. multi-commodity amount (these can arise when a multi-commodity
transaction has an implicit amount) to be split into multiple
single-commodity postings, keeping the output parseable.
.PP .PP
With \f[C]-B\f[R]/\f[C]--cost\f[R], amounts with transaction prices are With \f[C]-B\f[R]/\f[C]--cost\f[R], amounts with transaction prices are
converted to cost using that price. converted to cost using that price.

View File

@ -68,11 +68,11 @@ Two simple transactions in hledger journal format:
Some basic reports: Some basic reports:
$ hledger print $ hledger print
2015/09/30 gift received 2015-09-30 gift received
assets:cash $20 assets:cash $20
income:gifts $-20 income:gifts $-20
2015/10/16 farmers market 2015-10-16 farmers market
expenses:food $10 expenses:food $10
assets:cash $-10 assets:cash $-10
@ -92,8 +92,8 @@ $ hledger balance
0 0
$ hledger register cash $ hledger register cash
2015/09/30 gift received assets:cash $20 $20 2015-09-30 gift received assets:cash $20 $20
2015/10/16 farmers market assets:cash $-10 $10 2015-10-16 farmers market assets:cash $-10 $10
More commands: More commands:
@ -932,13 +932,13 @@ P 2000-04-01 A 4 B
Show the cost of each posting: Show the cost of each posting:
$ hledger -f- print --value=cost $ hledger -f- print --value=cost
2000/01/01 2000-01-01
(a) 5 B (a) 5 B
2000/02/01 2000-02-01
(a) 6 B (a) 6 B
2000/03/01 2000-03-01
(a) 7 B (a) 7 B
Show the value as of the last day of the report period (2000-02-29): Show the value as of the last day of the report period (2000-02-29):
@ -954,13 +954,13 @@ $ hledger -f- print --value=end date:2000/01-2000/03
day of the journal (2000-03-01): day of the journal (2000-03-01):
$ hledger -f- print --value=end $ hledger -f- print --value=end
2000/01/01 2000-01-01
(a) 3 B (a) 3 B
2000/02/01 2000-02-01
(a) 3 B (a) 3 B
2000/03/01 2000-03-01
(a) 3 B (a) 3 B
Show the current value (the 2000-04-01 price is still in effect Show the current value (the 2000-04-01 price is still in effect
@ -979,13 +979,13 @@ $ hledger -f- print --value=now
Show the value on 2000/01/15: Show the value on 2000/01/15:
$ hledger -f- print --value=2000-01-15 $ hledger -f- print --value=2000-01-15
2000/01/01 2000-01-01
(a) 1 B (a) 1 B
2000/02/01 2000-02-01
(a) 1 B (a) 1 B
2000/03/01 2000-03-01
(a) 1 B (a) 1 B
You may need to explicitly set a commodity's display style, when You may need to explicitly set a commodity's display style, when
@ -998,7 +998,7 @@ P 2000-01-01 A 2B
b b
$ hledger print -x -X A $ hledger print -x -X A
2000/01/01 2000-01-01
a 0 a 0
b 0 b 0
@ -1016,7 +1016,7 @@ commodity 0.00A
b b
$ hledger print -X A $ hledger print -X A
2000/01/01 2000-01-01
a 0.50A a 0.50A
b -0.50A b -0.50A
@ -2219,6 +2219,10 @@ balances", and the opening transaction transfers balances from
'--close-to' and '--open-from' options. You can choose to print just '--close-to' and '--open-from' options. You can choose to print just
one of the transactions by using the '--opening' or '--closing' flag. one of the transactions by using the '--opening' or '--closing' flag.
The equity postings appear at the end of the transaction by default;
with '--interleaved', they appear beside their corresponding closing
postings.
If you split your journal files by time (eg yearly), you will 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 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
@ -2583,13 +2587,17 @@ $ hledger print
assets:bank:checking $-1 assets:bank:checking $-1
Normally, the journal entry's explicit or implicit amount style is Normally, the journal entry's explicit or implicit amount style is
preserved. Ie when an amount is omitted in the journal, it will be preserved. For example, when an amount is omitted in the journal, it
omitted in the output. You can use the '-x'/'--explicit' flag to make will not appear in the output. Similarly, when a transaction price is
all amounts explicit, which can be useful for troubleshooting or for implied but not written, it will not appear in the output. You can use
making your journal more readable and robust against data entry errors. the '-x'/'--explicit' flag to make all amounts and transaction prices
Note, '-x' will cause postings with a multi-commodity amount (these can explicit, which can be useful for troubleshooting or for making your
arise when a multi-commodity transaction has an implicit amount) will be journal more readable and robust against data entry errors.
split into multiple single-commodity postings, for valid journal output.
Note, '-x'/'--explicit' will cause postings with a multi-commodity
amount (these can arise when a multi-commodity transaction has an
implicit amount) to be split into multiple single-commodity postings,
keeping the output parseable.
With '-B'/'--cost', amounts with transaction prices are converted to With '-B'/'--cost', amounts with transaction prices are converted to
cost using that price. This can be used for troubleshooting. cost using that price. This can be used for troubleshooting.
@ -3292,74 +3300,74 @@ Node: check-dupes76317
Ref: #check-dupes76441 Ref: #check-dupes76441
Node: close76734 Node: close76734
Ref: #close76848 Ref: #close76848
Node: commodities80514 Node: commodities80666
Ref: #commodities80641 Ref: #commodities80793
Node: descriptions80723 Node: descriptions80875
Ref: #descriptions80851 Ref: #descriptions81003
Node: diff81032 Node: diff81184
Ref: #diff81138 Ref: #diff81290
Node: files82185 Node: files82337
Ref: #files82285 Ref: #files82437
Node: help82432 Node: help82584
Ref: #help82532 Ref: #help82684
Node: import83613 Node: import83765
Ref: #import83727 Ref: #import83879
Node: Importing balance assignments84620 Node: Importing balance assignments84772
Ref: #importing-balance-assignments84768 Ref: #importing-balance-assignments84920
Node: incomestatement85417 Node: incomestatement85569
Ref: #incomestatement85550 Ref: #incomestatement85702
Node: notes86954 Node: notes87106
Ref: #notes87067 Ref: #notes87219
Node: payees87193 Node: payees87345
Ref: #payees87299 Ref: #payees87451
Node: prices87457 Node: prices87609
Ref: #prices87563 Ref: #prices87715
Node: print87904 Node: print88056
Ref: #print88014 Ref: #print88166
Node: print-unique92507 Node: print-unique92810
Ref: #print-unique92633 Ref: #print-unique92936
Node: register92918 Node: register93221
Ref: #register93045 Ref: #register93348
Node: Custom register output97217 Node: Custom register output97520
Ref: #custom-register-output97346 Ref: #custom-register-output97649
Node: register-match98608 Node: register-match98911
Ref: #register-match98742 Ref: #register-match99045
Node: rewrite99093 Node: rewrite99396
Ref: #rewrite99208 Ref: #rewrite99511
Node: Re-write rules in a file101063 Node: Re-write rules in a file101366
Ref: #re-write-rules-in-a-file101197 Ref: #re-write-rules-in-a-file101500
Node: Diff output format102407 Node: Diff output format102710
Ref: #diff-output-format102576 Ref: #diff-output-format102879
Node: rewrite vs print --auto103668 Node: rewrite vs print --auto103971
Ref: #rewrite-vs.-print---auto103847 Ref: #rewrite-vs.-print---auto104150
Node: roi104403 Node: roi104706
Ref: #roi104501 Ref: #roi104804
Node: stats105513 Node: stats105816
Ref: #stats105612 Ref: #stats105915
Node: tags106400 Node: tags106703
Ref: #tags106498 Ref: #tags106801
Node: test106792 Node: test107095
Ref: #test106876 Ref: #test107179
Node: ADD-ON COMMANDS107623 Node: ADD-ON COMMANDS107926
Ref: #add-on-commands107733 Ref: #add-on-commands108036
Node: Official add-ons109021 Node: Official add-ons109324
Ref: #official-add-ons109161 Ref: #official-add-ons109464
Node: ui109241 Node: ui109544
Ref: #ui109328 Ref: #ui109631
Node: web109382 Node: web109685
Ref: #web109471 Ref: #web109774
Node: Third party add-ons109517 Node: Third party add-ons109820
Ref: #third-party-add-ons109692 Ref: #third-party-add-ons109995
Node: iadd109811 Node: iadd110114
Ref: #iadd109912 Ref: #iadd110215
Node: interest109994 Node: interest110297
Ref: #interest110103 Ref: #interest110406
Node: Experimental add-ons110198 Node: Experimental add-ons110501
Ref: #experimental-add-ons110350 Ref: #experimental-add-ons110653
Node: autosync110588 Node: autosync110891
Ref: #autosync110699 Ref: #autosync111002
Node: chart110938 Node: chart111241
Ref: #chart111043 Ref: #chart111346
 
End Tag Table End Tag Table

View File

@ -68,11 +68,11 @@ EXAMPLES
Some basic reports: Some basic reports:
$ hledger print $ hledger print
2015/09/30 gift received 2015-09-30 gift received
assets:cash $20 assets:cash $20
income:gifts $-20 income:gifts $-20
2015/10/16 farmers market 2015-10-16 farmers market
expenses:food $10 expenses:food $10
assets:cash $-10 assets:cash $-10
@ -92,8 +92,8 @@ EXAMPLES
0 0
$ hledger register cash $ hledger register cash
2015/09/30 gift received assets:cash $20 $20 2015-09-30 gift received assets:cash $20 $20
2015/10/16 farmers market assets:cash $-10 $10 2015-10-16 farmers market assets:cash $-10 $10
More commands: More commands:
@ -829,13 +829,13 @@ OPTIONS
Show the cost of each posting: Show the cost of each posting:
$ hledger -f- print --value=cost $ hledger -f- print --value=cost
2000/01/01 2000-01-01
(a) 5 B (a) 5 B
2000/02/01 2000-02-01
(a) 6 B (a) 6 B
2000/03/01 2000-03-01
(a) 7 B (a) 7 B
Show the value as of the last day of the report period (2000-02-29): Show the value as of the last day of the report period (2000-02-29):
@ -851,13 +851,13 @@ OPTIONS
day of the journal (2000-03-01): day of the journal (2000-03-01):
$ hledger -f- print --value=end $ hledger -f- print --value=end
2000/01/01 2000-01-01
(a) 3 B (a) 3 B
2000/02/01 2000-02-01
(a) 3 B (a) 3 B
2000/03/01 2000-03-01
(a) 3 B (a) 3 B
Show the current value (the 2000-04-01 price is still in effect today): Show the current value (the 2000-04-01 price is still in effect today):
@ -875,13 +875,13 @@ OPTIONS
Show the value on 2000/01/15: Show the value on 2000/01/15:
$ hledger -f- print --value=2000-01-15 $ hledger -f- print --value=2000-01-15
2000/01/01 2000-01-01
(a) 1 B (a) 1 B
2000/02/01 2000-02-01
(a) 1 B (a) 1 B
2000/03/01 2000-03-01
(a) 1 B (a) 1 B
You may need to explicitly set a commodity's display style, when re- You may need to explicitly set a commodity's display style, when re-
@ -894,7 +894,7 @@ OPTIONS
b b
$ hledger print -x -X A $ hledger print -x -X A
2000/01/01 2000-01-01
a 0 a 0
b 0 b 0
@ -912,7 +912,7 @@ OPTIONS
b b
$ hledger print -X A $ hledger print -X A
2000/01/01 2000-01-01
a 0.50A a 0.50A
b -0.50A b -0.50A
@ -1955,6 +1955,10 @@ COMMANDS
and --open-from options. You can choose to print just one of the and --open-from options. You can choose to print just one of the
transactions by using the --opening or --closing flag. transactions by using the --opening or --closing flag.
The equity postings appear at the end of the transaction by default;
with --interleaved, they appear beside their corresponding closing
postings.
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
@ -2253,14 +2257,17 @@ COMMANDS
assets:bank:checking $-1 assets:bank:checking $-1
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. Ie when an amount is omitted in the journal, it will be omit- served. For example, when an amount is omitted in the journal, it will
ted in the output. You can use the -x/--explicit flag to make all not appear in the output. Similarly, when a transaction price is im-
amounts explicit, which can be useful for troubleshooting or for making plied but not written, it will not appear in the output. You can use
your journal more readable and robust against data entry errors. Note, the -x/--explicit flag to make all amounts and transaction prices ex-
-x will cause postings with a multi-commodity amount (these can arise plicit, which can be useful for troubleshooting or for making your
when a multi-commodity transaction has an implicit amount) will be journal more readable and robust against data entry errors.
split into multiple single-commodity postings, for valid journal out-
put. Note, -x/--explicit will cause postings with a multi-commodity amount
(these can arise when a multi-commodity transaction has an implicit
amount) to be split into multiple single-commodity postings, keeping
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.