doc: the latest input files doc updates

This commit is contained in:
Simon Michael 2016-11-22 14:20:17 -08:00
parent a1411768e5
commit 2eb5736abb
4 changed files with 404 additions and 447 deletions

View File

@ -423,7 +423,7 @@ $\ hledger\ \-f\ /some/file\ stats
\f[] \f[]
.fi .fi
.PP .PP
The file name \f[C]\-\f[] (hyphen) means standard input, as usual: The file name \f[C]\-\f[] (hyphen) means standard input:
.IP .IP
.nf .nf
\f[C] \f[C]
@ -431,46 +431,45 @@ $\ cat\ some.journal\ |\ hledger\ \-f\-
\f[] \f[]
.fi .fi
.PP .PP
Usually this file is in hledger\[aq]s journal format, but it can also be Usually the data file is in hledger\[aq]s journal format, but it can
one of several other formats, shown below. also be one of several other formats, listed below.
hledger tries to identify the format based on the file extension, as hledger detects the format automatically based on the file extension, or
follows: if that is not recognised, by trying each built\-in "reader" in turn:
.PP .PP
.TS .TS
tab(@); tab(@);
l l l. lw(10.7n) lw(33.2n) lw(26.1n).
T{ T{
Format: Reader:
T}@T{ T}@T{
Description: Reads:
T}@T{ T}@T{
File extensions: Used for file extensions:
T} T}
_ _
T{ T{
journal \f[C]journal\f[]
T}@T{ T}@T{
hledger\[aq]s journal format hledger\[aq]s journal format, also some Ledger journals
T}@T{ T}@T{
\f[C]\&.journal\f[], \f[C]\&.j\f[], \f[C]\&.hledger\f[], \f[C]\&.journal\f[] \f[C]\&.j\f[] \f[C]\&.hledger\f[] \f[C]\&.ledger\f[]
\f[C]\&.ledger\f[]
T} T}
T{ T{
timeclock \f[C]timeclock\f[]
T}@T{ T}@T{
timeclock files (precise time logging) timeclock files (precise time logging)
T}@T{ T}@T{
\f[C]\&.timeclock\f[] \f[C]\&.timeclock\f[]
T} T}
T{ T{
timedot \f[C]timedot\f[]
T}@T{ T}@T{
timedot files (approximate time logging) timedot files (approximate time logging)
T}@T{ T}@T{
\f[C]\&.timedot\f[] \f[C]\&.timedot\f[]
T} T}
T{ T{
CSV \f[C]csv\f[]
T}@T{ T}@T{
comma\-separated values (data interchange) comma\-separated values (data interchange)
T}@T{ T}@T{
@ -478,11 +477,9 @@ T}@T{
T} T}
.TE .TE
.PP .PP
hledger identifies the format based on the file extension if possible. If needed (eg to ensure correct error messages when a file has the
If that does not identify a known format, it tries each format in turn. "wrong" extension), you can force a specific reader/format by prepending
.PP it to the file path with a colon.
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: Examples:
.IP .IP
.nf .nf
@ -492,32 +489,10 @@ $\ echo\ \[aq]i\ 2009/13/1\ 08:00:00\[aq]\ |\ hledger\ print\ \-ftimeclock:\-
\f[] \f[]
.fi .fi
.PP .PP
Some other experimental formats are available but not yet used by You can also specify multiple \f[C]\-f\f[] options, to read multiple
default: files as one big journal.
.PP (Directives in one file will not affect the other files.
.TS If you need that, use the include directive instead.)
tab(@);
l l l.
T{
Format:
T}@T{
Description:
T}@T{
File extensions:
T}
_
T{
ledger
T}@T{
Ledger\[aq]s journal format (incomplete)
T}@T{
T}
.TE
.PP
You can specify multiple \f[C]\-f\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, use the include directive instead).
.SS Depth limiting .SS Depth limiting
.PP .PP
With the \f[C]\-\-depth\ N\f[] option, commands like account, balance With the \f[C]\-\-depth\ N\f[] option, commands like account, balance

View File

