docs: manual

This commit is contained in:
Simon Michael 2010-12-09 00:33:35 +00:00
parent 8e1613bf03
commit 1df7a009e6

View File

@ -120,9 +120,9 @@ command which can change everything.
[Filter patterns](#filter-patterns) are often used to select a subset of the [Filter patterns](#filter-patterns) are often used to select a subset of the
journal data, eg to report only food-related transactions. journal data, eg to report only food-related transactions.
To try it out, just run `hledger add` and enter some transactions. (Or, To try it out, save the [sample file](#journal-file) as `.journal` in your
save the [sample file](#journal-file) as `.journal` in your home home directory, or just run `hledger add` and enter some transactions. Now
directory.) Now try some of these commands: try some of these commands:
$ hledger --help # show command-line help $ hledger --help # show command-line help
$ hledger add # add some new transactions to the journal file $ hledger add # add some new transactions to the journal file
@ -257,14 +257,16 @@ Each transaction has a date, optional description, and two or more
postings, of some amount to some account. The amounts within a transaction must balance, postings, of some amount to some account. The amounts within a transaction must balance,
ie add up to 0. Or, you can leave one amount blank and it will be inferred. ie add up to 0. Or, you can leave one amount blank and it will be inferred.
Note that account names may contain single spaces, while the amount must Account names typically have several parts separated by a colon, from
be separated from the account name by at least two spaces. which hledger will derive a hierarchical chart of accounts. Account names
may contain single spaces.
An amount is a number, with an optional currency symbol or commodity name After the account name, separated by at least *two* spaces, there is
on either the left or right. Commodity names which contain more than just usually an amount. This is a number, optionally with a currency symbol or
letters should be enclosed in double quotes. Negative amounts usually have commodity name on either the left or right. Commodity names which contain
the minus sign next to the number (`$-1`), but it may also go before the more than just letters should be enclosed in double quotes. Negative
currency symbol/commodity name (`-$1`). amounts usually have the minus sign next to the number (`$-1`), but it may
also go before a currency symbol (`-$1`).
hledger's file format aims to be compatible with c++ ledger, so you hledger's file format aims to be compatible with c++ ledger, so you
can use both tools on your journal. For more details, see [File format can use both tools on your journal. For more details, see [File format
@ -823,19 +825,18 @@ A `-p/--period` option on the command line will cause any
#### Display expressions #### Display expressions
Unlike a [period expression](#period-expressions), which selects the Unlike a [period expression](#period-expressions), which selects the
transactions to be used for calculation, a display expression specified transactions to be used for calculation, a display expression (specified
with the `-d/--display` option selects which transactions will be with `-d/--display`) selects which transactions will be displayed. This
displayed. This useful, say, if you want to see your checking register useful, say, if you want to see your checking register just for this
just for this month, but with an accurate running balance based on all month, but with an accurate running balance based on all transactions. Eg:
transactions. Eg:
$ hledger register checking --display "d>=[1]" $ hledger register checking --display "d>=[1]"
meaning "make a register report of all checking transactions, but display meaning "make a register report of all checking transactions, but display
only the ones with date on or after the 1st of this month." only the ones with date on or after the 1st of this month."
This is really all that we support of c++ ledger's display expressions: This is currently the only kind of display expression that we support, ie
namely transactions before or after a given (smart) date. transactions before or after a given (smart) date.
#### Depth limiting #### Depth limiting