Improve documentation for --auto-match option.

This commit is contained in:
thdox 2015-02-22 16:52:21 +01:00
parent 788ffc2a4b
commit 87d938f9c3
2 changed files with 19 additions and 10 deletions

View file

@ -368,8 +368,9 @@ Ignore init files and environment variables for the
.Nm .Nm
run. run.
.It Fl \-auto-match .It Fl \-auto-match
Automatically match accounts from ledger journal for transactions When generating a ledger transaction from a CSV file using the
during csv convert. .Ic convert
command, automatically match an account from the Ledger journal.
.It Fl \-aux-date .It Fl \-aux-date
Show auxiliary dates for all calculations. Show auxiliary dates for all calculations.
Alias for Alias for
@ -878,7 +879,7 @@ postings.
Display the sum of the revalued postings as the running total, which serves Display the sum of the revalued postings as the running total, which serves
to show unrealized capital in a gain/losses report. to show unrealized capital in a gain/losses report.
.It Fl \-rich-data .It Fl \-rich-data
When generating ledger transaction from CSV file using the When generating a ledger transaction from a CSV file using the
.Ic convert .Ic convert
command, add CSV, Imported, and UUID meta-data. command, add CSV, Imported, and UUID meta-data.
.It Fl \-seed Ar INT .It Fl \-seed Ar INT

View file

@ -4635,13 +4635,16 @@ Ledger will include @samp{; transid: 767718} in the first transaction
from the file above. from the file above.
@findex --invert @findex --invert
@findex --auto-match
@findex --account @var{STR} @findex --account @var{STR}
@findex --rich-data @findex --rich-data
The @command{convert} command accepts three options. They are The @command{convert} command accepts four options. They are
@option{--invert} which inverts the amount field, @option{--account @option{--invert} which inverts the amount field, @option{--auto-match}
@var{STR}} which you can use to specify the account to balance against, which automatically matches an account from the Ledger journal for every
and @option{--rich-data} which stores additional metadata as tags. CSV line, @option{--account @var{STR}} which you can use to specify the
account to balance against, and @option{--rich-data} which stores
additional tag/value pairs.
Using the two first lines of the above csv file, Using the two first lines of the above csv file,
@ -4686,6 +4689,10 @@ normal ledger file (specified via @option{--file @var{FILE} (-f)} or via
the environment variable @env{LEDGER_FILE}) this entry will not be the environment variable @env{LEDGER_FILE}) this entry will not be
printed again. printed again.
In the output above, the account is @samp{Expenses:Unknown} for CSV
lines. You can use the @option{--auto-match} option to automatically
match an account from your Ledger journal.
You can also use @command{convert} with @code{payee} and @code{account} You can also use @command{convert} with @code{payee} and @code{account}
directives. First, you can use the @code{payee} and @code{alias} directives. First, you can use the @code{payee} and @code{alias}
directive to rewrite the @code{payee} field based on some rules. Then directive to rewrite the @code{payee} field based on some rules. Then
@ -6117,8 +6124,9 @@ Set the width in characters of the amount column in the
Anonymize registry output, mostly for sending in bug reports. Anonymize registry output, mostly for sending in bug reports.
@item --auto-match @item --auto-match
Automatically match accounts from ledger journal for transactions When generating a ledger transaction from a CSV file using the
during csv convert. @command{convert} command, automatically match an account from the
Ledger journal.
@item --aux-date @item --aux-date
@itemx --effective @itemx --effective
@ -6667,7 +6675,7 @@ to show unrealized capital in a gain/losses report.
@item --rich-data @item --rich-data
@itemx --detail @itemx --detail
When generating ledger transaction from CSV file using the When generating a ledger transaction from a CSV file using the
@command{convert} command, add CSV, Imported, and UUID metadata. @command{convert} command, add CSV, Imported, and UUID metadata.
@item --seed @var{INT} @item --seed @var{INT}