@ -337,44 +337,38 @@ $ hledger stats
$ hledger -f /some/file stats $ hledger -f /some/file stats
The file name `-' (hyphen) means standard input, as usual: The file name `-' (hyphen) means standard input:
$ cat some.journal | hledger -f- $ cat some.journal | hledger -f-
Usually this file is in hledger's journal format, but it can also be Usually the data file is in hledger's journal format, but it can
one of several other formats, shown below. hledger tries to identify the also be one of several other formats, listed below. hledger detects the
format based on the file extension, as follows: format automatically based on the file extension, or if that is not
recognised, by trying each built-in "reader" in turn:
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 `.journal' `.j' `.hledger'
timeclock timeclock files (precise time logging) `.timeclock' some Ledger journals `.ledger'
timedot timedot files (approximate time logging) `.timedot' `timeclock' timeclock files (precise time `.timeclock'
CSV comma-separated values (data interchange) `.csv' logging)
`timedot' timedot files (approximate time `.timedot'
logging)
`csv' comma-separated values (data `.csv'
interchange)
hledger identifies the format based on the file extension if If needed (eg to ensure correct error messages when a file has the
possible. If that does not identify a known format, it tries each "wrong" extension), you can force a specific reader/format by prepending
format in turn. it to the file path with a colon. Examples:
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:
$ 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 You can also specify multiple `-f' options, to read multiple files
default: as one big journal. (Directives in one file will not affect the other
files. If you need that, use the include directive instead.)
Format: Description: File extensions:
--------------------------------------------------------------------
ledger Ledger's journal format (incomplete)
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, use the include directive instead).
 
File: hledger.1.info, Node: Depth limiting, Next: Smart dates, Prev: Input files, Up: OPTIONS File: hledger.1.info, Node: Depth limiting, Next: Smart dates, Prev: Input files, Up: OPTIONS
@ -2175,91 +2169,91 @@ Node: Reporting options7583
Ref: #reporting-options7736 Ref: #reporting-options7736
Node: Input files9512 Node: Input files9512
Ref: #input-files9652 Ref: #input-files9652
Node: Depth limiting11677 Node: Depth limiting11489
Ref: #depth-limiting11817 Ref: #depth-limiting11629
Node: Smart dates12018 Node: Smart dates11830
Ref: #smart-dates12157 Ref: #smart-dates11969
Node: Report intervals13154 Node: Report intervals12966
Ref: #report-intervals13307 Ref: #report-intervals13119
Node: Period expressions13643 Node: Period expressions13455
Ref: #period-expressions13808 Ref: #period-expressions13620
Node: Regular expressions16143 Node: Regular expressions15955
Ref: #regular-expressions16285 Ref: #regular-expressions16097
Node: QUERIES17768 Node: QUERIES17580
Ref: #queries17872 Ref: #queries17684
Node: COMMANDS21511 Node: COMMANDS21323
Ref: #commands21625 Ref: #commands21437
Node: accounts22298 Node: accounts22110
Ref: #accounts22398 Ref: #accounts22210
Node: activity23380 Node: activity23192
Ref: #activity23492 Ref: #activity23304
Node: add23851 Node: add23663
Ref: #add23952 Ref: #add23764
Node: balance26611 Node: balance26423
Ref: #balance26724 Ref: #balance26536
Node: Flat mode29697 Node: Flat mode29509
Ref: #flat-mode29824 Ref: #flat-mode29636
Node: Depth limited balance reports30243 Node: Depth limited balance reports30055
Ref: #depth-limited-balance-reports30446 Ref: #depth-limited-balance-reports30258
Node: Multicolumn balance reports30867 Node: Multicolumn balance reports30679
Ref: #multicolumn-balance-reports31069 Ref: #multicolumn-balance-reports30881
Node: Market value35718 Node: Market value35530
Ref: #market-value35882 Ref: #market-value35694
Node: Custom balance output36375 Node: Custom balance output36187
Ref: #custom-balance-output36548 Ref: #custom-balance-output36360
Node: Output destination38652 Node: Output destination38464
Ref: #output-destination38817 Ref: #output-destination38629
Node: CSV output39087 Node: CSV output38899
Ref: #csv-output39206 Ref: #csv-output39018
Node: balancesheet39603 Node: balancesheet39415
Ref: #balancesheet39731 Ref: #balancesheet39543
Node: cashflow40383 Node: cashflow40195
Ref: #cashflow40500 Ref: #cashflow40312
Node: help41190 Node: help41002
Ref: #help41302 Ref: #help41114
Node: incomestatement42139 Node: incomestatement41951
Ref: #incomestatement42269 Ref: #incomestatement42081
Node: info42996 Node: info42808
Ref: #info43103 Ref: #info42915
Node: man43465 Node: man43277
Ref: #man43562 Ref: #man43374
Node: print43965 Node: print43777
Ref: #print44070 Ref: #print43882
Node: register45416 Node: register45228
Ref: #register45529 Ref: #register45341
Node: Custom register output50021 Node: Custom register output49833
Ref: #custom-register-output50152 Ref: #custom-register-output49964
Node: stats51449 Node: stats51261
Ref: #stats51555 Ref: #stats51367
Node: test52431 Node: test52243
Ref: #test52518 Ref: #test52330
Node: ADD-ON COMMANDS52885 Node: ADD-ON COMMANDS52697
Ref: #add-on-commands53021 Ref: #add-on-commands52833
Node: api54309 Node: api54121
Ref: #api54401 Ref: #api54213
Node: autosync54435 Node: autosync54247
Ref: #autosync54550 Ref: #autosync54362
Node: diff56865 Node: diff56677
Ref: #diff56975 Ref: #diff56787
Node: equity57639 Node: equity57451
Ref: #equity57753 Ref: #equity57565
Node: interest59081 Node: interest58893
Ref: #interest59198 Ref: #interest59010
Node: irr62282 Node: irr62094
Ref: #irr62395 Ref: #irr62207
Node: print-unique64770 Node: print-unique64582
Ref: #print-unique64900 Ref: #print-unique64712
Node: rewrite65158 Node: rewrite64970
Ref: #rewrite65277 Ref: #rewrite65089
Node: ui65806 Node: ui65618
Ref: #ui65906 Ref: #ui65718
Node: web65947 Node: web65759
Ref: #web66035 Ref: #web65847
Node: TROUBLESHOOTING66068 Node: TROUBLESHOOTING65880
Ref: #troubleshooting66187 Ref: #troubleshooting65999
Node: Run-time problems66241 Node: Run-time problems66053
Ref: #run-time-problems66384 Ref: #run-time-problems66196
Node: Known limitations68328 Node: Known limitations68140
Ref: #known-limitations68471 Ref: #known-limitations68283
 
End Tag Table End Tag Table

View File

@ -287,50 +287,37 @@ OPTIONS
$ hledger -f /some/file stats $ hledger -f /some/file stats
The file name - (hyphen) means standard input, as usual: The file name - (hyphen) means standard input:
$ cat some.journal | hledger -f- $ cat some.journal | hledger -f-
Usually this file is in hledger's journal format, but it can also be Usually the data file is in hledger's journal format, but it can also
one of several other formats, shown below. hledger tries to identify be one of several other formats, listed below. hledger detects the
the format based on the file extension, as follows: format automatically based on the file extension, or if that is not
recognised, by trying each built-in "reader" in turn:
Format: Description: File extensions: Reader: Reads: Used for file extensions:
------------------------------------------------------ -----------------------------------------------------------------------------
journal hledger's journal .journal, .j, journal hledger's journal format, also .journal .j .hledger
format .hledger, .ledger some Ledger journals .ledger
timeclock timeclock files .timeclock timeclock timeclock files (precise time .timeclock
(precise time log-
ging)
timedot timedot files .timedot
(approximate time
logging) logging)
CSV comma-separated .csv timedot timedot files (approximate time .timedot
values (data inter- logging)
change) csv comma-separated values (data .csv
interchange)
hledger identifies the format based on the file extension if possible. If needed (eg to ensure correct error messages when a file has the
If that does not identify a known format, it tries each format in turn. "wrong" extension), you can force a specific reader/format by prepend-
ing it to the file path with a colon. Examples:
If needed, eg to ensure correct error messages, you can force a spe-
cific format by prepending it to the file path with a colon. Examples:
$ 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 You can also specify multiple -f options, to read multiple files as one
default: big journal. (Directives in one file will not affect the other files.
If you need that, use the include directive instead.)
Format: Description: File extensions:
-------------------------------------------------
ledger Ledger's journal
format (incomplete)
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, use the include directive instead).
Depth limiting Depth limiting
With the --depth N option, commands like account, balance and register With the --depth N option, commands like account, balance and register
@ -411,6 +398,7 @@ OPTIONS
date like so: date like so:
-p "2009" the year 2009; equivalent -p "2009" the year 2009; equivalent
to "2009/1/1 to 2010/1/1" to "2009/1/1 to 2010/1/1"
-p "2009/1" the month of jan; equiva- -p "2009/1" the month of jan; equiva-

View File

@ -87,34 +87,34 @@ or with the `-f/--file` option:
$ hledger -f /some/file stats $ hledger -f /some/file stats
``` ```
The file name `-` (hyphen) means standard input, as usual: The file name `-` (hyphen) means standard input:
```bash ```bash
$ cat some.journal | hledger -f- $ cat some.journal | hledger -f-
``` ```
Usually this file is in hledger's journal format, Usually the data file is in hledger's journal format,
but it can also be one of several other formats. but it can also be one of several other formats, listed below.
Each one is handled by a built-in "reader", as follows: hledger detects the format automatically based on the file extension,
or if that is not recognised, by trying each built-in "reader" in turn:
| Reader:  | Reads: | Used for file extensions: | Reader: | Reads: | Used for file extensions:
|---------------------|-----------------------------------------------------|------------------------------------------- |-----------------|-------------------------------------------------------|-------------------------------------------
| `journal` | hledger's journal format, also some Ledger journals | `.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`
Usually hledger detects the format automatically based on the file extension, If needed (eg to ensure correct error messages when a file has the "wrong" extension),
or if that does not work, by trying each reader in turn. you can force a specific reader/format by prepending it to the file path with a colon.
If needed, eg to ensure correct error messages, you can force a specific reader/format 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:-
``` ```
You can specify multiple `-f` options, to read multiple files as one big journal. You can also specify multiple `-f` options, to read multiple files as one big journal.
Directives in one file will not affect the other files - if you need that, (Directives in one file will not affect the other files. If you need that,
use the [include directive](#including-other-files) instead. use the [include directive](#including-other-files) instead.)
## Depth limiting ## Depth limiting