;doc: regen some manuals

[ci skip]
This commit is contained in:
Simon Michael 2020-01-07 16:24:51 -08:00
parent 41f00e42f9
commit 65efdea4c0
6 changed files with 450 additions and 447 deletions

View File

@ -52,6 +52,11 @@ T}@T{
assign a value to one hledger field, with interpolation
T}
T{
\f[B]\f[CB]separator\f[B]\f[R]
T}@T{
a custom field separator
T}
T{
\f[B]\f[CB]if\f[B]\f[R]
T}@T{
apply some rules to matched CSV records
@ -547,6 +552,29 @@ comment note: %somefield - %anotherfield, date: %1
Interpolation strips outer whitespace (so a CSV value like
\f[C]\[dq] 1 \[dq]\f[R] becomes \f[C]1\f[R] when interpolated) (#1051).
See TIPS below for more about referencing other fields.
.SS \f[C]separator\f[R]
.PP
You can use the \f[C]separator\f[R] directive to read other kinds of
character-separated data.
Eg to read SSV (Semicolon Separated Values), use:
.IP
.nf
\f[C]
separator ;
\f[R]
.fi
.PP
The separator directive accepts exactly one single byte character as a
separator.
To specify whitespace characters, you may use the special words
\f[C]TAB\f[R] or \f[C]SPACE\f[R].
Eg to read TSV (Tab Separated Values), use:
.IP
.nf
\f[C]
separator TAB
\f[R]
.fi
.SS \f[C]if\f[R]
.IP
.nf
@ -791,29 +819,6 @@ 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 Other separator characters
.PP
You can use the \f[C]--separator \[aq]CHAR\[aq]\f[R] command line option
(experimental) to read other kinds of character-separated data.
Eg to read SSV (Semicolon Separated Values), use:
.IP
.nf
\f[C]
$ hledger -f foo.tsv --separator \[aq];\[aq] print
\f[R]
.fi
.PP
Note the semicolon is quoted because it\[aq]s a special shell character.
.PP
To read TSV (Tab Separated Values), use:
.IP
.nf
\f[C]
$ hledger -f foo.tsv --separator \[aq] \[aq] print
\f[R]
.fi
.PP
Note, that\[aq]s a real tab character in quotes, not \f[C]\[rs]t\f[R].
.SS Reading multiple CSV files
.PP
If you use multiple \f[C]-f\f[R] options to read multiple CSV files at

View File

@ -30,6 +30,7 @@ after the examples:
*'fields'* name CSV fields, assign them to hledger fields
*field assign a value to one hledger field, with interpolation
assignment*
*'separator'* a custom field separator
*'if'* apply some rules to matched CSV records
*'end'* skip the remaining CSV records
*'date-format'* describe the format of CSV dates
@ -371,6 +372,7 @@ Blank lines and lines beginning with '#' or ';' are ignored.
* skip::
* fields::
* field assignment::
* separator::
* if::
* end::
* date-format::
@ -479,7 +481,7 @@ also contain tags, as usual.
See TIPS below for more about setting amounts and currency.

File: hledger_csv.info, Node: field assignment, Next: if, Prev: fields, Up: CSV RULES
File: hledger_csv.info, Node: field assignment, Next: separator, Prev: fields, Up: CSV RULES
2.3 field assignment
====================
@ -504,9 +506,27 @@ becomes '1' when interpolated) (#1051). See TIPS below for more about
referencing other fields.

File: hledger_csv.info, Node: if, Next: end, Prev: field assignment, Up: CSV RULES
File: hledger_csv.info, Node: separator, Next: if, Prev: field assignment, Up: CSV RULES
2.4 'if'
2.4 'separator'
===============
You can use the 'separator' directive to read other kinds of
character-separated data. Eg to read SSV (Semicolon Separated Values),
use:
separator ;
The separator directive accepts exactly one single byte character as
a separator. To specify whitespace characters, you may use the special
words 'TAB' or 'SPACE'. Eg to read TSV (Tab Separated Values), use:
separator TAB

File: hledger_csv.info, Node: if, Next: end, Prev: separator, Up: CSV RULES
2.5 'if'
========
if PATTERN
@ -565,7 +585,7 @@ banking thru software

File: hledger_csv.info, Node: end, Next: date-format, Prev: if, Up: CSV RULES
2.5 'end'
2.6 'end'
=========
This rule can be used inside if blocks (only), to make hledger stop
@ -579,7 +599,7 @@ if ,,,,

File: hledger_csv.info, Node: date-format, Next: newest-first, Prev: end, Up: CSV RULES
2.6 'date-format'
2.7 'date-format'
=================
date-format DATEFMT
@ -610,7 +630,7 @@ https://hackage.haskell.org/package/time/docs/Data-Time-Format.html#v:formatTime

File: hledger_csv.info, Node: newest-first, Next: include, Prev: date-format, Up: CSV RULES
2.7 'newest-first'
2.8 'newest-first'
==================
hledger always sorts the generated transactions by date. Transactions
@ -632,7 +652,7 @@ newest-first

File: hledger_csv.info, Node: include, Next: balance-type, Prev: newest-first, Up: CSV RULES
2.8 'include'
2.9 'include'
=============
include RULESFILE
@ -655,8 +675,8 @@ include categorisation.rules

File: hledger_csv.info, Node: balance-type, Prev: include, Up: CSV RULES
2.9 'balance-type'
==================
2.10 'balance-type'
===================
Balance assertions generated by assigning to balanceN are of the simple
'=' type by default, which is a single-commodity, subaccount-excluding
@ -685,7 +705,6 @@ File: hledger_csv.info, Node: TIPS, Prev: CSV RULES, Up: Top
* Rapid feedback::
* Valid CSV::
* Other separator characters::
* Reading multiple CSV files::
* Valid transactions::
* Deduplicating importing::
@ -712,7 +731,7 @@ a separator each time the command re-runs, making it easier to read the
output.

File: hledger_csv.info, Node: Valid CSV, Next: Other separator characters, Prev: Rapid feedback, Up: TIPS
File: hledger_csv.info, Node: Valid CSV, Next: Reading multiple CSV files, Prev: Rapid feedback, Up: TIPS
3.2 Valid CSV
=============
@ -724,29 +743,9 @@ enclosed in quotes, note:
* spaces outside the quotes are not allowed

File: hledger_csv.info, Node: Other separator characters, Next: Reading multiple CSV files, Prev: Valid CSV, Up: TIPS
File: hledger_csv.info, Node: Reading multiple CSV files, Next: Valid transactions, Prev: Valid CSV, Up: TIPS
3.3 Other separator characters
==============================
You can use the '--separator 'CHAR'' command line option (experimental)
to read other kinds of character-separated data. Eg to read SSV
(Semicolon Separated Values), use:
$ hledger -f foo.tsv --separator ';' print
Note the semicolon is quoted because it's a special shell character.
To read TSV (Tab Separated Values), use:
$ hledger -f foo.tsv --separator ' ' print
Note, that's a real tab character in quotes, not '\t'.

File: hledger_csv.info, Node: Reading multiple CSV files, Next: Valid transactions, Prev: Other separator characters, Up: TIPS
3.4 Reading multiple CSV files
3.3 Reading multiple CSV files
==============================
If you use multiple '-f' options to read multiple CSV files at once,
@ -757,7 +756,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.5 Valid transactions
3.4 Valid transactions
======================
After reading a CSV file, hledger post-processes and validates the
@ -776,7 +775,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.6 Deduplicating, importing
3.5 Deduplicating, importing
============================
When you download a CSV file periodically, eg to get your latest bank
@ -806,7 +805,7 @@ CSV data. See:

File: hledger_csv.info, Node: Setting amounts, Next: Setting currency/commodity, Prev: Deduplicating importing, Up: TIPS
3.7 Setting amounts
3.6 Setting amounts
===================
A posting amount can be set in one of these ways:
@ -835,7 +834,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.8 Setting currency/commodity
3.7 Setting currency/commodity
==============================
If the currency/commodity symbol is included in the CSV's amount
@ -862,7 +861,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.9 Referencing other fields
3.8 Referencing other fields
============================
In field assignments, you can interpolate only CSV fields, not hledger
@ -899,8 +898,8 @@ if something

File: hledger_csv.info, Node: How CSV rules are evaluated, Prev: Referencing other fields, Up: TIPS
3.10 How CSV rules are evaluated
================================
3.9 How CSV rules are evaluated
===============================
Here's how to think of CSV rules being evaluated (if you really need
to). First,
@ -940,62 +939,62 @@ command the user specified.

Tag Table:
Node: Top72
Node: EXAMPLES1835
Ref: #examples1941
Node: Basic2149
Ref: #basic2249
Node: Bank of Ireland2791
Ref: #bank-of-ireland2926
Node: Amazon4389
Ref: #amazon4507
Node: Paypal6440
Ref: #paypal6534
Node: CSV RULES14417
Ref: #csv-rules14526
Node: skip14788
Ref: #skip14881
Node: fields15256
Ref: #fields15378
Node: Transaction field names16543
Ref: #transaction-field-names16703
Node: Posting field names16814
Ref: #posting-field-names16966
Node: field assignment18257
Ref: #field-assignment18393
Node: if19211
Ref: #if19320
Node: end21036
Ref: #end21142
Node: date-format21366
Ref: #date-format21498
Node: newest-first22247
Ref: #newest-first22385
Node: include23068
Ref: #include23197
Node: balance-type23641
Ref: #balance-type23759
Node: TIPS24459
Ref: #tips24541
Node: Rapid feedback24809
Ref: #rapid-feedback24926
Node: Valid CSV25386
Ref: #valid-csv25528
Node: Other separator characters25720
Ref: #other-separator-characters25908
Node: Reading multiple CSV files26347
Ref: #reading-multiple-csv-files26544
Node: Valid transactions26785
Ref: #valid-transactions26963
Node: Deduplicating importing27591
Ref: #deduplicating-importing27770
Node: Setting amounts28803
Ref: #setting-amounts28972
Node: Setting currency/commodity29958
Ref: #setting-currencycommodity30150
Node: Referencing other fields30953
Ref: #referencing-other-fields31153
Node: How CSV rules are evaluated32050
Ref: #how-csv-rules-are-evaluated32223
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

End Tag Table

View File

@ -34,6 +34,7 @@ DESCRIPTION
field assignment assign a value to one
hledger field, with inter-
polation
separator a custom field separator
if apply some rules to
matched CSV records
end skip the remaining CSV
@ -427,6 +428,18 @@ CSV RULES
comes 1 when interpolated) (#1051). See TIPS below for more about ref-
erencing other fields.
separator
You can use the separator directive to read other kinds of character-
separated data. Eg to read SSV (Semicolon Separated Values), use:
separator ;
The separator directive accepts exactly one single byte character as a
separator. To specify whitespace characters, you may use the special
words TAB or SPACE. Eg to read TSV (Tab Separated Values), use:
separator TAB
if
if PATTERN
RULE
@ -594,21 +607,6 @@ TIPS
o spaces outside the quotes are not allowed
Other separator characters
You can use the --separator 'CHAR' command line option (experimental)
to read other kinds of character-separated data. Eg to read SSV (Semi-
colon Separated Values), use:
$ hledger -f foo.tsv --separator ';' print
Note the semicolon is quoted because it's a special shell character.
To read TSV (Tab Separated Values), use:
$ hledger -f foo.tsv --separator ' ' print
Note, that's a real tab character in quotes, not \t.
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

View File

@ -1002,12 +1002,12 @@ T{
T}@T{
T}@T{
T}@T{
declare a commodity, number notation & display style for commodityless
amounts
declare a commodity to be used for commodityless amounts, and its number
notation & display style
T}@T{
commodity: all commodityless entries in all files; number notation:
following commodityless entries and entries in that commodity in all
files; display style: amounts of that commodity in reports
default commodity: following commodityless entries until end of current
file; number notation: following entries in that commodity until end of
current file; display style: amounts of that commodity in reports
T}
T{
\f[C]include\f[R]

View File

@ -903,19 +903,20 @@ account' apply account names inline/included
amounts of that
commodity in
reports
'D' declare a commodity, number commodity: all
'D' declare a commodity to be default
used for commodityless commodity:
amounts, and its number following
notation & display style commodityless
for commodityless amounts entries in all
files; number
notation:
following
commodityless
entries and
entries in that
commodity in all
files; display
style: amounts of
that commodity in
entries until end
of current file;
number notation:
following entries
in that commodity
until end of
current file;
display style:
amounts of that
commodity in
reports
'include' include entries/directives what the included
from another file directives affect
@ -1808,60 +1809,60 @@ Node: Tags28648
Ref: #tags28766
Node: Directives30159
Ref: #directives30302
Node: Comment blocks35910
Ref: #comment-blocks36055
Node: Including other files36231
Ref: #including-other-files36411
Node: Default year36819
Ref: #default-year36988
Node: Declaring commodities37395
Ref: #declaring-commodities37578
Node: Default commodity39239
Ref: #default-commodity39415
Node: Market prices40049
Ref: #market-prices40214
Node: Declaring accounts41055
Ref: #declaring-accounts41231
Node: Account comments42156
Ref: #account-comments42319
Node: Account subdirectives42714
Ref: #account-subdirectives42909
Node: Account types43222
Ref: #account-types43406
Node: Account display order45048
Ref: #account-display-order45218
Node: Rewriting accounts46347
Ref: #rewriting-accounts46532
Node: Basic aliases47258
Ref: #basic-aliases47404
Node: Regex aliases48108
Ref: #regex-aliases48280
Node: Combining aliases48998
Ref: #combining-aliases49176
Node: end aliases50452
Ref: #end-aliases50600
Node: Default parent account50701
Ref: #default-parent-account50867
Node: Periodic transactions51751
Ref: #periodic-transactions51949
Node: Periodic rule syntax53821
Ref: #periodic-rule-syntax54027
Node: Two spaces between period expression and description!54731
Ref: #two-spaces-between-period-expression-and-description55050
Node: Forecasting with periodic transactions55734
Ref: #forecasting-with-periodic-transactions56039
Node: Budgeting with periodic transactions58065
Ref: #budgeting-with-periodic-transactions58304
Node: Auto postings / transaction modifiers58753
Ref: #auto-postings-transaction-modifiers58964
Node: Auto postings and dates61193
Ref: #auto-postings-and-dates61450
Node: Auto postings and transaction balancing / inferred amounts / balance assertions61625
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions62000
Node: Auto posting tags62378
Ref: #auto-posting-tags62617
Node: EDITOR SUPPORT63282
Ref: #editor-support63400
Node: Comment blocks35981
Ref: #comment-blocks36126
Node: Including other files36302
Ref: #including-other-files36482
Node: Default year36890
Ref: #default-year37059
Node: Declaring commodities37466
Ref: #declaring-commodities37649
Node: Default commodity39310
Ref: #default-commodity39486
Node: Market prices40120
Ref: #market-prices40285
Node: Declaring accounts41126
Ref: #declaring-accounts41302
Node: Account comments42227
Ref: #account-comments42390
Node: Account subdirectives42785
Ref: #account-subdirectives42980
Node: Account types43293
Ref: #account-types43477
Node: Account display order45119
Ref: #account-display-order45289
Node: Rewriting accounts46418
Ref: #rewriting-accounts46603
Node: Basic aliases47329
Ref: #basic-aliases47475
Node: Regex aliases48179
Ref: #regex-aliases48351
Node: Combining aliases49069
Ref: #combining-aliases49247
Node: end aliases50523
Ref: #end-aliases50671
Node: Default parent account50772
Ref: #default-parent-account50938
Node: Periodic transactions51822
Ref: #periodic-transactions52020
Node: Periodic rule syntax53892
Ref: #periodic-rule-syntax54098
Node: Two spaces between period expression and description!54802
Ref: #two-spaces-between-period-expression-and-description55121
Node: Forecasting with periodic transactions55805
Ref: #forecasting-with-periodic-transactions56110
Node: Budgeting with periodic transactions58136
Ref: #budgeting-with-periodic-transactions58375
Node: Auto postings / transaction modifiers58824
Ref: #auto-postings-transaction-modifiers59035
Node: Auto postings and dates61264
Ref: #auto-postings-and-dates61521
Node: Auto postings and transaction balancing / inferred amounts / balance assertions61696
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions62071
Node: Auto posting tags62449
Ref: #auto-posting-tags62688
Node: EDITOR SUPPORT63353
Ref: #editor-support63471

End Tag Table

View File

@ -700,18 +700,18 @@ FILE FORMAT
play style: amounts
of that commodity
in reports
D declare a commodity, number commodity: all com-
notation & display style for modityless entries
commodityless amounts in all files; num-
ber notation: fol-
lowing commodity-
less entries and
entries in that
commodity in all
files; display
style: amounts of
that commodity in
reports
D declare a commodity to be default commodity:
used for commodityless following commod-
amounts, and its number no- ityless entries un-
tation & display style til end of current
file; number nota-
tion: following en-
tries in that com-
modity until end of
current file; dis-
play style: amounts
of that commodity
in reports
include include entries/directives what the included
from another file directives affect
P declare a market price for a amounts of that