;doc: csv: sync TOC and cheatsheet links
This commit is contained in:
parent
214cb35e02
commit
c7c2229913
@ -2827,14 +2827,14 @@ Blank lines and lines beginning with `#` or `;` or `*` are ignored.
|
|||||||
| [**`skip`**](#skip) | skip one or more header lines at start of file |
|
| [**`skip`**](#skip) | skip one or more header lines at start of file |
|
||||||
| [**`date-format`**](#date-format) | declare how to parse dates in CSV records |
|
| [**`date-format`**](#date-format) | declare how to parse dates in CSV records |
|
||||||
| [**`timezone`**](#timezone) | declare the time zone of ambiguous CSV date-times |
|
| [**`timezone`**](#timezone) | declare the time zone of ambiguous CSV date-times |
|
||||||
| [**`decimal-mark`**](#decimal-mark-1) | declare the decimal mark used in CSV amounts, if ambiguous |
|
|
||||||
| [**`newest-first`**](#newest-first) | improve txn order when: there are multiple records, newest first, all with the same date |
|
| [**`newest-first`**](#newest-first) | improve txn order when: there are multiple records, newest first, all with the same date |
|
||||||
| [**`intra-day-reversed`**](#intra-day-reversed) | improve txn order when: same-day txns are in opposite order to the overall file |
|
| [**`intra-day-reversed`**](#intra-day-reversed) | improve txn order when: same-day txns are in opposite order to the overall file |
|
||||||
| [**`balance-type`**](#balance-type) | select which type of balance assignments to use |
|
| [**`decimal-mark`**](#decimal-mark-1) | declare the decimal mark used in CSV amounts, if ambiguous |
|
||||||
| [**`fields`**](#fields-list) | name CSV fields for easy reference, and optionally assign their values to hledger fields |
|
| [**`fields` list**](#fields-list) | name CSV fields for easy reference, and optionally assign their values to hledger fields |
|
||||||
| [**Field assignment**](#field-assignment) | assign a CSV value or interpolated text value to a hledger field, constructing the txn |
|
| [**Field assignment**](#field-assignment) | assign a CSV value or interpolated text value to a hledger field |
|
||||||
| [**`if` block**](#if-block) | conditionally assign values to hledger fields, or `skip` a record or `end` (skip rest of file) |
|
| [**`if` block**](#if-block) | conditionally assign values to hledger fields, or `skip` a record or `end` (skip rest of file) |
|
||||||
| [**`if` table**](#if-table) | conditionally assign values to hledger fields, using compact syntax |
|
| [**`if` table**](#if-table) | conditionally assign values to hledger fields, using compact syntax |
|
||||||
|
| [**`balance-type`**](#balance-type) | select which type of balance assignments to generate |
|
||||||
| [**`include`**](#include) | inline another CSV rules file |
|
| [**`include`**](#include) | inline another CSV rules file |
|
||||||
|
|
||||||
## `separator`
|
## `separator`
|
||||||
@ -2935,21 +2935,6 @@ $ TZ=-1000 hledger print -f foo.csv # or TZ=-1000 hledger import foo.csv
|
|||||||
"UTC", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", or "PDT".
|
"UTC", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", or "PDT".
|
||||||
For others, use numeric format: +HHMM or -HHMM.
|
For others, use numeric format: +HHMM or -HHMM.
|
||||||
|
|
||||||
## `decimal-mark`
|
|
||||||
|
|
||||||
```rules
|
|
||||||
decimal-mark .
|
|
||||||
```
|
|
||||||
or:
|
|
||||||
```rules
|
|
||||||
decimal-mark ,
|
|
||||||
```
|
|
||||||
|
|
||||||
hledger automatically accepts either period or comma as a decimal mark when parsing numbers
|
|
||||||
(cf [Amounts](#amounts)).
|
|
||||||
However if any numbers in the CSV contain digit group marks, such as thousand-separating commas,
|
|
||||||
you should declare the decimal mark explicitly with this rule, to avoid misparsed numbers.
|
|
||||||
|
|
||||||
## `newest-first`
|
## `newest-first`
|
||||||
|
|
||||||
hledger tries to ensure that the generated transactions will be ordered chronologically,
|
hledger tries to ensure that the generated transactions will be ordered chronologically,
|
||||||
@ -2990,6 +2975,21 @@ intra-day-reversed
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `decimal-mark`
|
||||||
|
|
||||||
|
```rules
|
||||||
|
decimal-mark .
|
||||||
|
```
|
||||||
|
or:
|
||||||
|
```rules
|
||||||
|
decimal-mark ,
|
||||||
|
```
|
||||||
|
|
||||||
|
hledger automatically accepts either period or comma as a decimal mark when parsing numbers
|
||||||
|
(cf [Amounts](#amounts)).
|
||||||
|
However if any numbers in the CSV contain digit group marks, such as thousand-separating commas,
|
||||||
|
you should declare the decimal mark explicitly with this rule, to avoid misparsed numbers.
|
||||||
|
|
||||||
## `fields` list
|
## `fields` list
|
||||||
|
|
||||||
```rules
|
```rules
|
||||||
@ -3315,28 +3315,6 @@ atm transaction fee,expenses:business:banking,deductible? check it
|
|||||||
2020/01/12.*Plumbing LLC,expenses:house:upkeep,emergency plumbing call-out
|
2020/01/12.*Plumbing LLC,expenses:house:upkeep,emergency plumbing call-out
|
||||||
```
|
```
|
||||||
|
|
||||||
## `include`
|
|
||||||
|
|
||||||
```rules
|
|
||||||
include RULESFILE
|
|
||||||
```
|
|
||||||
|
|
||||||
This includes the contents of another CSV rules file at this point.
|
|
||||||
`RULESFILE` is an absolute file path or a path relative to the current file's directory.
|
|
||||||
This can be useful for sharing common rules between several rules files, eg:
|
|
||||||
```rules
|
|
||||||
# someaccount.csv.rules
|
|
||||||
|
|
||||||
## someaccount-specific rules
|
|
||||||
fields date,description,amount
|
|
||||||
account1 assets:someaccount
|
|
||||||
account2 expenses:misc
|
|
||||||
|
|
||||||
## common rules
|
|
||||||
include categorisation.rules
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## `balance-type`
|
## `balance-type`
|
||||||
|
|
||||||
Balance assertions generated by [assigning to balanceN](#posting-field-names)
|
Balance assertions generated by [assigning to balanceN](#posting-field-names)
|
||||||
@ -3359,6 +3337,27 @@ Here are the balance assertion types for quick reference:
|
|||||||
==* multi commodity, include subaccounts
|
==* multi commodity, include subaccounts
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `include`
|
||||||
|
|
||||||
|
```rules
|
||||||
|
include RULESFILE
|
||||||
|
```
|
||||||
|
|
||||||
|
This includes the contents of another CSV rules file at this point.
|
||||||
|
`RULESFILE` is an absolute file path or a path relative to the current file's directory.
|
||||||
|
This can be useful for sharing common rules between several rules files, eg:
|
||||||
|
```rules
|
||||||
|
# someaccount.csv.rules
|
||||||
|
|
||||||
|
## someaccount-specific rules
|
||||||
|
fields date,description,amount
|
||||||
|
account1 assets:someaccount
|
||||||
|
account2 expenses:misc
|
||||||
|
|
||||||
|
## common rules
|
||||||
|
include categorisation.rules
|
||||||
|
```
|
||||||
|
|
||||||
## CSV rules tips
|
## CSV rules tips
|
||||||
|
|
||||||
### Rapid feedback
|
### Rapid feedback
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user