;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 assign a value to one hledger field, with interpolation
T} T}
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] \f[B]\f[CB]if\f[B]\f[R]
T}@T{ T}@T{
apply some rules to matched CSV records 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 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). \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. 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] .SS \f[C]if\f[R]
.IP .IP
.nf .nf
@ -791,29 +819,6 @@ 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 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 .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

@ -30,6 +30,7 @@ after the examples:
*'fields'* name CSV fields, assign them to hledger fields *'fields'* name CSV fields, assign them to hledger fields
*field assign a value to one hledger field, with interpolation *field assign a value to one hledger field, with interpolation
assignment* assignment*
*'separator'* a custom field separator
*'if'* apply some rules to matched CSV records *'if'* apply some rules to matched CSV records
*'end'* skip the remaining CSV records *'end'* skip the remaining CSV records
*'date-format'* describe the format of CSV dates *'date-format'* describe the format of CSV dates
@ -371,6 +372,7 @@ Blank lines and lines beginning with '#' or ';' are ignored.
* skip:: * skip::
* fields:: * fields::
* field assignment:: * field assignment::
* separator::
* if:: * if::
* end:: * end::
* date-format:: * date-format::
@ -479,7 +481,7 @@ also contain tags, as usual.
See TIPS below for more about setting amounts and currency. 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 2.3 field assignment
==================== ====================
@ -504,9 +506,27 @@ becomes '1' when interpolated) (#1051). See TIPS below for more about
referencing other fields. 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 if PATTERN
@ -565,7 +585,7 @@ banking thru software
 
File: hledger_csv.info, Node: end, Next: date-format, Prev: if, Up: CSV RULES 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 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 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 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 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 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 File: hledger_csv.info, Node: include, Next: balance-type, Prev: newest-first, Up: CSV RULES
2.8 'include' 2.9 'include'
============= =============
include RULESFILE include RULESFILE
@ -655,8 +675,8 @@ include categorisation.rules
 
File: hledger_csv.info, Node: balance-type, Prev: include, Up: CSV 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 Balance assertions generated by assigning to balanceN are of the simple
'=' type by default, which is a single-commodity, subaccount-excluding '=' 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:: * Rapid feedback::
* Valid CSV:: * Valid CSV::
* Other separator characters::
* Reading multiple CSV files:: * Reading multiple CSV files::
* Valid transactions:: * Valid transactions::
* Deduplicating importing:: * Deduplicating importing::
@ -712,7 +731,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: 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 3.2 Valid CSV
============= =============
@ -724,29 +743,9 @@ enclosed in quotes, note:
* spaces outside the quotes are not allowed * 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 3.3 Reading multiple CSV files
==============================
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
============================== ==============================
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,
@ -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 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 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 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 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 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: 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 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 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 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 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 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 Here's how to think of CSV rules being evaluated (if you really need
to). First, to). First,
@ -940,62 +939,62 @@ command the user specified.
 
Tag Table: Tag Table:
Node: Top72 Node: Top72
Node: EXAMPLES1835 Node: EXAMPLES1879
Ref: #examples1941 Ref: #examples1985
Node: Basic2149 Node: Basic2193
Ref: #basic2249 Ref: #basic2293
Node: Bank of Ireland2791 Node: Bank of Ireland2835
Ref: #bank-of-ireland2926 Ref: #bank-of-ireland2970
Node: Amazon4389 Node: Amazon4433
Ref: #amazon4507 Ref: #amazon4551
Node: Paypal6440 Node: Paypal6484
Ref: #paypal6534 Ref: #paypal6578
Node: CSV RULES14417 Node: CSV RULES14461
Ref: #csv-rules14526 Ref: #csv-rules14570
Node: skip14788 Node: skip14846
Ref: #skip14881 Ref: #skip14939
Node: fields15256 Node: fields15314
Ref: #fields15378 Ref: #fields15436
Node: Transaction field names16543 Node: Transaction field names16601
Ref: #transaction-field-names16703 Ref: #transaction-field-names16761
Node: Posting field names16814 Node: Posting field names16872
Ref: #posting-field-names16966 Ref: #posting-field-names17024
Node: field assignment18257 Node: field assignment18315
Ref: #field-assignment18393 Ref: #field-assignment18458
Node: if19211 Node: separator19276
Ref: #if19320 Ref: #separator19405
Node: end21036 Node: if19786
Ref: #end21142 Ref: #if19888
Node: date-format21366 Node: end21604
Ref: #date-format21498 Ref: #end21710
Node: newest-first22247 Node: date-format21934
Ref: #newest-first22385 Ref: #date-format22066
Node: include23068 Node: newest-first22815
Ref: #include23197 Ref: #newest-first22953
Node: balance-type23641 Node: include23636
Ref: #balance-type23759 Ref: #include23765
Node: TIPS24459 Node: balance-type24209
Ref: #tips24541 Ref: #balance-type24329
Node: Rapid feedback24809 Node: TIPS25029
Ref: #rapid-feedback24926 Ref: #tips25111
Node: Valid CSV25386 Node: Rapid feedback25348
Ref: #valid-csv25528 Ref: #rapid-feedback25465
Node: Other separator characters25720 Node: Valid CSV25925
Ref: #other-separator-characters25908 Ref: #valid-csv26067
Node: Reading multiple CSV files26347 Node: Reading multiple CSV files26259
Ref: #reading-multiple-csv-files26544 Ref: #reading-multiple-csv-files26439
Node: Valid transactions26785 Node: Valid transactions26680
Ref: #valid-transactions26963 Ref: #valid-transactions26858
Node: Deduplicating importing27591 Node: Deduplicating importing27486
Ref: #deduplicating-importing27770 Ref: #deduplicating-importing27665
Node: Setting amounts28803 Node: Setting amounts28698
Ref: #setting-amounts28972 Ref: #setting-amounts28867
Node: Setting currency/commodity29958 Node: Setting currency/commodity29853
Ref: #setting-currencycommodity30150 Ref: #setting-currencycommodity30045
Node: Referencing other fields30953 Node: Referencing other fields30848
Ref: #referencing-other-fields31153 Ref: #referencing-other-fields31048
Node: How CSV rules are evaluated32050 Node: How CSV rules are evaluated31945
Ref: #how-csv-rules-are-evaluated32223 Ref: #how-csv-rules-are-evaluated32116
 
End Tag Table End Tag Table

View File

@ -34,6 +34,7 @@ DESCRIPTION
field assignment assign a value to one field assignment assign a value to one
hledger field, with inter- hledger field, with inter-
polation polation
separator a custom field separator
if apply some rules to if apply some rules to
matched CSV records matched CSV records
end skip the remaining CSV end skip the remaining CSV
@ -427,6 +428,18 @@ CSV RULES
comes 1 when interpolated) (#1051). See TIPS below for more about ref- comes 1 when interpolated) (#1051). See TIPS below for more about ref-
erencing other fields. 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
if PATTERN if PATTERN
RULE RULE
@ -594,21 +607,6 @@ TIPS
o spaces outside the quotes are not allowed 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 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

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

View File

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

View File

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