summaryrefslogtreecommitdiff
path: root/doc/ledger3.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ledger3.texi')
-rw-r--r--doc/ledger3.texi135
1 files changed, 71 insertions, 64 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index cd1b59a8..482be6ba 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -7,24 +7,26 @@
@c a prefix arg). This updates the node pointers, which texinfmt.el
@c needs.
-@dircategory User Applications
@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
modification, are permitted provided that the following conditions are
met:
-- Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-- Neither the name of New Artisans LLC nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
+@itemize
+@item
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+@item
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+@item
+Neither the name of New Artisans LLC nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+@end itemize
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``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.
@end copying
+@dircategory User Applications
+@direntry
+* Ledger3: (ledger3). Command-Line Accounting
+@end direntry
+
@documentencoding UTF-8
@iftex
@@ -49,27 +56,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@title Ledger: Command-Line Accounting
@subtitle For Version 3.0 of Ledger
@author John Wiegley
+@page
+@vskip 0pt plus 1filll
+@insertcopying
@end titlepage
-@direntry
-* Ledger3: (ledger3). Command-Line Accounting
-@end direntry
-
@contents
@ifnottex
-@node Top, Copying, (dir), (dir)
+@node Top, Introduction to Ledger, (dir), (dir)
@top Overview
+
Ledger is a command line accounting tool that provides double-entry
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
twinkling in their father's CRT.
-@c @insertcopying
+
@end ifnottex
@menu
-* Copying::
* Introduction to Ledger::
* Ledger Tutorial::
* Principles of Accounting::
@@ -91,15 +97,7 @@ twinkling in their father's CRT.
* Command Index::
@end menu
-@node Copying, Introduction to Ledger, 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
+@node Introduction to Ledger, Ledger Tutorial, Top, Top
@chapter Introduction to Ledger
@menu
@@ -1521,7 +1519,7 @@ commodity name must be enclosed in double quotes @samp{"}:
1999/06/09 ! Achat
Actif:SG PEE STK 49.957 "Arcancia Équilibre 454"
Actif:SG PEE STK $-234.90
-
+
2000/12/08 ! Achat
Actif:SG PEE STK 215.796 "Arcancia Équilibre 455"
Actif:SG PEE STK $-10742.54
@@ -1938,7 +1936,7 @@ the alias to be used in place of the full account name anywhere that
account names are allowed.
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
"Unknown". Example:
@@ -2171,7 +2169,7 @@ payee KFC
alias KENTUCKY FRIED CHICKEN
@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:
@smallexample
@@ -4040,7 +4038,7 @@ part of the balance.
@findex balance
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
multiple types of commodities, each commodity's total is reported
separately.
@@ -4058,8 +4056,8 @@ balances for an account, such as when @ref{Archiving Previous Years}.
@findex register
The @command{register} command displays all the postings occurring
-in a single account, line by line. The account regexp must be
-specified as the only argument to this command. If any regexps occur
+in a single account, line by line. The account regex must be
+specified as the only argument to this command. If any regexes occur
after the required account name, the register will contain only those
postings that match. Very useful for hunting down a particular
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
format that can be parsed by Ledger. They will be properly formatted,
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.
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
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
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
@@ -4998,7 +4996,7 @@ Generate transactions based on previous postings
@subsection Basic Options
@ftable @code
-@item --help
+@item --help
@itemx -h
Print summary of all options
@@ -5435,7 +5433,11 @@ it will issue a warning giving you the file and line number of the
problem.
@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}
FIX THIS ENTRY @c FIXME thdox
@@ -6080,11 +6082,15 @@ Use only uncleared transactions in calculations and reports.
@item --unrealized
FIX THIS ENTRY
-@item --unrealized-gains @var{FIXME}
-FIX THIS ENTRY
+@item --unrealized-gains @var{STR}
+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}
-FIX THIS ENTRY
+@itemx --unrealized-losses @var{STR}
+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
Perform all calculations without rounding and display results to full
@@ -6129,7 +6135,8 @@ are using.
@item --file @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,
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.
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}
@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,
with or without a commodity. Use this for decimal values.
-@item /REGEXP/
-@itemx W/REGEXP/
+@item /REGEX/
+@itemx W/REGEX/
A regular expression that matches against an account's full name. If
a posting, this will match against the account affected by the
posting.
-@item //REGEXP/
-@itemx p/REGEXP/
+@item //REGEX/
+@itemx p/REGEX/
A regular expression that matches against a transaction's payee name.
-@item ///REGEXP/
-@itemx w/REGEXP/
+@item ///REGEX/
+@itemx w/REGEX/
A regular expression that matches against an account's base name. If
a posting, this will match against the account affected by the
posting.
-@item c/REGEXP/
+@item c/REGEX/
A regular expression that matches against the transaction code (the
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
comment field.
@@ -7379,15 +7386,15 @@ Return value rounded to n digits. Does not affect formatting.
@section Format String Basics
@findex --format @var{FORMAT_STRING}
@findex -F @var{FORMAT_STRING}
-@findex --balance-format
-@findex --budget-format
-@findex --cleared-format
-@findex --csv-format
-@findex --plot-amount-format
-@findex --plot-total-format
-@findex --pricedb-format
-@findex --prices-format
-@findex --register-format
+@findex --balance-format @var{FORMAT_STRING}
+@findex --budget-format @var{FORMAT_STRING}
+@findex --cleared-format @var{FORMAT_STRING}
+@findex --csv-format @var{FORMAT_STRING}
+@findex --plot-amount-format @var{FORMAT_STRING}
+@findex --plot-total-format @var{FORMAT_STRING}
+@findex --pricedb-format @var{FORMAT_STRING}
+@findex --prices-format @var{FORMAT_STRING}
+@findex --register-format @var{FORMAT_STRING}
Format strings may be used to change the output format of reports.
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 --format @var{FORMAT_STRING}
-As an example of how flexible the @code{--format} strings can be, the
-default balance format looks like this (the various functions are
-described later):
+As an example of how flexible the @code{--format @var{FORMAT_STRING}}
+strings can be, the default balance format looks like this (the
+various functions are described later):
@smallexample
"%(justify(scrub(display_total), 20, -1, true, color))"