;doc: regen manuals
[ci skip]
This commit is contained in:
parent
69bc8f803b
commit
090f65ec83
@ -9,9 +9,9 @@
|
||||
CSV - how hledger reads CSV data, and the CSV rules file format
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
hledger can read CSV (comma-separated value, or character-separated
|
||||
value) files as if they were journal files, automatically converting
|
||||
each CSV record into a transaction.
|
||||
hledger can read CSV (Comma Separated Value/Character Separated Value)
|
||||
files as if they were journal files, automatically converting each CSV
|
||||
record into a transaction.
|
||||
(To learn about \f[I]writing\f[R] CSV, see CSV output.)
|
||||
.PP
|
||||
We describe each CSV file\[aq]s format with a corresponding \f[I]rules
|
||||
@ -83,7 +83,11 @@ inline another CSV rules file
|
||||
T}
|
||||
.TE
|
||||
.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
|
||||
.PP
|
||||
Here are some sample hledger CSV rules files.
|
||||
@ -118,7 +122,7 @@ date-format %d/%m/%Y
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger print -f basic.csv
|
||||
2019/11/12 Foo
|
||||
2019-11-12 Foo
|
||||
expenses:unknown 10.23
|
||||
income:unknown -10.23
|
||||
\f[R]
|
||||
@ -172,11 +176,11 @@ account1 assets:bank:boi:checking
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f bankofireland-checking.csv print
|
||||
2012/12/07 LODGMENT 529898
|
||||
2012-12-07 LODGMENT 529898
|
||||
assets:bank:boi:checking EUR10.0 = EUR131.2
|
||||
income:unknown EUR-10.0
|
||||
|
||||
2012/12/07 PAYMENT
|
||||
2012-12-07 PAYMENT
|
||||
assets:bank:boi:checking EUR-5.0 = EUR126.0
|
||||
expenses:unknown EUR5.0
|
||||
\f[R]
|
||||
@ -244,11 +248,11 @@ if ,\[rs]$[1-9][.0-9]+(,[\[ha],]*){1}$
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f amazon-orders.csv print
|
||||
2012/07/29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
|
||||
2012-07-29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
|
||||
assets:amazon
|
||||
expenses:misc $20.00
|
||||
|
||||
2012/07/30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
|
||||
2012-07-30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
|
||||
assets:amazon
|
||||
expenses:misc $25.00
|
||||
expenses:fees $1.00
|
||||
@ -391,32 +395,32 @@ if Google
|
||||
.nf
|
||||
\f[C]
|
||||
$ 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
|
||||
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: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
|
||||
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: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
|
||||
expenses:dues $2.00
|
||||
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: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
|
||||
revenues:foss donations:darcshub $-10.00 ; business:
|
||||
expenses:banking:paypal $0.59 ; business:
|
||||
@ -575,6 +579,8 @@ Eg to read TSV (Tab Separated Values), use:
|
||||
separator TAB
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
See also: File Extension.
|
||||
.SS \f[C]if\f[R]
|
||||
.IP
|
||||
.nf
|
||||
@ -819,6 +825,32 @@ When CSV values are enclosed in quotes, note:
|
||||
they must be double quotes (not single quotes)
|
||||
.IP \[bu] 2
|
||||
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
|
||||
.PP
|
||||
If you use multiple \f[C]-f\f[R] options to read multiple CSV files at
|
||||
|
||||
@ -6,10 +6,10 @@ File: hledger_csv.info, Node: Top, Next: EXAMPLES, Up: (dir)
|
||||
hledger_csv(5) hledger 1.16.99
|
||||
******************************
|
||||
|
||||
hledger can read CSV (comma-separated value, or character-separated
|
||||
value) files as if they were journal files, automatically converting
|
||||
each CSV record into a transaction. (To learn about _writing_ CSV, see
|
||||
CSV output.)
|
||||
hledger can read CSV (Comma Separated Value/Character Separated Value)
|
||||
files as if they were journal files, automatically converting each CSV
|
||||
record into a transaction. (To learn about _writing_ CSV, see CSV
|
||||
output.)
|
||||
|
||||
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
|
||||
@ -37,7 +37,11 @@ assignment*
|
||||
*'newest-first'* disambiguate record order when there's only one date
|
||||
*'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:
|
||||
|
||||
@ -81,7 +85,7 @@ fields date, description, _, amount
|
||||
date-format %d/%m/%Y
|
||||
|
||||
$ hledger print -f basic.csv
|
||||
2019/11/12 Foo
|
||||
2019-11-12 Foo
|
||||
expenses:unknown 10.23
|
||||
income:unknown -10.23
|
||||
|
||||
@ -128,11 +132,11 @@ currency EUR
|
||||
account1 assets:bank:boi:checking
|
||||
|
||||
$ hledger -f bankofireland-checking.csv print
|
||||
2012/12/07 LODGMENT 529898
|
||||
2012-12-07 LODGMENT 529898
|
||||
assets:bank:boi:checking EUR10.0 = EUR131.2
|
||||
income:unknown EUR-10.0
|
||||
|
||||
2012/12/07 PAYMENT
|
||||
2012-12-07 PAYMENT
|
||||
assets:bank:boi:checking EUR-5.0 = EUR126.0
|
||||
expenses:unknown EUR5.0
|
||||
|
||||
@ -192,11 +196,11 @@ if ,\$[1-9][.0-9]+(,[^,]*){1}$
|
||||
amount3 %fees
|
||||
|
||||
$ hledger -f amazon-orders.csv print
|
||||
2012/07/29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
|
||||
2012-07-29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
|
||||
assets:amazon
|
||||
expenses:misc $20.00
|
||||
|
||||
2012/07/30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
|
||||
2012-07-30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
|
||||
assets:amazon
|
||||
expenses:misc $25.00
|
||||
expenses:fees $1.00
|
||||
@ -328,32 +332,32 @@ if Google
|
||||
description google | music
|
||||
|
||||
$ 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
|
||||
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: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
|
||||
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: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
|
||||
expenses:dues $2.00
|
||||
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: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
|
||||
revenues:foss donations:darcshub $-10.00 ; 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
|
||||
|
||||
See also: File Extension.
|
||||
|
||||
|
||||
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::
|
||||
* Valid CSV::
|
||||
* File Extension::
|
||||
* Reading multiple CSV files::
|
||||
* Valid transactions::
|
||||
* Deduplicating importing::
|
||||
@ -731,7 +738,7 @@ a separator each time the command re-runs, making it easier to read the
|
||||
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
|
||||
=============
|
||||
@ -743,9 +750,29 @@ enclosed in quotes, note:
|
||||
* 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,
|
||||
@ -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
|
||||
|
||||
3.4 Valid transactions
|
||||
3.5 Valid transactions
|
||||
======================
|
||||
|
||||
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
|
||||
|
||||
3.5 Deduplicating, importing
|
||||
3.6 Deduplicating, importing
|
||||
============================
|
||||
|
||||
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
|
||||
|
||||
3.6 Setting amounts
|
||||
3.7 Setting amounts
|
||||
===================
|
||||
|
||||
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
|
||||
|
||||
3.7 Setting currency/commodity
|
||||
3.8 Setting currency/commodity
|
||||
==============================
|
||||
|
||||
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
|
||||
|
||||
3.8 Referencing other fields
|
||||
3.9 Referencing other fields
|
||||
============================
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
to). First,
|
||||
@ -939,62 +966,64 @@ command the user specified.
|
||||
|
||||
Tag Table:
|
||||
Node: Top72
|
||||
Node: EXAMPLES1879
|
||||
Ref: #examples1985
|
||||
Node: Basic2193
|
||||
Ref: #basic2293
|
||||
Node: Bank of Ireland2835
|
||||
Ref: #bank-of-ireland2970
|
||||
Node: Amazon4433
|
||||
Ref: #amazon4551
|
||||
Node: Paypal6484
|
||||
Ref: #paypal6578
|
||||
Node: CSV RULES14461
|
||||
Ref: #csv-rules14570
|
||||
Node: skip14846
|
||||
Ref: #skip14939
|
||||
Node: fields15314
|
||||
Ref: #fields15436
|
||||
Node: Transaction field names16601
|
||||
Ref: #transaction-field-names16761
|
||||
Node: Posting field names16872
|
||||
Ref: #posting-field-names17024
|
||||
Node: field assignment18315
|
||||
Ref: #field-assignment18458
|
||||
Node: separator19276
|
||||
Ref: #separator19405
|
||||
Node: if19786
|
||||
Ref: #if19888
|
||||
Node: end21604
|
||||
Ref: #end21710
|
||||
Node: date-format21934
|
||||
Ref: #date-format22066
|
||||
Node: newest-first22815
|
||||
Ref: #newest-first22953
|
||||
Node: include23636
|
||||
Ref: #include23765
|
||||
Node: balance-type24209
|
||||
Ref: #balance-type24329
|
||||
Node: TIPS25029
|
||||
Ref: #tips25111
|
||||
Node: Rapid feedback25348
|
||||
Ref: #rapid-feedback25465
|
||||
Node: Valid CSV25925
|
||||
Ref: #valid-csv26067
|
||||
Node: Reading multiple CSV files26259
|
||||
Ref: #reading-multiple-csv-files26439
|
||||
Node: Valid transactions26680
|
||||
Ref: #valid-transactions26858
|
||||
Node: Deduplicating importing27486
|
||||
Ref: #deduplicating-importing27665
|
||||
Node: Setting amounts28698
|
||||
Ref: #setting-amounts28867
|
||||
Node: Setting currency/commodity29853
|
||||
Ref: #setting-currencycommodity30045
|
||||
Node: Referencing other fields30848
|
||||
Ref: #referencing-other-fields31048
|
||||
Node: How CSV rules are evaluated31945
|
||||
Ref: #how-csv-rules-are-evaluated32116
|
||||
Node: EXAMPLES2031
|
||||
Ref: #examples2137
|
||||
Node: Basic2345
|
||||
Ref: #basic2445
|
||||
Node: Bank of Ireland2987
|
||||
Ref: #bank-of-ireland3122
|
||||
Node: Amazon4585
|
||||
Ref: #amazon4703
|
||||
Node: Paypal6636
|
||||
Ref: #paypal6730
|
||||
Node: CSV RULES14613
|
||||
Ref: #csv-rules14722
|
||||
Node: skip14998
|
||||
Ref: #skip15091
|
||||
Node: fields15466
|
||||
Ref: #fields15588
|
||||
Node: Transaction field names16753
|
||||
Ref: #transaction-field-names16913
|
||||
Node: Posting field names17024
|
||||
Ref: #posting-field-names17176
|
||||
Node: field assignment18467
|
||||
Ref: #field-assignment18610
|
||||
Node: separator19428
|
||||
Ref: #separator19557
|
||||
Node: if19968
|
||||
Ref: #if20070
|
||||
Node: end21786
|
||||
Ref: #end21892
|
||||
Node: date-format22116
|
||||
Ref: #date-format22248
|
||||
Node: newest-first22997
|
||||
Ref: #newest-first23135
|
||||
Node: include23818
|
||||
Ref: #include23947
|
||||
Node: balance-type24391
|
||||
Ref: #balance-type24511
|
||||
Node: TIPS25211
|
||||
Ref: #tips25293
|
||||
Node: Rapid feedback25549
|
||||
Ref: #rapid-feedback25666
|
||||
Node: Valid CSV26126
|
||||
Ref: #valid-csv26256
|
||||
Node: File Extension26448
|
||||
Ref: #file-extension26600
|
||||
Node: Reading multiple CSV files27010
|
||||
Ref: #reading-multiple-csv-files27195
|
||||
Node: Valid transactions27436
|
||||
Ref: #valid-transactions27614
|
||||
Node: Deduplicating importing28242
|
||||
Ref: #deduplicating-importing28421
|
||||
Node: Setting amounts29454
|
||||
Ref: #setting-amounts29623
|
||||
Node: Setting currency/commodity30609
|
||||
Ref: #setting-currencycommodity30801
|
||||
Node: Referencing other fields31604
|
||||
Ref: #referencing-other-fields31804
|
||||
Node: How CSV rules are evaluated32701
|
||||
Ref: #how-csv-rules-are-evaluated32874
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
@ -7,10 +7,10 @@ NAME
|
||||
CSV - how hledger reads CSV data, and the CSV rules file format
|
||||
|
||||
DESCRIPTION
|
||||
hledger can read CSV (comma-separated value, or character-separated
|
||||
value) files as if they were journal files, automatically converting
|
||||
each CSV record into a transaction. (To learn about writing CSV, see
|
||||
CSV output.)
|
||||
hledger can read CSV (Comma Separated Value/Character Separated Value)
|
||||
files as if they were journal files, automatically converting each CSV
|
||||
record into a transaction. (To learn about writing CSV, see CSV out-
|
||||
put.)
|
||||
|
||||
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.
|
||||
@ -46,7 +46,10 @@ DESCRIPTION
|
||||
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.
|
||||
|
||||
EXAMPLES
|
||||
Here are some sample hledger CSV rules files. See also the full col-
|
||||
@ -67,7 +70,7 @@ EXAMPLES
|
||||
date-format %d/%m/%Y
|
||||
|
||||
$ hledger print -f basic.csv
|
||||
2019/11/12 Foo
|
||||
2019-11-12 Foo
|
||||
expenses:unknown 10.23
|
||||
income:unknown -10.23
|
||||
|
||||
@ -109,11 +112,11 @@ EXAMPLES
|
||||
account1 assets:bank:boi:checking
|
||||
|
||||
$ hledger -f bankofireland-checking.csv print
|
||||
2012/12/07 LODGMENT 529898
|
||||
2012-12-07 LODGMENT 529898
|
||||
assets:bank:boi:checking EUR10.0 = EUR131.2
|
||||
income:unknown EUR-10.0
|
||||
|
||||
2012/12/07 PAYMENT
|
||||
2012-12-07 PAYMENT
|
||||
assets:bank:boi:checking EUR-5.0 = EUR126.0
|
||||
expenses:unknown EUR5.0
|
||||
|
||||
@ -168,11 +171,11 @@ EXAMPLES
|
||||
amount3 %fees
|
||||
|
||||
$ hledger -f amazon-orders.csv print
|
||||
2012/07/29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
|
||||
2012-07-29 (16000000000000DGLNJPI1P9B8DKPVHL) To Foo. ; status:Completed
|
||||
assets:amazon
|
||||
expenses:misc $20.00
|
||||
|
||||
2012/07/30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
|
||||
2012-07-30 (17LA58JSKRD4HDGLNJPI1P9B8DKPVHL) To Adapteva, Inc. ; status:Completed
|
||||
assets:amazon
|
||||
expenses:misc $25.00
|
||||
expenses:fees $1.00
|
||||
@ -299,32 +302,32 @@ EXAMPLES
|
||||
description google | music
|
||||
|
||||
$ 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
|
||||
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: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
|
||||
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: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
|
||||
expenses:dues $2.00
|
||||
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: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
|
||||
revenues:foss donations:darcshub $-10.00 ; business:
|
||||
expenses:banking:paypal $0.59 ; business:
|
||||
@ -440,6 +443,8 @@ CSV RULES
|
||||
|
||||
separator TAB
|
||||
|
||||
See also: File Extension.
|
||||
|
||||
if
|
||||
if PATTERN
|
||||
RULE
|
||||
@ -607,6 +612,20 @@ TIPS
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
@ -156,14 +156,14 @@ unspecified.
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger register checking
|
||||
2010/02/23 movie ticket assets:checking $-10 $-10
|
||||
2010-02-23 movie ticket assets:checking $-10 $-10
|
||||
\f[R]
|
||||
.fi
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger register checking --date2
|
||||
2010/02/19 movie ticket assets:checking $-10 $-10
|
||||
2010-02-19 movie ticket assets:checking $-10 $-10
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
@ -193,14 +193,14 @@ reconciliation:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f t.j register food
|
||||
2015/05/30 expenses:food $10 $10
|
||||
2015-05-30 expenses:food $10 $10
|
||||
\f[R]
|
||||
.fi
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f t.j register checking
|
||||
2015/06/01 assets:checking $-10 $-10
|
||||
2015-06-01 assets:checking $-10 $-10
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
@ -718,7 +718,7 @@ amount to have that price attached:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger print --explicit
|
||||
2019/01/01
|
||||
2019-01-01
|
||||
(a) $1 \[at] \[Eu]2 = $1 \[at] \[Eu]2
|
||||
\f[R]
|
||||
.fi
|
||||
@ -1825,12 +1825,12 @@ Some examples:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger print --auto
|
||||
2017/12/01
|
||||
2017-12-01
|
||||
expenses:food $10
|
||||
assets:checking
|
||||
(liabilities:charity) $-1
|
||||
|
||||
2017/12/14
|
||||
2017-12-14
|
||||
expenses:gifts $20
|
||||
assets:checking
|
||||
assets:checking:gifts -$20
|
||||
|
||||
@ -189,10 +189,10 @@ the primary date if unspecified.
|
||||
assets: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
|
||||
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 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
|
||||
|
||||
$ 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
|
||||
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 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
|
||||
|
||||
$ hledger print --explicit
|
||||
2019/01/01
|
||||
2019-01-01
|
||||
(a) $1 @ €2 = $1 @ €2
|
||||
|
||||
|
||||
@ -1667,12 +1667,12 @@ recorded above it or in another file.
|
||||
assets:checking
|
||||
|
||||
$ hledger print --auto
|
||||
2017/12/01
|
||||
2017-12-01
|
||||
expenses:food $10
|
||||
assets:checking
|
||||
(liabilities:charity) $-1
|
||||
|
||||
2017/12/14
|
||||
2017-12-14
|
||||
expenses:gifts $20
|
||||
assets:checking
|
||||
assets:checking:gifts -$20
|
||||
|
||||
@ -134,10 +134,10 @@ FILE FORMAT
|
||||
assets: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
|
||||
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
|
||||
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
|
||||
|
||||
$ 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
|
||||
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
|
||||
the year of the transaction's date. You can set the secondary date
|
||||
@ -525,7 +525,7 @@ FILE FORMAT
|
||||
(a) = $1 @ EUR2
|
||||
|
||||
$ hledger print --explicit
|
||||
2019/01/01
|
||||
2019-01-01
|
||||
(a) $1 @ EUR2 = $1 @ EUR2
|
||||
|
||||
Transaction prices
|
||||
@ -1332,12 +1332,12 @@ FILE FORMAT
|
||||
assets:checking
|
||||
|
||||
$ hledger print --auto
|
||||
2017/12/01
|
||||
2017-12-01
|
||||
expenses:food $10
|
||||
assets:checking
|
||||
(liabilities:charity) $-1
|
||||
|
||||
2017/12/14
|
||||
2017-12-14
|
||||
expenses:gifts $20
|
||||
assets:checking
|
||||
assets:checking:gifts -$20
|
||||
|
||||
@ -36,13 +36,13 @@ entries:
|
||||
.nf
|
||||
\f[C]
|
||||
$ 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
|
||||
|
||||
2015/03/31 * 22:21-23:59
|
||||
2015-03-31 * 22:21-23:59
|
||||
(another account) 1.64h
|
||||
|
||||
2015/04/01 * 00:00-02:00
|
||||
2015-04-01 * 00:00-02:00
|
||||
(another account) 2.01h
|
||||
\f[R]
|
||||
.fi
|
||||
|
||||
@ -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:
|
||||
|
||||
$ 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
|
||||
|
||||
2015/03/31 * 22:21-23:59
|
||||
2015-03-31 * 22:21-23:59
|
||||
(another account) 1.64h
|
||||
|
||||
2015/04/01 * 00:00-02:00
|
||||
2015-04-01 * 00:00-02:00
|
||||
(another account) 2.01h
|
||||
|
||||
Here is a sample.timeclock to download and some queries to try:
|
||||
|
||||
@ -25,13 +25,13 @@ DESCRIPTION
|
||||
the above time log, hledger print generates these journal entries:
|
||||
|
||||
$ 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
|
||||
|
||||
2015/03/31 * 22:21-23:59
|
||||
2015-03-31 * 22:21-23:59
|
||||
(another account) 1.64h
|
||||
|
||||
2015/04/01 * 00:00-02:00
|
||||
2015-04-01 * 00:00-02:00
|
||||
(another account) 2.01h
|
||||
|
||||
Here is a sample.timeclock to download and some queries to try:
|
||||
|
||||
@ -81,10 +81,10 @@ Reporting:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f t.timedot print date:2016/2/2
|
||||
2016/02/02 *
|
||||
2016-02-02 *
|
||||
(inc:client1) 2.00
|
||||
|
||||
2016/02/02 *
|
||||
2016-02-02 *
|
||||
(biz:research) 0.25
|
||||
\f[R]
|
||||
.fi
|
||||
@ -92,9 +92,9 @@ $ hledger -f t.timedot print date:2016/2/2
|
||||
.nf
|
||||
\f[C]
|
||||
$ 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
|
||||
research || 0.25 0.25 1.00
|
||||
|
||||
@ -71,16 +71,16 @@ biz:research 1
|
||||
Reporting:
|
||||
|
||||
$ hledger -f t.timedot print date:2016/2/2
|
||||
2016/02/02 *
|
||||
2016-02-02 *
|
||||
(inc:client1) 2.00
|
||||
|
||||
2016/02/02 *
|
||||
2016-02-02 *
|
||||
(biz:research) 0.25
|
||||
|
||||
$ 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
|
||||
research || 0.25 0.25 1.00
|
||||
|
||||
@ -62,16 +62,16 @@ FILE FORMAT
|
||||
Reporting:
|
||||
|
||||
$ hledger -f t.timedot print date:2016/2/2
|
||||
2016/02/02 *
|
||||
2016-02-02 *
|
||||
(inc:client1) 2.00
|
||||
|
||||
2016/02/02 *
|
||||
2016-02-02 *
|
||||
(biz:research) 0.25
|
||||
|
||||
$ 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
|
||||
research || 0.25 0.25 1.00
|
||||
|
||||
@ -64,6 +64,13 @@ listen on this IP address (default: 127.0.0.1)
|
||||
\f[B]\f[CB]--port=PORT\f[B]\f[R]
|
||||
listen on this TCP port (default: 5000)
|
||||
.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]
|
||||
set the base url (default: http://IPADDR:PORT).
|
||||
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
|
||||
you are running multiple hledger-web instances.
|
||||
.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
|
||||
and path that appear in hyperlinks, useful eg for integrating
|
||||
hledger-web within a larger website.
|
||||
|
||||
@ -60,6 +60,11 @@ before options, as shown in the synopsis above.
|
||||
'--port=PORT'
|
||||
|
||||
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'
|
||||
|
||||
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
|
||||
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
|
||||
path that appear in hyperlinks, useful eg for integrating hledger-web
|
||||
within a larger website. The default is 'http://HOST:PORT/' using the
|
||||
@ -343,14 +361,14 @@ Tag Table:
|
||||
Node: Top72
|
||||
Node: OPTIONS1361
|
||||
Ref: #options1466
|
||||
Node: PERMISSIONS6790
|
||||
Ref: #permissions6929
|
||||
Node: EDITING UPLOADING DOWNLOADING8141
|
||||
Ref: #editing-uploading-downloading8322
|
||||
Node: RELOADING9156
|
||||
Ref: #reloading9290
|
||||
Node: JSON API9723
|
||||
Ref: #json-api9817
|
||||
Node: PERMISSIONS7739
|
||||
Ref: #permissions7878
|
||||
Node: EDITING UPLOADING DOWNLOADING9090
|
||||
Ref: #editing-uploading-downloading9271
|
||||
Node: RELOADING10105
|
||||
Ref: #reloading10239
|
||||
Node: JSON API10672
|
||||
Ref: #json-api10766
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
@ -56,6 +56,11 @@ OPTIONS
|
||||
--port=PORT
|
||||
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
|
||||
set the base url (default: http://IPADDR:PORT). You would
|
||||
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
|
||||
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
|
||||
that appear in hyperlinks, useful eg for integrating hledger-web within
|
||||
a larger website. The default is http://HOST:PORT/ using the server's
|
||||
|
||||
@ -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
|
||||
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
|
||||
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
|
||||
|
||||
@ -34,13 +34,17 @@ $ hledger print
|
||||
assets:bank:checking $-1
|
||||
|
||||
Normally, the journal entry's explicit or implicit amount style is
|
||||
preserved. Ie when an amount is omitted in the journal, it will be
|
||||
omitted in the output. You can use the -x/--explicit flag to make all
|
||||
amounts explicit, which can be useful for troubleshooting or for making
|
||||
your journal more readable and robust against data entry errors. Note,
|
||||
-x will cause postings with a multi-commodity amount (these can arise
|
||||
when a multi-commodity transaction has an implicit amount) will be split
|
||||
into multiple single-commodity postings, for valid journal output.
|
||||
preserved. For example, when an amount is omitted in the journal, it
|
||||
will not 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 -x/--explicit flag to make all amounts and transaction prices
|
||||
explicit, which can be useful for troubleshooting or for making your
|
||||
journal more readable and robust against data entry errors.
|
||||
|
||||
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
|
||||
using that price. This can be used for troubleshooting.
|
||||
|
||||
@ -94,11 +94,11 @@ Some basic reports:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger print
|
||||
2015/09/30 gift received
|
||||
2015-09-30 gift received
|
||||
assets:cash $20
|
||||
income:gifts $-20
|
||||
|
||||
2015/10/16 farmers market
|
||||
2015-10-16 farmers market
|
||||
expenses:food $10
|
||||
assets:cash $-10
|
||||
\f[R]
|
||||
@ -130,8 +130,8 @@ $ hledger balance
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger register cash
|
||||
2015/09/30 gift received assets:cash $20 $20
|
||||
2015/10/16 farmers market assets:cash $-10 $10
|
||||
2015-09-30 gift received assets:cash $20 $20
|
||||
2015-10-16 farmers market assets:cash $-10 $10
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
@ -1210,13 +1210,13 @@ Show the cost of each posting:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f- print --value=cost
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 5 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 6 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 7 B
|
||||
\f[R]
|
||||
.fi
|
||||
@ -1240,13 +1240,13 @@ of the journal (2000-03-01):
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f- print --value=end
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 3 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 3 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 3 B
|
||||
\f[R]
|
||||
.fi
|
||||
@ -1272,13 +1272,13 @@ Show the value on 2000/01/15:
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger -f- print --value=2000-01-15
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 1 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 1 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 1 B
|
||||
\f[R]
|
||||
.fi
|
||||
@ -1300,7 +1300,7 @@ P 2000-01-01 A 2B
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger print -x -X A
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
a 0
|
||||
b 0
|
||||
\f[R]
|
||||
@ -1327,7 +1327,7 @@ commodity 0.00A
|
||||
.nf
|
||||
\f[C]
|
||||
$ hledger print -X A
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
a 0.50A
|
||||
b -0.50A
|
||||
\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
|
||||
\f[C]--opening\f[R] or \f[C]--closing\f[R] flag.
|
||||
.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
|
||||
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
|
||||
@ -3123,15 +3127,19 @@ $ hledger print
|
||||
.PP
|
||||
Normally, the journal entry\[aq]s explicit or implicit amount style is
|
||||
preserved.
|
||||
Ie when an amount is omitted in the journal, it will be omitted in the
|
||||
output.
|
||||
For example, when an amount is omitted in the journal, it will not
|
||||
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
|
||||
amounts explicit, which can be useful for troubleshooting or for making
|
||||
your journal more readable and robust against data entry errors.
|
||||
Note, \f[C]-x\f[R] will cause postings with a multi-commodity amount
|
||||
(these can arise when a multi-commodity transaction has an implicit
|
||||
amount) will be split into multiple single-commodity postings, for valid
|
||||
journal output.
|
||||
amounts and transaction prices explicit, which can be useful for
|
||||
troubleshooting or for making your journal more readable and robust
|
||||
against data entry errors.
|
||||
.PP
|
||||
Note, \f[C]-x\f[R]/\f[C]--explicit\f[R] 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.
|
||||
.PP
|
||||
With \f[C]-B\f[R]/\f[C]--cost\f[R], amounts with transaction prices are
|
||||
converted to cost using that price.
|
||||
|
||||
@ -68,11 +68,11 @@ Two simple transactions in hledger journal format:
|
||||
Some basic reports:
|
||||
|
||||
$ hledger print
|
||||
2015/09/30 gift received
|
||||
2015-09-30 gift received
|
||||
assets:cash $20
|
||||
income:gifts $-20
|
||||
|
||||
2015/10/16 farmers market
|
||||
2015-10-16 farmers market
|
||||
expenses:food $10
|
||||
assets:cash $-10
|
||||
|
||||
@ -92,8 +92,8 @@ $ hledger balance
|
||||
0
|
||||
|
||||
$ hledger register cash
|
||||
2015/09/30 gift received assets:cash $20 $20
|
||||
2015/10/16 farmers market assets:cash $-10 $10
|
||||
2015-09-30 gift received assets:cash $20 $20
|
||||
2015-10-16 farmers market assets:cash $-10 $10
|
||||
|
||||
More commands:
|
||||
|
||||
@ -932,13 +932,13 @@ P 2000-04-01 A 4 B
|
||||
Show the cost of each posting:
|
||||
|
||||
$ hledger -f- print --value=cost
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 5 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 6 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 7 B
|
||||
|
||||
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):
|
||||
|
||||
$ hledger -f- print --value=end
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 3 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 3 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 3 B
|
||||
|
||||
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:
|
||||
|
||||
$ hledger -f- print --value=2000-01-15
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 1 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 1 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 1 B
|
||||
|
||||
You may need to explicitly set a commodity's display style, when
|
||||
@ -998,7 +998,7 @@ P 2000-01-01 A 2B
|
||||
b
|
||||
|
||||
$ hledger print -x -X A
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
a 0
|
||||
b 0
|
||||
|
||||
@ -1016,7 +1016,7 @@ commodity 0.00A
|
||||
b
|
||||
|
||||
$ hledger print -X A
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
a 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
|
||||
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
|
||||
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
|
||||
@ -2583,13 +2587,17 @@ $ hledger print
|
||||
assets:bank:checking $-1
|
||||
|
||||
Normally, the journal entry's explicit or implicit amount style is
|
||||
preserved. Ie when an amount is omitted in the journal, it will be
|
||||
omitted in the output. You can use the '-x'/'--explicit' flag to make
|
||||
all amounts explicit, which can be useful for troubleshooting or for
|
||||
making your journal more readable and robust against data entry errors.
|
||||
Note, '-x' will cause postings with a multi-commodity amount (these can
|
||||
arise when a multi-commodity transaction has an implicit amount) will be
|
||||
split into multiple single-commodity postings, for valid journal output.
|
||||
preserved. For example, when an amount is omitted in the journal, it
|
||||
will not 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 '-x'/'--explicit' flag to make all amounts and transaction prices
|
||||
explicit, which can be useful for troubleshooting or for making your
|
||||
journal more readable and robust against data entry errors.
|
||||
|
||||
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 using that price. This can be used for troubleshooting.
|
||||
@ -3292,74 +3300,74 @@ Node: check-dupes76317
|
||||
Ref: #check-dupes76441
|
||||
Node: close76734
|
||||
Ref: #close76848
|
||||
Node: commodities80514
|
||||
Ref: #commodities80641
|
||||
Node: descriptions80723
|
||||
Ref: #descriptions80851
|
||||
Node: diff81032
|
||||
Ref: #diff81138
|
||||
Node: files82185
|
||||
Ref: #files82285
|
||||
Node: help82432
|
||||
Ref: #help82532
|
||||
Node: import83613
|
||||
Ref: #import83727
|
||||
Node: Importing balance assignments84620
|
||||
Ref: #importing-balance-assignments84768
|
||||
Node: incomestatement85417
|
||||
Ref: #incomestatement85550
|
||||
Node: notes86954
|
||||
Ref: #notes87067
|
||||
Node: payees87193
|
||||
Ref: #payees87299
|
||||
Node: prices87457
|
||||
Ref: #prices87563
|
||||
Node: print87904
|
||||
Ref: #print88014
|
||||
Node: print-unique92507
|
||||
Ref: #print-unique92633
|
||||
Node: register92918
|
||||
Ref: #register93045
|
||||
Node: Custom register output97217
|
||||
Ref: #custom-register-output97346
|
||||
Node: register-match98608
|
||||
Ref: #register-match98742
|
||||
Node: rewrite99093
|
||||
Ref: #rewrite99208
|
||||
Node: Re-write rules in a file101063
|
||||
Ref: #re-write-rules-in-a-file101197
|
||||
Node: Diff output format102407
|
||||
Ref: #diff-output-format102576
|
||||
Node: rewrite vs print --auto103668
|
||||
Ref: #rewrite-vs.-print---auto103847
|
||||
Node: roi104403
|
||||
Ref: #roi104501
|
||||
Node: stats105513
|
||||
Ref: #stats105612
|
||||
Node: tags106400
|
||||
Ref: #tags106498
|
||||
Node: test106792
|
||||
Ref: #test106876
|
||||
Node: ADD-ON COMMANDS107623
|
||||
Ref: #add-on-commands107733
|
||||
Node: Official add-ons109021
|
||||
Ref: #official-add-ons109161
|
||||
Node: ui109241
|
||||
Ref: #ui109328
|
||||
Node: web109382
|
||||
Ref: #web109471
|
||||
Node: Third party add-ons109517
|
||||
Ref: #third-party-add-ons109692
|
||||
Node: iadd109811
|
||||
Ref: #iadd109912
|
||||
Node: interest109994
|
||||
Ref: #interest110103
|
||||
Node: Experimental add-ons110198
|
||||
Ref: #experimental-add-ons110350
|
||||
Node: autosync110588
|
||||
Ref: #autosync110699
|
||||
Node: chart110938
|
||||
Ref: #chart111043
|
||||
Node: commodities80666
|
||||
Ref: #commodities80793
|
||||
Node: descriptions80875
|
||||
Ref: #descriptions81003
|
||||
Node: diff81184
|
||||
Ref: #diff81290
|
||||
Node: files82337
|
||||
Ref: #files82437
|
||||
Node: help82584
|
||||
Ref: #help82684
|
||||
Node: import83765
|
||||
Ref: #import83879
|
||||
Node: Importing balance assignments84772
|
||||
Ref: #importing-balance-assignments84920
|
||||
Node: incomestatement85569
|
||||
Ref: #incomestatement85702
|
||||
Node: notes87106
|
||||
Ref: #notes87219
|
||||
Node: payees87345
|
||||
Ref: #payees87451
|
||||
Node: prices87609
|
||||
Ref: #prices87715
|
||||
Node: print88056
|
||||
Ref: #print88166
|
||||
Node: print-unique92810
|
||||
Ref: #print-unique92936
|
||||
Node: register93221
|
||||
Ref: #register93348
|
||||
Node: Custom register output97520
|
||||
Ref: #custom-register-output97649
|
||||
Node: register-match98911
|
||||
Ref: #register-match99045
|
||||
Node: rewrite99396
|
||||
Ref: #rewrite99511
|
||||
Node: Re-write rules in a file101366
|
||||
Ref: #re-write-rules-in-a-file101500
|
||||
Node: Diff output format102710
|
||||
Ref: #diff-output-format102879
|
||||
Node: rewrite vs print --auto103971
|
||||
Ref: #rewrite-vs.-print---auto104150
|
||||
Node: roi104706
|
||||
Ref: #roi104804
|
||||
Node: stats105816
|
||||
Ref: #stats105915
|
||||
Node: tags106703
|
||||
Ref: #tags106801
|
||||
Node: test107095
|
||||
Ref: #test107179
|
||||
Node: ADD-ON COMMANDS107926
|
||||
Ref: #add-on-commands108036
|
||||
Node: Official add-ons109324
|
||||
Ref: #official-add-ons109464
|
||||
Node: ui109544
|
||||
Ref: #ui109631
|
||||
Node: web109685
|
||||
Ref: #web109774
|
||||
Node: Third party add-ons109820
|
||||
Ref: #third-party-add-ons109995
|
||||
Node: iadd110114
|
||||
Ref: #iadd110215
|
||||
Node: interest110297
|
||||
Ref: #interest110406
|
||||
Node: Experimental add-ons110501
|
||||
Ref: #experimental-add-ons110653
|
||||
Node: autosync110891
|
||||
Ref: #autosync111002
|
||||
Node: chart111241
|
||||
Ref: #chart111346
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
@ -68,11 +68,11 @@ EXAMPLES
|
||||
Some basic reports:
|
||||
|
||||
$ hledger print
|
||||
2015/09/30 gift received
|
||||
2015-09-30 gift received
|
||||
assets:cash $20
|
||||
income:gifts $-20
|
||||
|
||||
2015/10/16 farmers market
|
||||
2015-10-16 farmers market
|
||||
expenses:food $10
|
||||
assets:cash $-10
|
||||
|
||||
@ -92,8 +92,8 @@ EXAMPLES
|
||||
0
|
||||
|
||||
$ hledger register cash
|
||||
2015/09/30 gift received assets:cash $20 $20
|
||||
2015/10/16 farmers market assets:cash $-10 $10
|
||||
2015-09-30 gift received assets:cash $20 $20
|
||||
2015-10-16 farmers market assets:cash $-10 $10
|
||||
|
||||
More commands:
|
||||
|
||||
@ -829,13 +829,13 @@ OPTIONS
|
||||
Show the cost of each posting:
|
||||
|
||||
$ hledger -f- print --value=cost
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 5 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 6 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 7 B
|
||||
|
||||
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):
|
||||
|
||||
$ hledger -f- print --value=end
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 3 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 3 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 3 B
|
||||
|
||||
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:
|
||||
|
||||
$ hledger -f- print --value=2000-01-15
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
(a) 1 B
|
||||
|
||||
2000/02/01
|
||||
2000-02-01
|
||||
(a) 1 B
|
||||
|
||||
2000/03/01
|
||||
2000-03-01
|
||||
(a) 1 B
|
||||
|
||||
You may need to explicitly set a commodity's display style, when re-
|
||||
@ -894,7 +894,7 @@ OPTIONS
|
||||
b
|
||||
|
||||
$ hledger print -x -X A
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
a 0
|
||||
b 0
|
||||
|
||||
@ -912,7 +912,7 @@ OPTIONS
|
||||
b
|
||||
|
||||
$ hledger print -X A
|
||||
2000/01/01
|
||||
2000-01-01
|
||||
a 0.50A
|
||||
b -0.50A
|
||||
|
||||
@ -1955,6 +1955,10 @@ COMMANDS
|
||||
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;
|
||||
with --interleaved, they appear beside their corresponding closing
|
||||
postings.
|
||||
|
||||
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-
|
||||
tion as last entry of the old file, and the opening transaction as the
|
||||
@ -2253,14 +2257,17 @@ COMMANDS
|
||||
assets:bank:checking $-1
|
||||
|
||||
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-
|
||||
ted in the output. You can use the -x/--explicit flag to make all
|
||||
amounts explicit, which can be useful for troubleshooting or for making
|
||||
your journal more readable and robust against data entry errors. Note,
|
||||
-x will cause postings with a multi-commodity amount (these can arise
|
||||
when a multi-commodity transaction has an implicit amount) will be
|
||||
split into multiple single-commodity postings, for valid journal out-
|
||||
put.
|
||||
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-
|
||||
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-
|
||||
plicit, which can be useful for troubleshooting or for making your
|
||||
journal more readable and robust against data entry errors.
|
||||
|
||||
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
|
||||
using that price. This can be used for troubleshooting.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user