From 459f587012121f8b81f06c9eb807337c5178009e Mon Sep 17 00:00:00 2001 From: thdox Date: Thu, 12 Feb 2015 23:46:37 +0100 Subject: Improve documentation about --rich-data. Conflicts: doc/ledger.1 --- doc/ledger3.texi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 936a69e0..56796374 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -6629,10 +6629,8 @@ to show unrealized capital in a gain/losses report. @item --rich-data @itemx --detail -@c When generating ledger transaction from csv using the convert command -@c add CSV, Imported, and UUID meta-data. -@c see test/baeline/opt-rich-data.test -@value{FIXME:UNDOCUMENTED} +When generating ledger transaction from CSV file using the +@command{convert} command, add CSV, Imported, and UUID meta-data. @item --seed @var{INT} Set the random seed to @var{INT} for the @code{generate} command. -- cgit v1.2.3 From a931f0ea33a2b5d28aeecc938747db979096b58c Mon Sep 17 00:00:00 2001 From: thdox Date: Fri, 13 Feb 2015 21:57:36 +0100 Subject: Add example for --rich-data option. And add explanation for associated tags. [ci skip] Conflicts: doc/ledger3.texi --- doc/ledger3.texi | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 56796374..8b20784b 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -4638,14 +4638,43 @@ from the file above. @findex --account @var{STR} @findex --rich-data -The @command{convert} command accepts three options. They are -@option{--invert} which inverts the amount field, -@option{--account @var{STR}} which you can use to specify the account to -balance against, and @option{--rich-data} which stores -additional metadata as tags. There is, for example, -a UUID field. If an entry with the same UUID tag is already included in -the normal ledger file (specified via @option{--file @var{FILE} (-f)} or -via the environment variable @env{LEDGER_FILE}) this entry will not be +The @command{convert} command accepts three options. They are +@option{--invert} which inverts the amount field, @option{--account +@var{STR}} which you can use to specify the account to balance against, +and @option{--rich-data} which stores additional metadata as tags. + +Using following command on the two first lines of the above csv file, + +@smallexample +$ ledger convert download.csv --input-date-format "%m/%d/%Y" \ + --invert --account Assets:MyBank --rich-data +@end smallexample + +you will get the result below: + +@smallexample +2011/12/13 * Withdrawal ;ACE HARDWARE 16335 S HOUGHTON RD + ; CSV: 767718,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-8.80,,00001640.04,, + ; Imported: 2012/01/13 + ; UUID: dfdc3c3d5c54c6967dd39d5b4e4fd1ea76e87233 + Expenses:Unknown 8.8 + Assets:MyBank + +2011/12/13 * Withdrawal ;ACE HARDWARE 16335 S HOUGHTON RD + ; CSV: 767406,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-1.03,,00001648.84,, + ; Imported: 2012/01/13 + ; UUID: 63086448b1f29f7fd6efb11ea40660185a213f9d + Expenses:Unknown 1.03 + Assets:MyBank +@end smallexample + +The three added metadata are: @samp{CSV} as the original line from csv +file, @samp{Imported} as the date when the csv file was imported into +Ledger, and @samp{UUID} as a checksum of original csv line. + +If an entry with the same @samp{UUID} tag is already included in the +normal ledger file (specified via @option{--file @var{FILE} (-f)} or via +the environment variable @env{LEDGER_FILE}) this entry will not be printed again. You can also use @command{convert} with @code{payee} and @code{account} -- cgit v1.2.3 From b2487b8aadd11195a131cae4c40485c1a796b86a Mon Sep 17 00:00:00 2001 From: thdox Date: Wed, 18 Feb 2015 19:36:04 +0100 Subject: Add TODO tag Because DocTests.py not able (yet?) to handle multi-line ledger commands. --- doc/ledger3.texi | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 8b20784b..48d1449e 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -4645,6 +4645,7 @@ and @option{--rich-data} which stores additional metadata as tags. Using following command on the two first lines of the above csv file, +@c TODO: does not @c command:validate due to multiple lines @smallexample $ ledger convert download.csv --input-date-format "%m/%d/%Y" \ --invert --account Assets:MyBank --rich-data -- cgit v1.2.3 From e0f7b637cf339838334b42ab02f84ead4efa3635 Mon Sep 17 00:00:00 2001 From: thdox Date: Wed, 18 Feb 2015 23:30:32 +0100 Subject: Add UUID to rich-data test. --- doc/ledger3.texi | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 48d1449e..4c108331 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -4643,17 +4643,23 @@ The @command{convert} command accepts three options. They are @var{STR}} which you can use to specify the account to balance against, and @option{--rich-data} which stores additional metadata as tags. -Using following command on the two first lines of the above csv file, +Using the two first lines of the above csv file, -@c TODO: does not @c command:validate due to multiple lines -@smallexample +@smallexample @c input:DD85579 +767718,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-8.80,,00001640.04,, +767406,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-1.03,,00001648.84,, +@end smallexample + +and launching the below command, + +@smallexample @c command:DD85579 $ ledger convert download.csv --input-date-format "%m/%d/%Y" \ --invert --account Assets:MyBank --rich-data @end smallexample -you will get the result below: +you will get the result: -@smallexample +@smallexample @c result:DD85579 2011/12/13 * Withdrawal ;ACE HARDWARE 16335 S HOUGHTON RD ; CSV: 767718,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-8.80,,00001640.04,, ; Imported: 2012/01/13 -- cgit v1.2.3 From 557ef398e69815c99b11aba0eb96b902089bc080 Mon Sep 17 00:00:00 2001 From: thdox Date: Sat, 21 Feb 2015 19:11:36 +0100 Subject: Update to be compliant with file & with_file. --- doc/ledger3.texi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 4c108331..81777d09 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -4645,21 +4645,23 @@ and @option{--rich-data} which stores additional metadata as tags. Using the two first lines of the above csv file, -@smallexample @c input:DD85579 +@smallexample @c file:B2EA7E8 +,date,payee,note,amount,,,code, 767718,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-8.80,,00001640.04,, 767406,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-1.03,,00001648.84,, @end smallexample and launching the below command, -@smallexample @c command:DD85579 +@smallexample @c command:B2EA7E8,with_file:download.csv $ ledger convert download.csv --input-date-format "%m/%d/%Y" \ - --invert --account Assets:MyBank --rich-data + --invert --account Assets:MyBank --rich-data \ + --file sample.dat --now=2012/01/13 \ @end smallexample you will get the result: -@smallexample @c result:DD85579 +@smallexample @c output:B2EA7E8 2011/12/13 * Withdrawal ;ACE HARDWARE 16335 S HOUGHTON RD ; CSV: 767718,12/13/2011,"Withdrawal","ACE HARDWARE 16335 S HOUGHTON RD",-8.80,,00001640.04,, ; Imported: 2012/01/13 -- cgit v1.2.3 From 78bf3698982bec208bd17fbf0c61b25133acfb1c Mon Sep 17 00:00:00 2001 From: thdox Date: Sat, 21 Feb 2015 21:05:31 +0100 Subject: Small typo. --- doc/ledger3.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 81777d09..5e1faf7e 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -4656,7 +4656,7 @@ and launching the below command, @smallexample @c command:B2EA7E8,with_file:download.csv $ ledger convert download.csv --input-date-format "%m/%d/%Y" \ --invert --account Assets:MyBank --rich-data \ - --file sample.dat --now=2012/01/13 \ + --file sample.dat --now=2012/01/13 @end smallexample you will get the result: -- cgit v1.2.3 From 2778a24356d7a374a2d7db821b8907e4026acdc2 Mon Sep 17 00:00:00 2001 From: thdox Date: Sat, 21 Feb 2015 21:25:12 +0100 Subject: Small typo. --- doc/ledger3.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index 5e1faf7e..a4e055d0 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -6668,7 +6668,7 @@ to show unrealized capital in a gain/losses report. @item --rich-data @itemx --detail When generating ledger transaction from CSV file using the -@command{convert} command, add CSV, Imported, and UUID meta-data. +@command{convert} command, add CSV, Imported, and UUID metadata. @item --seed @var{INT} Set the random seed to @var{INT} for the @code{generate} command. -- cgit v1.2.3