Merge pull request #184 from thdox/documentation

Documentation
This commit is contained in:
John Wiegley 2013-05-01 12:04:34 -07:00
commit 786f76addf
2 changed files with 553 additions and 393 deletions

File diff suppressed because it is too large Load diff

View file

@ -7,24 +7,26 @@
@c a prefix arg). This updates the node pointers, which texinfmt.el @c a prefix arg). This updates the node pointers, which texinfmt.el
@c needs. @c needs.
@dircategory User Applications
@copying @copying
Copyright (c) 2003-2013, John Wiegley. All rights reserved. Copyright @copyright{} 2003-2013, John Wiegley. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are modification, are permitted provided that the following conditions are
met: met:
- Redistributions of source code must retain the above copyright @itemize
@item
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
@item
- Redistributions in binary form must reproduce the above copyright Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
@item
- Neither the name of New Artisans LLC nor the names of its Neither the name of New Artisans LLC nor the names of its
contributors may be used to endorse or promote products derived from contributors may be used to endorse or promote products derived from
this software without specific prior written permission. this software without specific prior written permission.
@end itemize
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@ -39,6 +41,11 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@end copying @end copying
@dircategory User Applications
@direntry
* Ledger3: (ledger3). Command-Line Accounting
@end direntry
@documentencoding UTF-8 @documentencoding UTF-8
@iftex @iftex
@ -49,27 +56,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@title Ledger: Command-Line Accounting @title Ledger: Command-Line Accounting
@subtitle For Version 3.0 of Ledger @subtitle For Version 3.0 of Ledger
@author John Wiegley @author John Wiegley
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage @end titlepage
@direntry
* Ledger3: (ledger3). Command-Line Accounting
@end direntry
@contents @contents
@ifnottex @ifnottex
@node Top, Copying, (dir), (dir) @node Top, Introduction to Ledger, (dir), (dir)
@top Overview @top Overview
Ledger is a command line accounting tool that provides double-entry Ledger is a command line accounting tool that provides double-entry
accounting based on a text journal. It provides no bells or whistles, accounting based on a text journal. It provides no bells or whistles,
and returns the user to the days before user interfaces were even a and returns the user to the days before user interfaces were even a
twinkling in their father's CRT. twinkling in their father's CRT.
@c @insertcopying
@end ifnottex @end ifnottex
@menu @menu
* Copying::
* Introduction to Ledger:: * Introduction to Ledger::
* Ledger Tutorial:: * Ledger Tutorial::
* Principles of Accounting:: * Principles of Accounting::
@ -91,15 +97,7 @@ twinkling in their father's CRT.
* Command Index:: * Command Index::
@end menu @end menu
@node Copying, Introduction to Ledger, Top, Top @node Introduction to Ledger, Ledger Tutorial, Top, Top
@chapter Copying
@insertcopying
This license can also be obtained from the command-line by executing
@code{ledger --license}
@node Introduction to Ledger, Ledger Tutorial, Copying, Top
@chapter Introduction to Ledger @chapter Introduction to Ledger
@menu @menu
@ -1938,7 +1936,7 @@ the alias to be used in place of the full account name anywhere that
account names are allowed. account names are allowed.
The @code{payee} sub-directive, which can occur multiple times, The @code{payee} sub-directive, which can occur multiple times,
provides regexps that identify the account if that payee is provides regexes that identify the account if that payee is
encountered and an account within its transaction ends in the name encountered and an account within its transaction ends in the name
"Unknown". Example: "Unknown". Example:
@ -2171,7 +2169,7 @@ payee KFC
alias KENTUCKY FRIED CHICKEN alias KENTUCKY FRIED CHICKEN
@end smallexample @end smallexample
The @code{alias} directive provides a regexp which, if it matches The @code{alias} directive provides a regex which, if it matches
a parsed payee, the declared payee name is substituted: a parsed payee, the declared payee name is substituted:
@smallexample @smallexample
@ -4040,7 +4038,7 @@ part of the balance.
@findex balance @findex balance
The @command{balance} command reports the current balance of all The @command{balance} command reports the current balance of all
accounts. It accepts a list of optional regexps, which confine the accounts. It accepts a list of optional regexes, which confine the
balance report to the matching accounts. If an account contains balance report to the matching accounts. If an account contains
multiple types of commodities, each commodity's total is reported multiple types of commodities, each commodity's total is reported
separately. separately.
@ -4058,8 +4056,8 @@ balances for an account, such as when @ref{Archiving Previous Years}.
@findex register @findex register
The @command{register} command displays all the postings occurring The @command{register} command displays all the postings occurring
in a single account, line by line. The account regexp must be in a single account, line by line. The account regex must be
specified as the only argument to this command. If any regexps occur specified as the only argument to this command. If any regexes occur
after the required account name, the register will contain only those after the required account name, the register will contain only those
postings that match. Very useful for hunting down a particular postings that match. Very useful for hunting down a particular
posting. posting.
@ -4082,7 +4080,7 @@ order to plot either the amount or total column, respectively.
The @command{print} command prints out ledger transactions in a textual The @command{print} command prints out ledger transactions in a textual
format that can be parsed by Ledger. They will be properly formatted, format that can be parsed by Ledger. They will be properly formatted,
and output in the most economic form possible. The ``print'' command and output in the most economic form possible. The ``print'' command
also takes a list of optional regexps, which will cause only those also takes a list of optional regexes, which will cause only those
postings which match in some way to be printed. postings which match in some way to be printed.
The @command{print} command can be a handy way to clean up a ledger The @command{print} command can be a handy way to clean up a ledger
@ -4199,7 +4197,7 @@ is from the file above.
The @code{convert} command accepts three options, the most important The @code{convert} command accepts three options, the most important
ones are @code{--invert} which inverts the amount field, and ones are @code{--invert} which inverts the amount field, and
@code{--account @var{NAME}} which you can use to specify the account to @code{--account @var{STR}} which you can use to specify the account to
balance against and @code{--rich-data}. When using the rich-data balance against and @code{--rich-data}. When using the rich-data
switch additional metadata is stored as tags. There is, for example, switch additional metadata is stored as tags. There is, for example,
a UUID field. If an entry with the same UUID tag is already included a UUID field. If an entry with the same UUID tag is already included
@ -5435,7 +5433,11 @@ it will issue a warning giving you the file and line number of the
problem. problem.
@item --time-colon @item --time-colon
FIX THIS ENTRY @c FIXME thdox The --time-colon option will display the value for a seconds based
commodity as real hours and minutes.
For example 8100 seconds by default will be displayed as 2.25 whereas
with the --time-colon option they will be displayed as 2:15.
@item --value-expr @var{FIXME} @item --value-expr @var{FIXME}
FIX THIS ENTRY @c FIXME thdox FIX THIS ENTRY @c FIXME thdox
@ -6080,11 +6082,15 @@ Use only uncleared transactions in calculations and reports.
@item --unrealized @item --unrealized
FIX THIS ENTRY FIX THIS ENTRY
@item --unrealized-gains @var{FIXME} @item --unrealized-gains @var{STR}
FIX THIS ENTRY Allow the user to specify what account name should be used for
unrealized gains. Defaults to @samp{"Equity:Unrealized Gains"}.
Often set in one's @file{~/.ledgerrc} file to change default.
@item --unrealized-losses @var{FIXME} @itemx --unrealized-losses @var{STR}
FIX THIS ENTRY Allow the user to specify what account name should be used for
unrealized gains. Defaults to @samp{"Equity:Unrealized Losses"}.
Often set in one's @file{~/.ledgerrc} file to change default.
@item --unround @item --unround
Perform all calculations without rounding and display results to full Perform all calculations without rounding and display results to full
@ -6129,7 +6135,8 @@ are using.
@item --file @var{FILE} @item --file @var{FILE}
@itemx -f @var{FILE} @itemx -f @var{FILE}
Read @file{FILE} as a ledger file. This command may be used multiple Read @file{FILE} as a ledger file. @var{FILE} can be @samp{-} that is
a synonym of @samp{/dev/stdin}. This command may be used multiple
times. Typically, the environment variable @env{LEDGER_FILE} is set, times. Typically, the environment variable @env{LEDGER_FILE} is set,
rather than using this command-line option. rather than using this command-line option.
@ -6611,7 +6618,7 @@ updating the price-db file. The best way is to have your price
download script maintain this file. download script maintain this file.
The format of the file can be changed by telling ledger to use the The format of the file can be changed by telling ledger to use the
@code{--pricedb-format} you define. @code{--pricedb-format @var{FORMAT_STRING}} you define.
@item --price-exp @var{INT} @item --price-exp @var{INT}
@itemx -L @var{INT} @itemx -L @var{INT}
@ -7268,27 +7275,27 @@ A plain integer represents a commodity-less amount.
An amount in braces can be any kind of amount supported by ledger, An amount in braces can be any kind of amount supported by ledger,
with or without a commodity. Use this for decimal values. with or without a commodity. Use this for decimal values.
@item /REGEXP/ @item /REGEX/
@itemx W/REGEXP/ @itemx W/REGEX/
A regular expression that matches against an account's full name. If A regular expression that matches against an account's full name. If
a posting, this will match against the account affected by the a posting, this will match against the account affected by the
posting. posting.
@item //REGEXP/ @item //REGEX/
@itemx p/REGEXP/ @itemx p/REGEX/
A regular expression that matches against a transaction's payee name. A regular expression that matches against a transaction's payee name.
@item ///REGEXP/ @item ///REGEX/
@itemx w/REGEXP/ @itemx w/REGEX/
A regular expression that matches against an account's base name. If A regular expression that matches against an account's base name. If
a posting, this will match against the account affected by the a posting, this will match against the account affected by the
posting. posting.
@item c/REGEXP/ @item c/REGEX/
A regular expression that matches against the transaction code (the A regular expression that matches against the transaction code (the
text that occurs between parentheses before the payee name). text that occurs between parentheses before the payee name).
@item e/REGEXP/ @item e/REGEX/
A regular expression that matches against a posting's note, or A regular expression that matches against a posting's note, or
comment field. comment field.
@ -7379,15 +7386,15 @@ Return value rounded to n digits. Does not affect formatting.
@section Format String Basics @section Format String Basics
@findex --format @var{FORMAT_STRING} @findex --format @var{FORMAT_STRING}
@findex -F @var{FORMAT_STRING} @findex -F @var{FORMAT_STRING}
@findex --balance-format @findex --balance-format @var{FORMAT_STRING}
@findex --budget-format @findex --budget-format @var{FORMAT_STRING}
@findex --cleared-format @findex --cleared-format @var{FORMAT_STRING}
@findex --csv-format @findex --csv-format @var{FORMAT_STRING}
@findex --plot-amount-format @findex --plot-amount-format @var{FORMAT_STRING}
@findex --plot-total-format @findex --plot-total-format @var{FORMAT_STRING}
@findex --pricedb-format @findex --pricedb-format @var{FORMAT_STRING}
@findex --prices-format @findex --prices-format @var{FORMAT_STRING}
@findex --register-format @findex --register-format @var{FORMAT_STRING}
Format strings may be used to change the output format of reports. Format strings may be used to change the output format of reports.
They are specified by passing a formatting string to the @code{-F They are specified by passing a formatting string to the @code{-F
@ -7550,9 +7557,9 @@ same format string is used for all postings.
@findex --balance-format @var{FORMAT_STRING} @findex --balance-format @var{FORMAT_STRING}
@findex --format @var{FORMAT_STRING} @findex --format @var{FORMAT_STRING}
As an example of how flexible the @code{--format} strings can be, the As an example of how flexible the @code{--format @var{FORMAT_STRING}}
default balance format looks like this (the various functions are strings can be, the default balance format looks like this (the
described later): various functions are described later):
@smallexample @smallexample
"%(justify(scrub(display_total), 20, -1, true, color))" "%(justify(scrub(display_total), 20, -1, true, color))"