doc: input files cleanup
This commit is contained in:
parent
b8d1698865
commit
64a877bff0
@ -93,31 +93,31 @@ $ cat some.journal | hledger -f-
|
|||||||
```
|
```
|
||||||
|
|
||||||
Usually this file is in hledger's journal format,
|
Usually this file is in hledger's journal format,
|
||||||
but it can also be one of several other formats, shown below.
|
but it can also be one of several other formats.
|
||||||
hledger tries to identify the format based on the file extension, as follows:
|
Each one is handled by a built-in "reader", as follows:
|
||||||
|
|
||||||
| Format: | Description: | File extensions:
|
| Reader: | Reads: | Used for file extensions:
|
||||||
|------------|---------------------------------------------|-------------------------------------------
|
|---------------------|-----------------------------------------------------|-------------------------------------------
|
||||||
| journal | hledger's journal format | `.journal`, `.j`, `.hledger`, `.ledger`
|
| `journal` | hledger's journal format, also some Ledger journals | `.journal` `.j` `.hledger` `.ledger`
|
||||||
| timeclock | timeclock files (precise time logging) | `.timeclock`
|
| `timeclock` | timeclock files (precise time logging) | `.timeclock`
|
||||||
| timedot | timedot files (approximate time logging) | `.timedot`
|
| `timedot` | timedot files (approximate time logging) | `.timedot`
|
||||||
| CSV | comma-separated values (data interchange) | `.csv`
|
| `CSV` | comma-separated values (data interchange) | `.csv`
|
||||||
|
|
||||||
hledger identifies the format based on the file extension if possible.
|
Usually hledger identifies the correct format automatically based on the file extension,
|
||||||
If that does not identify a known format, it tries each format in turn.
|
or if that does not work, by trying each format in turn.
|
||||||
|
If needed - eg to ensure correct error messages - you can force a specific format
|
||||||
If needed, eg to ensure correct error messages, you can force a specific format
|
|
||||||
by prepending it to the file path with a colon. Examples:
|
by prepending it to the file path with a colon. Examples:
|
||||||
```bash
|
```bash
|
||||||
$ hledger -f csv:/some/csv-file.dat stats
|
$ hledger -f csv:/some/csv-file.dat stats
|
||||||
$ echo 'i 2009/13/1 08:00:00' | hledger print -ftimeclock:-
|
$ echo 'i 2009/13/1 08:00:00' | hledger print -ftimeclock:-
|
||||||
```
|
```
|
||||||
|
|
||||||
Some other experimental formats are available but not yet used by default:
|
This experimental reader is also available but not used by default:
|
||||||
|
|
||||||
|
| Reader: | Reads: | File extensions:
|
||||||
|
|---------------------|---------------------------------------------|-------------------------------------------
|
||||||
|
| `ledger` | Ledger's journal format (incomplete) |
|
||||||
|
|
||||||
| Format: | Description: | File extensions:
|
|
||||||
|------------|---------------------------------------------|-------------------------------------------
|
|
||||||
| ledger | Ledger's journal format (incomplete) |
|
|
||||||
|
|
||||||
You can specify multiple `-f` options, to read multiple files as one big journal.
|
You can specify multiple `-f` options, to read multiple files as one big journal.
|
||||||
Directives in one file will not affect subsequent files in this case (if you need that,
|
Directives in one file will not affect subsequent files in this case (if you need that,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user