;doc: regen manuals
[ci skip]
This commit is contained in:
		
							parent
							
								
									ba44d00bed
								
							
						
					
					
						commit
						061bf73b61
					
				| @ -1,6 +1,6 @@ | ||||
| .\"t | ||||
| 
 | ||||
| .TH "hledger_csv" "5" "February 2020" "hledger 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger_csv" "5" "March 2020" "hledger 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -236,10 +236,7 @@ amount2     %amzamount | ||||
| #include categorisation.rules | ||||
| 
 | ||||
| # add a third posting for fees, but only if they are non-zero. | ||||
| # Commas in the data makes counting fields hard, so count from the right instead. | ||||
| # (Regex translation: \[dq]a field containing a non-zero dollar amount, | ||||
| # immediately before the 1 right-most fields\[dq]) | ||||
| if ,\[rs]$[1-9][.0-9]+(,[\[ha],]*){1}$ | ||||
| if %fees [1-9] | ||||
|  account3    expenses:fees | ||||
|  amount3     %fees | ||||
| \f[R] | ||||
| @ -308,13 +305,11 @@ description %description_ %itemtitle | ||||
| comment  itemid:%itemid, fromemail:%fromemail, toemail:%toemail, time:%time, type:%type, status:%status_ | ||||
| 
 | ||||
| # convert to short currency symbols | ||||
| # Note: in conditional block regexps, the line of csv being matched is | ||||
| # a synthetic one: the unquoted field values, with commas between them. | ||||
| if ,USD, | ||||
| if %currency USD | ||||
|  currency $ | ||||
| if ,EUR, | ||||
| if %currency EUR | ||||
|  currency E | ||||
| if ,GBP, | ||||
| if %currency GBP | ||||
|  currency P | ||||
| 
 | ||||
| # generate postings | ||||
| @ -328,9 +323,8 @@ amount1  %netamount | ||||
| # (account2 is set below) | ||||
| amount2  -%grossamount | ||||
| 
 | ||||
| # if there\[aq]s a fee (9th field), add a third posting for the money taken by paypal. | ||||
| # TODO: This regexp fails when fields contain a comma (generates a third posting with zero amount) | ||||
| if \[ha]([\[ha],]+,){8}[\[ha]0] | ||||
| # if there\[aq]s a fee, add a third posting for the money taken by paypal. | ||||
| if %feeamount [1-9] | ||||
|  account3 expenses:banking:paypal | ||||
|  amount3  -%feeamount | ||||
|  comment3 business: | ||||
| @ -338,11 +332,11 @@ if \[ha]([\[ha],]+,){8}[\[ha]0] | ||||
| # choose an account for the second posting | ||||
| 
 | ||||
| # override the default account names: | ||||
| # if amount (8th field) is positive, it\[aq]s income (a debit) | ||||
| if \[ha]([\[ha],]+,){7}[0-9] | ||||
| # if the amount is positive, it\[aq]s income (a debit) | ||||
| if %grossamount \[ha][\[ha]-] | ||||
|  account2 income:unknown | ||||
| # if negative, it\[aq]s an expense (a credit) | ||||
| if \[ha]([\[ha],]+,){7}- | ||||
| if %grossamount \[ha]- | ||||
|  account2 expenses:unknown | ||||
| 
 | ||||
| # apply common rules for setting account2 & other tweaks | ||||
| @ -585,13 +579,13 @@ See also: File Extension. | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| if PATTERN | ||||
| if MATCHER | ||||
|  RULE | ||||
| 
 | ||||
| if | ||||
| PATTERN | ||||
| PATTERN | ||||
| PATTERN | ||||
| MATCHER | ||||
| MATCHER | ||||
| MATCHER | ||||
|  RULE | ||||
|  RULE | ||||
| \f[R] | ||||
| @ -602,28 +596,40 @@ applied only to CSV records which match certain patterns. | ||||
| They are often used for customising account names based on transaction | ||||
| descriptions. | ||||
| .PP | ||||
| A single pattern can be written on the same line as the \[dq]if\[dq]; or | ||||
| multiple patterns can be written on the following lines, non-indented. | ||||
| Multiple patterns are OR\[aq]d (any one of them can match). | ||||
| Patterns are case-insensitive regular expressions which try to match | ||||
| anywhere within the whole CSV record (POSIX extended regular expressions | ||||
| with some additions, see | ||||
| https://hledger.org/hledger.html#regular-expressions). | ||||
| Note the CSV record they see is close to, but not identical to, the one | ||||
| in the CSV file; enclosing double quotes will be removed, and the | ||||
| separator character is always comma. | ||||
| .PP | ||||
| It\[aq]s not yet easy to match within a specific field. | ||||
| If the data does not contain commas, you can hack it with a regular | ||||
| expression like: | ||||
| Each MATCHER can be a record matcher, which looks like this: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| # match \[dq]foo\[dq] in the fourth field | ||||
| if \[ha]([\[ha],]*,){3}foo | ||||
| REGEX | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| REGEX is a case-insensitive regular expression which tries to match | ||||
| anywhere within the CSV record. | ||||
| It is a POSIX extended regular expressions with some additions (see | ||||
| Regular expressions in the hledger manual). | ||||
| Note: the \[dq]CSV record\[dq] it is matched against is not the original | ||||
| record, but a synthetic one, with enclosing double quotes or whitespace | ||||
| removed, and always comma-separated. | ||||
| (Eg, an SSV record \f[C]2020-01-01; \[dq]Acme, Inc.\[dq]; 1,000\f[R] | ||||
| appears to REGEX as \f[C]2020-01-01,Acme, Inc.,1,000\f[R]). | ||||
| .PP | ||||
| Or, MATCHER can be a field matcher, like this: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| %CSVFIELD REGEX | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| which matches just the content of a particular CSV field. | ||||
| CSVFIELD is a percent sign followed by the field\[aq]s name or column | ||||
| number, like \f[C]%date\f[R] or \f[C]%1\f[R]. | ||||
| .PP | ||||
| A single matcher can be written on the same line as the \[dq]if\[dq]; or | ||||
| multiple matchers can be written on the following lines, non-indented. | ||||
| Multiple matchers are OR\[aq]d (any one of them can match). | ||||
| .PP | ||||
| After the patterns there should be one or more rules to apply, all | ||||
| indented by at least one space. | ||||
| Three kinds of rule are allowed in conditional blocks: | ||||
|  | ||||
| @ -3,8 +3,8 @@ This is hledger_csv.info, produced by makeinfo version 6.7 from stdin. | ||||
|  | ||||
| File: hledger_csv.info,  Node: Top,  Next: EXAMPLES,  Up: (dir) | ||||
| 
 | ||||
| hledger_csv(5) hledger 1.16.99 | ||||
| ****************************** | ||||
| hledger_csv(5) hledger 1.17 | ||||
| *************************** | ||||
| 
 | ||||
| CSV - how hledger reads CSV data, and the CSV rules file format | ||||
| 
 | ||||
| @ -190,10 +190,7 @@ amount2     %amzamount | ||||
| #include categorisation.rules | ||||
| 
 | ||||
| # add a third posting for fees, but only if they are non-zero. | ||||
| # Commas in the data makes counting fields hard, so count from the right instead. | ||||
| # (Regex translation: "a field containing a non-zero dollar amount, | ||||
| # immediately before the 1 right-most fields") | ||||
| if ,\$[1-9][.0-9]+(,[^,]*){1}$ | ||||
| if %fees [1-9] | ||||
|  account3    expenses:fees | ||||
|  amount3     %fees | ||||
| 
 | ||||
| @ -255,13 +252,11 @@ description %description_ %itemtitle | ||||
| comment  itemid:%itemid, fromemail:%fromemail, toemail:%toemail, time:%time, type:%type, status:%status_ | ||||
| 
 | ||||
| # convert to short currency symbols | ||||
| # Note: in conditional block regexps, the line of csv being matched is | ||||
| # a synthetic one: the unquoted field values, with commas between them. | ||||
| if ,USD, | ||||
| if %currency USD | ||||
|  currency $ | ||||
| if ,EUR, | ||||
| if %currency EUR | ||||
|  currency E | ||||
| if ,GBP, | ||||
| if %currency GBP | ||||
|  currency P | ||||
| 
 | ||||
| # generate postings | ||||
| @ -275,9 +270,8 @@ amount1  %netamount | ||||
| # (account2 is set below) | ||||
| amount2  -%grossamount | ||||
| 
 | ||||
| # if there's a fee (9th field), add a third posting for the money taken by paypal. | ||||
| # TODO: This regexp fails when fields contain a comma (generates a third posting with zero amount) | ||||
| if ^([^,]+,){8}[^0] | ||||
| # if there's a fee, add a third posting for the money taken by paypal. | ||||
| if %feeamount [1-9] | ||||
|  account3 expenses:banking:paypal | ||||
|  amount3  -%feeamount | ||||
|  comment3 business: | ||||
| @ -285,11 +279,11 @@ if ^([^,]+,){8}[^0] | ||||
| # choose an account for the second posting | ||||
| 
 | ||||
| # override the default account names: | ||||
| # if amount (8th field) is positive, it's income (a debit) | ||||
| if ^([^,]+,){7}[0-9] | ||||
| # if the amount is positive, it's income (a debit) | ||||
| if %grossamount ^[^-] | ||||
|  account2 income:unknown | ||||
| # if negative, it's an expense (a credit) | ||||
| if ^([^,]+,){7}- | ||||
| if %grossamount ^- | ||||
|  account2 expenses:unknown | ||||
| 
 | ||||
| # apply common rules for setting account2 & other tweaks | ||||
| @ -537,13 +531,13 @@ File: hledger_csv.info,  Node: if,  Next: end,  Prev: separator,  Up: CSV RULES | ||||
| 2.5 'if' | ||||
| ======== | ||||
| 
 | ||||
| if PATTERN | ||||
| if MATCHER | ||||
|  RULE | ||||
| 
 | ||||
| if | ||||
| PATTERN | ||||
| PATTERN | ||||
| PATTERN | ||||
| MATCHER | ||||
| MATCHER | ||||
| MATCHER | ||||
|  RULE | ||||
|  RULE | ||||
| 
 | ||||
| @ -552,21 +546,30 @@ applied only to CSV records which match certain patterns.  They are | ||||
| often used for customising account names based on transaction | ||||
| descriptions. | ||||
| 
 | ||||
|    A single pattern can be written on the same line as the "if"; or | ||||
| multiple patterns can be written on the following lines, non-indented. | ||||
| Multiple patterns are OR'd (any one of them can match).  Patterns are | ||||
| case-insensitive regular expressions which try to match anywhere within | ||||
| the whole CSV record (POSIX extended regular expressions with some | ||||
| additions, see https://hledger.org/hledger.html#regular-expressions). | ||||
| Note the CSV record they see is close to, but not identical to, the one | ||||
| in the CSV file; enclosing double quotes will be removed, and the | ||||
| separator character is always comma. | ||||
|    Each MATCHER can be a record matcher, which looks like this: | ||||
| 
 | ||||
|    It's not yet easy to match within a specific field.  If the data does | ||||
| not contain commas, you can hack it with a regular expression like: | ||||
| REGEX | ||||
| 
 | ||||
| # match "foo" in the fourth field | ||||
| if ^([^,]*,){3}foo | ||||
|    REGEX is a case-insensitive regular expression which tries to match | ||||
| anywhere within the CSV record.  It is a POSIX extended regular | ||||
| expressions with some additions (see Regular expressions in the hledger | ||||
| manual).  Note: the "CSV record" it is matched against is not the | ||||
| original record, but a synthetic one, with enclosing double quotes or | ||||
| whitespace removed, and always comma-separated.  (Eg, an SSV record | ||||
| '2020-01-01; "Acme, Inc."; 1,000' appears to REGEX as '2020-01-01,Acme, | ||||
| Inc.,1,000'). | ||||
| 
 | ||||
|    Or, MATCHER can be a field matcher, like this: | ||||
| 
 | ||||
| %CSVFIELD REGEX | ||||
| 
 | ||||
|    which matches just the content of a particular CSV field.  CSVFIELD | ||||
| is a percent sign followed by the field's name or column number, like | ||||
| '%date' or '%1'. | ||||
| 
 | ||||
|    A single matcher can be written on the same line as the "if"; or | ||||
| multiple matchers can be written on the following lines, non-indented. | ||||
| Multiple matchers are OR'd (any one of them can match). | ||||
| 
 | ||||
|    After the patterns there should be one or more rules to apply, all | ||||
| indented by at least one space.  Three kinds of rule are allowed in | ||||
| @ -968,64 +971,64 @@ command the user specified. | ||||
|  | ||||
| Tag Table: | ||||
| Node: Top72 | ||||
| Node: EXAMPLES2099 | ||||
| Ref: #examples2205 | ||||
| Node: Basic2413 | ||||
| Ref: #basic2513 | ||||
| Node: Bank of Ireland3055 | ||||
| Ref: #bank-of-ireland3190 | ||||
| Node: Amazon4652 | ||||
| Ref: #amazon4770 | ||||
| Node: Paypal6702 | ||||
| Ref: #paypal6796 | ||||
| Node: CSV RULES14675 | ||||
| Ref: #csv-rules14784 | ||||
| Node: skip15060 | ||||
| Ref: #skip15153 | ||||
| Node: fields15528 | ||||
| Ref: #fields15650 | ||||
| Node: Transaction field names16815 | ||||
| Ref: #transaction-field-names16975 | ||||
| Node: Posting field names17086 | ||||
| Ref: #posting-field-names17238 | ||||
| Node: field assignment18529 | ||||
| Ref: #field-assignment18672 | ||||
| Node: separator19490 | ||||
| Ref: #separator19619 | ||||
| Node: if20030 | ||||
| Ref: #if20132 | ||||
| Node: end21848 | ||||
| Ref: #end21954 | ||||
| Node: date-format22178 | ||||
| Ref: #date-format22310 | ||||
| Node: newest-first23059 | ||||
| Ref: #newest-first23197 | ||||
| Node: include23880 | ||||
| Ref: #include24009 | ||||
| Node: balance-type24453 | ||||
| Ref: #balance-type24573 | ||||
| Node: TIPS25273 | ||||
| Ref: #tips25355 | ||||
| Node: Rapid feedback25611 | ||||
| Ref: #rapid-feedback25728 | ||||
| Node: Valid CSV26188 | ||||
| Ref: #valid-csv26318 | ||||
| Node: File Extension26510 | ||||
| Ref: #file-extension26662 | ||||
| Node: Reading multiple CSV files27072 | ||||
| Ref: #reading-multiple-csv-files27257 | ||||
| Node: Valid transactions27498 | ||||
| Ref: #valid-transactions27676 | ||||
| Node: Deduplicating importing28304 | ||||
| Ref: #deduplicating-importing28483 | ||||
| Node: Setting amounts29516 | ||||
| Ref: #setting-amounts29685 | ||||
| Node: Setting currency/commodity30671 | ||||
| Ref: #setting-currencycommodity30863 | ||||
| Node: Referencing other fields31666 | ||||
| Ref: #referencing-other-fields31866 | ||||
| Node: How CSV rules are evaluated32763 | ||||
| Ref: #how-csv-rules-are-evaluated32936 | ||||
| Node: EXAMPLES2093 | ||||
| Ref: #examples2199 | ||||
| Node: Basic2407 | ||||
| Ref: #basic2507 | ||||
| Node: Bank of Ireland3049 | ||||
| Ref: #bank-of-ireland3184 | ||||
| Node: Amazon4646 | ||||
| Ref: #amazon4764 | ||||
| Node: Paypal6483 | ||||
| Ref: #paypal6577 | ||||
| Node: CSV RULES14221 | ||||
| Ref: #csv-rules14330 | ||||
| Node: skip14606 | ||||
| Ref: #skip14699 | ||||
| Node: fields15074 | ||||
| Ref: #fields15196 | ||||
| Node: Transaction field names16361 | ||||
| Ref: #transaction-field-names16521 | ||||
| Node: Posting field names16632 | ||||
| Ref: #posting-field-names16784 | ||||
| Node: field assignment18075 | ||||
| Ref: #field-assignment18218 | ||||
| Node: separator19036 | ||||
| Ref: #separator19165 | ||||
| Node: if19576 | ||||
| Ref: #if19678 | ||||
| Node: end21597 | ||||
| Ref: #end21703 | ||||
| Node: date-format21927 | ||||
| Ref: #date-format22059 | ||||
| Node: newest-first22808 | ||||
| Ref: #newest-first22946 | ||||
| Node: include23629 | ||||
| Ref: #include23758 | ||||
| Node: balance-type24202 | ||||
| Ref: #balance-type24322 | ||||
| Node: TIPS25022 | ||||
| Ref: #tips25104 | ||||
| Node: Rapid feedback25360 | ||||
| Ref: #rapid-feedback25477 | ||||
| Node: Valid CSV25937 | ||||
| Ref: #valid-csv26067 | ||||
| Node: File Extension26259 | ||||
| Ref: #file-extension26411 | ||||
| Node: Reading multiple CSV files26821 | ||||
| Ref: #reading-multiple-csv-files27006 | ||||
| Node: Valid transactions27247 | ||||
| Ref: #valid-transactions27425 | ||||
| Node: Deduplicating importing28053 | ||||
| Ref: #deduplicating-importing28232 | ||||
| Node: Setting amounts29265 | ||||
| Ref: #setting-amounts29434 | ||||
| Node: Setting currency/commodity30420 | ||||
| Ref: #setting-currencycommodity30612 | ||||
| Node: Referencing other fields31415 | ||||
| Ref: #referencing-other-fields31615 | ||||
| Node: How CSV rules are evaluated32512 | ||||
| Ref: #how-csv-rules-are-evaluated32685 | ||||
|  | ||||
| End Tag Table | ||||
| 
 | ||||
|  | ||||
| @ -163,10 +163,7 @@ EXAMPLES | ||||
|               #include categorisation.rules | ||||
| 
 | ||||
|               # add a third posting for fees, but only if they are non-zero. | ||||
|               # Commas in the data makes counting fields hard, so count from the right instead. | ||||
|               # (Regex translation: "a field containing a non-zero dollar amount, | ||||
|               # immediately before the 1 right-most fields") | ||||
|               if ,\$[1-9][.0-9]+(,[^,]*){1}$ | ||||
|               if %fees [1-9] | ||||
|                account3    expenses:fees | ||||
|                amount3     %fees | ||||
| 
 | ||||
| @ -223,13 +220,11 @@ EXAMPLES | ||||
|               comment  itemid:%itemid, fromemail:%fromemail, toemail:%toemail, time:%time, type:%type, status:%status_ | ||||
| 
 | ||||
|               # convert to short currency symbols | ||||
|               # Note: in conditional block regexps, the line of csv being matched is | ||||
|               # a synthetic one: the unquoted field values, with commas between them. | ||||
|               if ,USD, | ||||
|               if %currency USD | ||||
|                currency $ | ||||
|               if ,EUR, | ||||
|               if %currency EUR | ||||
|                currency E | ||||
|               if ,GBP, | ||||
|               if %currency GBP | ||||
|                currency P | ||||
| 
 | ||||
|               # generate postings | ||||
| @ -243,9 +238,8 @@ EXAMPLES | ||||
|               # (account2 is set below) | ||||
|               amount2  -%grossamount | ||||
| 
 | ||||
|               # if there's a fee (9th field), add a third posting for the money taken by paypal. | ||||
|               # TODO: This regexp fails when fields contain a comma (generates a third posting with zero amount) | ||||
|               if ^([^,]+,){8}[^0] | ||||
|               # if there's a fee, add a third posting for the money taken by paypal. | ||||
|               if %feeamount [1-9] | ||||
|                account3 expenses:banking:paypal | ||||
|                amount3  -%feeamount | ||||
|                comment3 business: | ||||
| @ -253,11 +247,11 @@ EXAMPLES | ||||
|               # choose an account for the second posting | ||||
| 
 | ||||
|               # override the default account names: | ||||
|               # if amount (8th field) is positive, it's income (a debit) | ||||
|               if ^([^,]+,){7}[0-9] | ||||
|               # if the amount is positive, it's income (a debit) | ||||
|               if %grossamount ^[^-] | ||||
|                account2 income:unknown | ||||
|               # if negative, it's an expense (a credit) | ||||
|               if ^([^,]+,){7}- | ||||
|               if %grossamount ^- | ||||
|                account2 expenses:unknown | ||||
| 
 | ||||
|               # apply common rules for setting account2 & other tweaks | ||||
| @ -446,13 +440,13 @@ CSV RULES | ||||
|        See also: File Extension. | ||||
| 
 | ||||
|    if | ||||
|               if PATTERN | ||||
|               if MATCHER | ||||
|                RULE | ||||
| 
 | ||||
|               if | ||||
|               PATTERN | ||||
|               PATTERN | ||||
|               PATTERN | ||||
|               MATCHER | ||||
|               MATCHER | ||||
|               MATCHER | ||||
|                RULE | ||||
|                RULE | ||||
| 
 | ||||
| @ -460,24 +454,32 @@ CSV RULES | ||||
|        only to CSV records which match certain patterns.  They are often  used | ||||
|        for customising account names based on transaction descriptions. | ||||
| 
 | ||||
|        A single pattern can be written on the same line as the "if"; or multi- | ||||
|        ple patterns can be written on the following lines, non-indented.  Mul- | ||||
|        tiple  patterns  are  OR'd  (any  one of them can match).  Patterns are | ||||
|        case-insensitive regular expressions which try to match anywhere within | ||||
|        the  whole CSV record (POSIX extended regular expressions with some ad- | ||||
|        ditions,   see   https://hledger.org/hledger.html#regular-expressions). | ||||
|        Note the CSV record they see is close to, but not identical to, the one | ||||
|        in the CSV file; enclosing double quotes will be removed, and the sepa- | ||||
|        rator character is always comma. | ||||
|        Each MATCHER can be a record matcher, which looks like this: | ||||
| 
 | ||||
|        It's  not  yet easy to match within a specific field.  If the data does | ||||
|        not contain commas, you can hack it with a regular expression like: | ||||
|               REGEX | ||||
| 
 | ||||
|               # match "foo" in the fourth field | ||||
|               if ^([^,]*,){3}foo | ||||
|        REGEX  is  a  case-insensitive  regular expression which tries to match | ||||
|        anywhere within the CSV record.  It is a POSIX extended regular expres- | ||||
|        sions  with some additions (see Regular expressions in the hledger man- | ||||
|        ual).  Note: the "CSV record" it is matched against is not the original | ||||
|        record, but a synthetic one, with enclosing double quotes or whitespace | ||||
|        removed, and always comma-separated.  (Eg, an  SSV  record  2020-01-01; | ||||
|        "Acme, Inc."; 1,000 appears to REGEX as 2020-01-01,Acme, Inc.,1,000). | ||||
| 
 | ||||
|        After the patterns there should be one or more rules to apply, all  in- | ||||
|        dented  by at least one space.  Three kinds of rule are allowed in con- | ||||
|        Or, MATCHER can be a field matcher, like this: | ||||
| 
 | ||||
|               %CSVFIELD REGEX | ||||
| 
 | ||||
|        which  matches just the content of a particular CSV field.  CSVFIELD is | ||||
|        a percent sign followed by the field's  name  or  column  number,  like | ||||
|        %date or %1. | ||||
| 
 | ||||
|        A single matcher can be written on the same line as the "if"; or multi- | ||||
|        ple matchers can be written on the following lines, non-indented.  Mul- | ||||
|        tiple matchers are OR'd (any one of them can match). | ||||
| 
 | ||||
|        After  the patterns there should be one or more rules to apply, all in- | ||||
|        dented by at least one space.  Three kinds of rule are allowed in  con- | ||||
|        ditional blocks: | ||||
| 
 | ||||
|        o field assignments (to set a hledger field) | ||||
| @ -501,7 +503,7 @@ CSV RULES | ||||
|                comment  XXX deductible ? check it | ||||
| 
 | ||||
|    end | ||||
|        This rule can be used inside if blocks (only),  to  make  hledger  stop | ||||
|        This  rule  can  be  used inside if blocks (only), to make hledger stop | ||||
|        reading this CSV file and move on to the next input file, or to command | ||||
|        execution.  Eg: | ||||
| 
 | ||||
| @ -512,10 +514,10 @@ CSV RULES | ||||
|    date-format | ||||
|               date-format DATEFMT | ||||
| 
 | ||||
|        This is a helper for the date (and date2) fields.  If  your  CSV  dates | ||||
|        are  not  formatted  like  YYYY-MM-DD, YYYY/MM/DD or YYYY.MM.DD, you'll | ||||
|        need to add a date-format rule describing them  with  a  strptime  date | ||||
|        parsing  pattern, which must parse the CSV date value completely.  Some | ||||
|        This  is  a  helper for the date (and date2) fields.  If your CSV dates | ||||
|        are not formatted like YYYY-MM-DD,  YYYY/MM/DD  or  YYYY.MM.DD,  you'll | ||||
|        need  to  add  a  date-format rule describing them with a strptime date | ||||
|        parsing pattern, which must parse the CSV date value completely.   Some | ||||
|        examples: | ||||
| 
 | ||||
|               # MM/DD/YY | ||||
| @ -537,15 +539,15 @@ CSV RULES | ||||
|        mat.html#v:formatTime | ||||
| 
 | ||||
|    newest-first | ||||
|        hledger  always sorts the generated transactions by date.  Transactions | ||||
|        on the same date should appear in the same order as their CSV  records, | ||||
|        as  hledger  can  usually auto-detect whether the CSV's normal order is | ||||
|        hledger always sorts the generated transactions by date.   Transactions | ||||
|        on  the same date should appear in the same order as their CSV records, | ||||
|        as hledger can usually auto-detect whether the CSV's  normal  order  is | ||||
|        oldest first or newest first.  But if all of the following are true: | ||||
| 
 | ||||
|        o the CSV might sometimes contain just one day  of  data  (all  records | ||||
|        o the  CSV  might  sometimes  contain just one day of data (all records | ||||
|          having the same date) | ||||
| 
 | ||||
|        o the  CSV  records are normally in reverse chronological order (newest | ||||
|        o the CSV records are normally in reverse chronological  order  (newest | ||||
|          at the top) | ||||
| 
 | ||||
|        o and you care about preserving the order of same-day transactions | ||||
| @ -558,9 +560,9 @@ CSV RULES | ||||
|    include | ||||
|               include RULESFILE | ||||
| 
 | ||||
|        This includes the contents of another CSV rules  file  at  this  point. | ||||
|        RULESFILE  is  an  absolute file path or a path relative to the current | ||||
|        file's directory.  This can be useful for sharing common rules  between | ||||
|        This  includes  the  contents  of another CSV rules file at this point. | ||||
|        RULESFILE is an absolute file path or a path relative  to  the  current | ||||
|        file's  directory.  This can be useful for sharing common rules between | ||||
|        several rules files, eg: | ||||
| 
 | ||||
|               # someaccount.csv.rules | ||||
| @ -575,10 +577,10 @@ CSV RULES | ||||
| 
 | ||||
|    balance-type | ||||
|        Balance assertions generated by assigning to balanceN are of the simple | ||||
|        = type by default, which is  a  single-commodity,  subaccount-excluding | ||||
|        =  type  by  default, which is a single-commodity, subaccount-excluding | ||||
|        assertion.  You may find the subaccount-including variants more useful, | ||||
|        eg if you have created some virtual subaccounts  of  checking  to  help | ||||
|        with  budgeting.  You can select a different type of assertion with the | ||||
|        eg  if  you  have  created some virtual subaccounts of checking to help | ||||
|        with budgeting.  You can select a different type of assertion with  the | ||||
|        balance-type rule: | ||||
| 
 | ||||
|               # balance assertions will consider all commodities and all subaccounts | ||||
| @ -593,19 +595,19 @@ CSV RULES | ||||
| 
 | ||||
| TIPS | ||||
|    Rapid feedback | ||||
|        It's a good idea to get rapid feedback  while  creating/troubleshooting | ||||
|        It's  a  good idea to get rapid feedback while creating/troubleshooting | ||||
|        CSV rules.  Here's a good way, using entr from http://eradman.com/entr- | ||||
|        project : | ||||
| 
 | ||||
|               $ ls foo.csv* | entr bash -c 'echo ----; hledger -f foo.csv print desc:SOMEDESC' | ||||
| 
 | ||||
|        A desc: query (eg) is used to select just one, or a  few,  transactions | ||||
|        of  interest.   "bash  -c"  is used to run multiple commands, so we can | ||||
|        echo a separator each time the command re-runs,  making  it  easier  to | ||||
|        A  desc:  query (eg) is used to select just one, or a few, transactions | ||||
|        of interest.  "bash -c" is used to run multiple  commands,  so  we  can | ||||
|        echo  a  separator  each  time the command re-runs, making it easier to | ||||
|        read the output. | ||||
| 
 | ||||
|    Valid CSV | ||||
|        hledger  accepts  CSV  conforming to RFC 4180.  When CSV values are en- | ||||
|        hledger accepts CSV conforming to RFC 4180.  When CSV  values  are  en- | ||||
|        closed in quotes, note: | ||||
| 
 | ||||
|        o they must be double quotes (not single quotes) | ||||
| @ -613,9 +615,9 @@ TIPS | ||||
|        o spaces outside the quotes are not allowed | ||||
| 
 | ||||
|    File Extension | ||||
|        CSV ("Character Separated Values") files should be named  with  one  of | ||||
|        these  filename extensions: .csv, .ssv, .tsv.  Or, the file path should | ||||
|        be prefixed with one of csv:, ssv:, tsv:.  This helps hledger  identify | ||||
|        CSV  ("Character  Separated  Values") files should be named with one of | ||||
|        these filename extensions: .csv, .ssv, .tsv.  Or, the file path  should | ||||
|        be  prefixed with one of csv:, ssv:, tsv:.  This helps hledger identify | ||||
|        the format and show the right error messages.  For example: | ||||
| 
 | ||||
|               $ hledger -f foo.ssv print | ||||
| @ -627,44 +629,44 @@ TIPS | ||||
|        More about this: Input files in the hledger manual. | ||||
| 
 | ||||
|    Reading multiple CSV files | ||||
|        If  you  use  multiple  -f  options to read multiple CSV files at once, | ||||
|        hledger will look for a correspondingly-named rules file for  each  CSV | ||||
|        file.   But if you use the --rules-file option, that rules file will be | ||||
|        If you use multiple -f options to read  multiple  CSV  files  at  once, | ||||
|        hledger  will  look for a correspondingly-named rules file for each CSV | ||||
|        file.  But if you use the --rules-file option, that rules file will  be | ||||
|        used for all the CSV files. | ||||
| 
 | ||||
|    Valid transactions | ||||
|        After reading a CSV file, hledger post-processes and validates the gen- | ||||
|        erated journal entries as it would for a journal file - balancing them, | ||||
|        applying balance assignments, and canonicalising  amount  styles.   Any | ||||
|        errors  at this stage will be reported in the usual way, displaying the | ||||
|        applying  balance  assignments,  and canonicalising amount styles.  Any | ||||
|        errors at this stage will be reported in the usual way, displaying  the | ||||
|        problem entry. | ||||
| 
 | ||||
|        There is one exception: balance assertions, if you have generated them, | ||||
|        will  not  be checked, since normally these will work only when the CSV | ||||
|        data is part of the main journal.  If you do need to check balance  as- | ||||
|        will not be checked, since normally these will work only when  the  CSV | ||||
|        data  is part of the main journal.  If you do need to check balance as- | ||||
|        sertions generated from CSV right away, pipe into another hledger: | ||||
| 
 | ||||
|               $ hledger -f file.csv print | hledger -f- print | ||||
| 
 | ||||
|    Deduplicating, importing | ||||
|        When  you  download a CSV file periodically, eg to get your latest bank | ||||
|        transactions, the new file may overlap with  the  old  one,  containing | ||||
|        When you download a CSV file periodically, eg to get your  latest  bank | ||||
|        transactions,  the  new  file  may overlap with the old one, containing | ||||
|        some of the same records. | ||||
| 
 | ||||
|        The import command will (a) detect the new transactions, and (b) append | ||||
|        just those transactions to your main journal.  It is idempotent, so you | ||||
|        don't  have to remember how many times you ran it or with which version | ||||
|        of the CSV.  (It keeps state in a hidden .latest.FILE.csv  file.)  This | ||||
|        don't have to remember how many times you ran it or with which  version | ||||
|        of  the  CSV.  (It keeps state in a hidden .latest.FILE.csv file.) This | ||||
|        is the easiest way to import CSV data.  Eg: | ||||
| 
 | ||||
|               # download the latest CSV files, then run this command. | ||||
|               # Note, no -f flags needed here. | ||||
|               $ hledger import *.csv [--dry] | ||||
| 
 | ||||
|        This  method  works  for  most CSV files.  (Where records have a stable | ||||
|        This method works for most CSV files.  (Where  records  have  a  stable | ||||
|        chronological order, and new records appear only at the new end.) | ||||
| 
 | ||||
|        A number of other tools and workflows, hledger-specific and  otherwise, | ||||
|        A  number of other tools and workflows, hledger-specific and otherwise, | ||||
|        exist for converting, deduplicating, classifying and managing CSV data. | ||||
|        See: | ||||
| 
 | ||||
| @ -675,43 +677,43 @@ TIPS | ||||
|    Setting amounts | ||||
|        A posting amount can be set in one of these ways: | ||||
| 
 | ||||
|        o by assigning (with a fields  list  or  field  assigment)  to  amountN | ||||
|        o by  assigning  (with  a  fields  list  or field assigment) to amountN | ||||
|          (posting N's amount) or amount (posting 1's amount) | ||||
| 
 | ||||
|        o by  assigning to amountN-in and amountN-out (or amount-in and amount- | ||||
|          out).  For each CSV record, whichever of these has a  non-zero  value | ||||
|          will  be  used,  with  appropriate  sign.  If both contain a non-zero | ||||
|        o by assigning to amountN-in and amountN-out (or amount-in and  amount- | ||||
|          out).   For  each CSV record, whichever of these has a non-zero value | ||||
|          will be used, with appropriate sign.   If  both  contain  a  non-zero | ||||
|          value, this may not work. | ||||
| 
 | ||||
|        o by assigning to balanceN (or balance) instead of the  above,  setting | ||||
|          the  amount  indirectly via a balance assignment.  If you do this the | ||||
|        o by  assigning  to balanceN (or balance) instead of the above, setting | ||||
|          the amount indirectly via a balance assignment.  If you do  this  the | ||||
|          default account name may be wrong, so you should set that explicitly. | ||||
| 
 | ||||
|        There is some special handling for an amount's sign: | ||||
| 
 | ||||
|        o If an amount value is parenthesised, it will be de-parenthesised  and | ||||
|        o If  an amount value is parenthesised, it will be de-parenthesised and | ||||
|          sign-flipped. | ||||
| 
 | ||||
|        o If  an amount value begins with a double minus sign, those cancel out | ||||
|        o If an amount value begins with a double minus sign, those cancel  out | ||||
|          and are removed. | ||||
| 
 | ||||
|        o If an amount value begins with a plus sign, that will be removed | ||||
| 
 | ||||
|    Setting currency/commodity | ||||
|        If the currency/commodity  symbol  is  included  in  the  CSV's  amount | ||||
|        If  the  currency/commodity  symbol  is  included  in  the CSV's amount | ||||
|        field(s), you don't have to do anything special. | ||||
| 
 | ||||
|        If the currency is provided as a separate CSV field, you can either: | ||||
| 
 | ||||
|        o assign  that  to currency, which adds it to all posting amounts.  The | ||||
|          symbol will prepended to the amount quantity (on the left side).   If | ||||
|          you  write  a  trailing space after the symbol, there will be a space | ||||
|          between symbol and amount  (an  exception  to  the  usual  whitespace | ||||
|        o assign that to currency, which adds it to all posting  amounts.   The | ||||
|          symbol  will prepended to the amount quantity (on the left side).  If | ||||
|          you write a trailing space after the symbol, there will  be  a  space | ||||
|          between  symbol  and  amount  (an  exception  to the usual whitespace | ||||
|          stripping). | ||||
| 
 | ||||
|        o or assign it to currencyN which adds it to posting N's amount only. | ||||
| 
 | ||||
|        o or  for  more  control, construct the amount from symbol and quantity | ||||
|        o or for more control, construct the amount from  symbol  and  quantity | ||||
|          using field assignment, eg: | ||||
| 
 | ||||
|                 fields date,description,currency,quantity | ||||
| @ -719,9 +721,9 @@ TIPS | ||||
|                 amount %quantity %currency | ||||
| 
 | ||||
|    Referencing other fields | ||||
|        In field assignments, you can interpolate only CSV fields, not  hledger | ||||
|        fields.   In  the example below, there's both a CSV field and a hledger | ||||
|        field named amount1, but %amount1 always means the CSV field,  not  the | ||||
|        In  field assignments, you can interpolate only CSV fields, not hledger | ||||
|        fields.  In the example below, there's both a CSV field and  a  hledger | ||||
|        field  named  amount1, but %amount1 always means the CSV field, not the | ||||
|        hledger field: | ||||
| 
 | ||||
|               # Name the third CSV field "amount1" | ||||
| @ -733,7 +735,7 @@ TIPS | ||||
|               # Set comment to the CSV amount1 (not the amount1 assigned above) | ||||
|               comment %amount1 | ||||
| 
 | ||||
|        Here,  since there's no CSV amount1 field, %amount1 will produce a lit- | ||||
|        Here, since there's no CSV amount1 field, %amount1 will produce a  lit- | ||||
|        eral "amount1": | ||||
| 
 | ||||
|               fields date,description,csvamount | ||||
| @ -741,7 +743,7 @@ TIPS | ||||
|               # Can't interpolate amount1 here | ||||
|               comment %amount1 | ||||
| 
 | ||||
|        When there are multiple field assignments to the  same  hledger  field, | ||||
|        When  there  are  multiple field assignments to the same hledger field, | ||||
|        only the last one takes effect.  Here, comment's value will be be B, or | ||||
|        C if "something" is matched, but never A: | ||||
| 
 | ||||
| @ -751,14 +753,14 @@ TIPS | ||||
|                comment C | ||||
| 
 | ||||
|    How CSV rules are evaluated | ||||
|        Here's how to think of CSV rules being evaluated (if  you  really  need | ||||
|        Here's  how  to  think of CSV rules being evaluated (if you really need | ||||
|        to).  First, | ||||
| 
 | ||||
|        o include  - all includes are inlined, from top to bottom, depth first. | ||||
|          (At each include point the file is inlined and  scanned  for  further | ||||
|        o include - all includes are inlined, from top to bottom, depth  first. | ||||
|          (At  each  include  point the file is inlined and scanned for further | ||||
|          includes, recursively, before proceeding.) | ||||
| 
 | ||||
|        Then  "global"  rules  are  evaluated, top to bottom.  If a rule is re- | ||||
|        Then "global" rules are evaluated, top to bottom.  If  a  rule  is  re- | ||||
|        peated, the last one wins: | ||||
| 
 | ||||
|        o skip (at top level) | ||||
| @ -772,30 +774,30 @@ TIPS | ||||
| 
 | ||||
|        Then for each CSV record in turn: | ||||
| 
 | ||||
|        o test  all if blocks.  If any of them contain a end rule, skip all re- | ||||
|          maining CSV records.  Otherwise if any of them contain a  skip  rule, | ||||
|          skip  that  many  CSV  records.   If  there are multiple matched skip | ||||
|        o test all if blocks.  If any of them contain a end rule, skip all  re- | ||||
|          maining  CSV  records.  Otherwise if any of them contain a skip rule, | ||||
|          skip that many CSV records.   If  there  are  multiple  matched  skip | ||||
|          rules, the first one wins. | ||||
| 
 | ||||
|        o collect all field assignments at top level and in matched if  blocks. | ||||
|          When  there  are multiple assignments for a field, keep only the last | ||||
|        o collect  all field assignments at top level and in matched if blocks. | ||||
|          When there are multiple assignments for a field, keep only  the  last | ||||
|          one. | ||||
| 
 | ||||
|        o compute a value for each hledger field - either the one that was  as- | ||||
|        o compute  a value for each hledger field - either the one that was as- | ||||
|          signed to it (and interpolate the %CSVFIELDNAME references), or a de- | ||||
|          fault | ||||
| 
 | ||||
|        o generate a synthetic hledger transaction from these values. | ||||
| 
 | ||||
|        This is all part of the CSV reader, one of several readers hledger  can | ||||
|        use  to parse input files.  When all files have been read successfully, | ||||
|        the transactions are passed as input to whichever hledger  command  the | ||||
|        This  is all part of the CSV reader, one of several readers hledger can | ||||
|        use to parse input files.  When all files have been read  successfully, | ||||
|        the  transactions  are passed as input to whichever hledger command the | ||||
|        user specified. | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| REPORTING BUGS | ||||
|        Report  bugs at http://bugs.hledger.org (or on the #hledger IRC channel | ||||
|        Report bugs at http://bugs.hledger.org (or on the #hledger IRC  channel | ||||
|        or hledger mail list) | ||||
| 
 | ||||
| 
 | ||||
| @ -809,7 +811,7 @@ COPYRIGHT | ||||
| 
 | ||||
| 
 | ||||
| SEE ALSO | ||||
|        hledger(1),     hledger-ui(1),     hledger-web(1),      hledger-api(1), | ||||
|        hledger(1),      hledger-ui(1),     hledger-web(1),     hledger-api(1), | ||||
|        hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- | ||||
|        dot(5), ledger(1) | ||||
| 
 | ||||
| @ -817,4 +819,4 @@ SEE ALSO | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| hledger 1.16.99                  February 2020                  hledger_csv(5) | ||||
| hledger 1.17                      March 2020                    hledger_csv(5) | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| .\"t | ||||
| 
 | ||||
| .TH "hledger_journal" "5" "February 2020" "hledger 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger_journal" "5" "March 2020" "hledger 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -4,8 +4,8 @@ stdin. | ||||
|  | ||||
| File: hledger_journal.info,  Node: Top,  Up: (dir) | ||||
| 
 | ||||
| hledger_journal(5) hledger 1.16.99 | ||||
| ********************************** | ||||
| hledger_journal(5) hledger 1.17 | ||||
| ******************************* | ||||
| 
 | ||||
| Journal - hledger's default file format, representing a General Journal | ||||
| 
 | ||||
| @ -1735,116 +1735,116 @@ rules will have these tags added: | ||||
|  | ||||
| Tag Table: | ||||
| Node: Top76 | ||||
| Node: Transactions1875 | ||||
| Ref: #transactions1967 | ||||
| Node: Dates3156 | ||||
| Ref: #dates3255 | ||||
| Node: Simple dates3320 | ||||
| Ref: #simple-dates3446 | ||||
| Node: Secondary dates3955 | ||||
| Ref: #secondary-dates4109 | ||||
| Node: Posting dates5445 | ||||
| Ref: #posting-dates5574 | ||||
| Node: Status6946 | ||||
| Ref: #status7067 | ||||
| Node: Description8775 | ||||
| Ref: #description8909 | ||||
| Node: Payee and note9229 | ||||
| Ref: #payee-and-note9343 | ||||
| Node: Comments9678 | ||||
| Ref: #comments9804 | ||||
| Node: Tags10998 | ||||
| Ref: #tags11113 | ||||
| Node: Postings12506 | ||||
| Ref: #postings12634 | ||||
| Node: Virtual Postings13660 | ||||
| Ref: #virtual-postings13777 | ||||
| Node: Account names15082 | ||||
| Ref: #account-names15223 | ||||
| Node: Amounts15710 | ||||
| Ref: #amounts15849 | ||||
| Node: Digit group marks16781 | ||||
| Ref: #digit-group-marks16929 | ||||
| Node: Amount display style17867 | ||||
| Ref: #amount-display-style18021 | ||||
| Node: Transaction prices19182 | ||||
| Ref: #transaction-prices19348 | ||||
| Node: Balance Assertions21614 | ||||
| Ref: #balance-assertions21794 | ||||
| Node: Assertions and ordering22827 | ||||
| Ref: #assertions-and-ordering23015 | ||||
| Node: Assertions and included files23715 | ||||
| Ref: #assertions-and-included-files23958 | ||||
| Node: Assertions and multiple -f options24291 | ||||
| Ref: #assertions-and-multiple--f-options24547 | ||||
| Node: Assertions and commodities24679 | ||||
| Ref: #assertions-and-commodities24911 | ||||
| Node: Assertions and prices26068 | ||||
| Ref: #assertions-and-prices26282 | ||||
| Node: Assertions and subaccounts26722 | ||||
| Ref: #assertions-and-subaccounts26951 | ||||
| Node: Assertions and virtual postings27275 | ||||
| Ref: #assertions-and-virtual-postings27517 | ||||
| Node: Assertions and precision27659 | ||||
| Ref: #assertions-and-precision27852 | ||||
| Node: Balance Assignments28119 | ||||
| Ref: #balance-assignments28293 | ||||
| Node: Balance assignments and prices29457 | ||||
| Ref: #balance-assignments-and-prices29629 | ||||
| Node: Directives29853 | ||||
| Ref: #directives30012 | ||||
| Node: Comment blocks35660 | ||||
| Ref: #comment-blocks35805 | ||||
| Node: Including other files35981 | ||||
| Ref: #including-other-files36161 | ||||
| Node: Default year36569 | ||||
| Ref: #default-year36738 | ||||
| Node: Declaring commodities37145 | ||||
| Ref: #declaring-commodities37328 | ||||
| Node: Default commodity39001 | ||||
| Ref: #default-commodity39177 | ||||
| Node: Market prices40066 | ||||
| Ref: #market-prices40231 | ||||
| Node: Declaring accounts41072 | ||||
| Ref: #declaring-accounts41248 | ||||
| Node: Account comments42173 | ||||
| Ref: #account-comments42336 | ||||
| Node: Account subdirectives42760 | ||||
| Ref: #account-subdirectives42955 | ||||
| Node: Account types43268 | ||||
| Ref: #account-types43452 | ||||
| Node: Account display order45091 | ||||
| Ref: #account-display-order45261 | ||||
| Node: Rewriting accounts46412 | ||||
| Ref: #rewriting-accounts46597 | ||||
| Node: Basic aliases47323 | ||||
| Ref: #basic-aliases47469 | ||||
| Node: Regex aliases48173 | ||||
| Ref: #regex-aliases48345 | ||||
| Node: Combining aliases49063 | ||||
| Ref: #combining-aliases49241 | ||||
| Node: end aliases50517 | ||||
| Ref: #end-aliases50665 | ||||
| Node: Default parent account50766 | ||||
| Ref: #default-parent-account50932 | ||||
| Node: Periodic transactions51816 | ||||
| Ref: #periodic-transactions52015 | ||||
| Node: Periodic rule syntax53887 | ||||
| Ref: #periodic-rule-syntax54093 | ||||
| Node: Two spaces between period expression and description!54797 | ||||
| Ref: #two-spaces-between-period-expression-and-description55116 | ||||
| Node: Forecasting with periodic transactions55800 | ||||
| Ref: #forecasting-with-periodic-transactions56105 | ||||
| Node: Budgeting with periodic transactions58131 | ||||
| Ref: #budgeting-with-periodic-transactions58370 | ||||
| Node: Auto postings / transaction modifiers58819 | ||||
| Ref: #auto-postings-transaction-modifiers59031 | ||||
| Node: Auto postings and dates61527 | ||||
| Ref: #auto-postings-and-dates61784 | ||||
| Node: Auto postings and transaction balancing / inferred amounts / balance assertions61959 | ||||
| Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions62334 | ||||
| Node: Auto posting tags62712 | ||||
| Ref: #auto-posting-tags62951 | ||||
| Node: Transactions1869 | ||||
| Ref: #transactions1961 | ||||
| Node: Dates3150 | ||||
| Ref: #dates3249 | ||||
| Node: Simple dates3314 | ||||
| Ref: #simple-dates3440 | ||||
| Node: Secondary dates3949 | ||||
| Ref: #secondary-dates4103 | ||||
| Node: Posting dates5439 | ||||
| Ref: #posting-dates5568 | ||||
| Node: Status6940 | ||||
| Ref: #status7061 | ||||
| Node: Description8769 | ||||
| Ref: #description8903 | ||||
| Node: Payee and note9223 | ||||
| Ref: #payee-and-note9337 | ||||
| Node: Comments9672 | ||||
| Ref: #comments9798 | ||||
| Node: Tags10992 | ||||
| Ref: #tags11107 | ||||
| Node: Postings12500 | ||||
| Ref: #postings12628 | ||||
| Node: Virtual Postings13654 | ||||
| Ref: #virtual-postings13771 | ||||
| Node: Account names15076 | ||||
| Ref: #account-names15217 | ||||
| Node: Amounts15704 | ||||
| Ref: #amounts15843 | ||||
| Node: Digit group marks16775 | ||||
| Ref: #digit-group-marks16923 | ||||
| Node: Amount display style17861 | ||||
| Ref: #amount-display-style18015 | ||||
| Node: Transaction prices19176 | ||||
| Ref: #transaction-prices19342 | ||||
| Node: Balance Assertions21608 | ||||
| Ref: #balance-assertions21788 | ||||
| Node: Assertions and ordering22821 | ||||
| Ref: #assertions-and-ordering23009 | ||||
| Node: Assertions and included files23709 | ||||
| Ref: #assertions-and-included-files23952 | ||||
| Node: Assertions and multiple -f options24285 | ||||
| Ref: #assertions-and-multiple--f-options24541 | ||||
| Node: Assertions and commodities24673 | ||||
| Ref: #assertions-and-commodities24905 | ||||
| Node: Assertions and prices26062 | ||||
| Ref: #assertions-and-prices26276 | ||||
| Node: Assertions and subaccounts26716 | ||||
| Ref: #assertions-and-subaccounts26945 | ||||
| Node: Assertions and virtual postings27269 | ||||
| Ref: #assertions-and-virtual-postings27511 | ||||
| Node: Assertions and precision27653 | ||||
| Ref: #assertions-and-precision27846 | ||||
| Node: Balance Assignments28113 | ||||
| Ref: #balance-assignments28287 | ||||
| Node: Balance assignments and prices29451 | ||||
| Ref: #balance-assignments-and-prices29623 | ||||
| Node: Directives29847 | ||||
| Ref: #directives30006 | ||||
| Node: Comment blocks35654 | ||||
| Ref: #comment-blocks35799 | ||||
| Node: Including other files35975 | ||||
| Ref: #including-other-files36155 | ||||
| Node: Default year36563 | ||||
| Ref: #default-year36732 | ||||
| Node: Declaring commodities37139 | ||||
| Ref: #declaring-commodities37322 | ||||
| Node: Default commodity38995 | ||||
| Ref: #default-commodity39171 | ||||
| Node: Market prices40060 | ||||
| Ref: #market-prices40225 | ||||
| Node: Declaring accounts41066 | ||||
| Ref: #declaring-accounts41242 | ||||
| Node: Account comments42167 | ||||
| Ref: #account-comments42330 | ||||
| Node: Account subdirectives42754 | ||||
| Ref: #account-subdirectives42949 | ||||
| Node: Account types43262 | ||||
| Ref: #account-types43446 | ||||
| Node: Account display order45085 | ||||
| Ref: #account-display-order45255 | ||||
| Node: Rewriting accounts46406 | ||||
| Ref: #rewriting-accounts46591 | ||||
| Node: Basic aliases47317 | ||||
| Ref: #basic-aliases47463 | ||||
| Node: Regex aliases48167 | ||||
| Ref: #regex-aliases48339 | ||||
| Node: Combining aliases49057 | ||||
| Ref: #combining-aliases49235 | ||||
| Node: end aliases50511 | ||||
| Ref: #end-aliases50659 | ||||
| Node: Default parent account50760 | ||||
| Ref: #default-parent-account50926 | ||||
| Node: Periodic transactions51810 | ||||
| Ref: #periodic-transactions52009 | ||||
| Node: Periodic rule syntax53881 | ||||
| Ref: #periodic-rule-syntax54087 | ||||
| Node: Two spaces between period expression and description!54791 | ||||
| Ref: #two-spaces-between-period-expression-and-description55110 | ||||
| Node: Forecasting with periodic transactions55794 | ||||
| Ref: #forecasting-with-periodic-transactions56099 | ||||
| Node: Budgeting with periodic transactions58125 | ||||
| Ref: #budgeting-with-periodic-transactions58364 | ||||
| Node: Auto postings / transaction modifiers58813 | ||||
| Ref: #auto-postings-transaction-modifiers59025 | ||||
| Node: Auto postings and dates61521 | ||||
| Ref: #auto-postings-and-dates61778 | ||||
| Node: Auto postings and transaction balancing / inferred amounts / balance assertions61953 | ||||
| Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions62328 | ||||
| Node: Auto posting tags62706 | ||||
| Ref: #auto-posting-tags62945 | ||||
|  | ||||
| End Tag Table | ||||
| 
 | ||||
|  | ||||
| @ -1415,4 +1415,4 @@ SEE ALSO | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| hledger 1.16.99                  February 2020              hledger_journal(5) | ||||
| hledger 1.17                      March 2020                hledger_journal(5) | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| 
 | ||||
| .TH "hledger_timeclock" "5" "February 2020" "hledger 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger_timeclock" "5" "March 2020" "hledger 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -4,8 +4,8 @@ stdin. | ||||
|  | ||||
| File: hledger_timeclock.info,  Node: Top,  Up: (dir) | ||||
| 
 | ||||
| hledger_timeclock(5) hledger 1.16.99 | ||||
| ************************************ | ||||
| hledger_timeclock(5) hledger 1.17 | ||||
| ********************************* | ||||
| 
 | ||||
| Timeclock - the time logging format of timeclock.el, as read by hledger | ||||
| 
 | ||||
|  | ||||
| @ -78,4 +78,4 @@ SEE ALSO | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| hledger 1.16.99                  February 2020            hledger_timeclock(5) | ||||
| hledger 1.17                      March 2020              hledger_timeclock(5) | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| 
 | ||||
| .TH "hledger_timedot" "5" "February 2020" "hledger 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger_timedot" "5" "March 2020" "hledger 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -22,17 +22,21 @@ quantities other than time. | ||||
| In the docs below we\[aq]ll assume it\[aq]s time. | ||||
| .PP | ||||
| A timedot file contains a series of day entries. | ||||
| A day entry begins with a date, and is followed by category/quantity | ||||
| pairs, one per line. | ||||
| Dates are hledger-style simple dates (see hledger_journal(5)). | ||||
| Categories are hledger-style account names, optionally indented. | ||||
| As in a hledger journal, there must be at least two spaces between the | ||||
| category (account name) and the quantity. | ||||
| A day entry begins with a non-indented hledger-style simple date (Y-M-D, | ||||
| Y/M/D, Y.M.D..) Any additional text on the same line is used as a | ||||
| transaction description for this day. | ||||
| .PP | ||||
| This is followed by optionally-indented timelog items for that day, one | ||||
| per line. | ||||
| Each timelog item is a note, usually a hledger:style:account:name | ||||
| representing a time category, followed by two or more spaces, and a | ||||
| quantity. | ||||
| Each timelog item generates a hledger transaction. | ||||
| .PP | ||||
| Quantities can be written as: | ||||
| .IP \[bu] 2 | ||||
| a sequence of dots (.) representing quarter hours. | ||||
| Spaces may optionally be used for grouping and readability. | ||||
| dots: a sequence of dots (.) representing quarter hours. | ||||
| Spaces may optionally be used for grouping. | ||||
| Eg: .... | ||||
| \&.. | ||||
| .IP \[bu] 2 | ||||
| @ -47,8 +51,25 @@ Eg: 90m. | ||||
| The following equivalencies are assumed, currently: 1m = 60s, 1h = 60m, | ||||
| 1d = 24h, 1w = 7d, 1mo = 30d, 1y=365d. | ||||
| .PP | ||||
| Blank lines and lines beginning with #, ; or * are ignored. | ||||
| An example: | ||||
| There is some flexibility allowing notes and todo lists to be kept right | ||||
| in the time log, if needed: | ||||
| .IP \[bu] 2 | ||||
| Blank lines and lines beginning with \f[C]#\f[R] or \f[C];\f[R] are | ||||
| ignored. | ||||
| .IP \[bu] 2 | ||||
| Lines not ending with a double-space and quantity are parsed as items | ||||
| taking no time, which will not appear in balance reports by default. | ||||
| (Add -E to see them.) | ||||
| .IP \[bu] 2 | ||||
| Org mode headlines (lines beginning with one or more \f[C]*\f[R] | ||||
| followed by a space) can be used as date lines or timelog items (the | ||||
| stars are ignored). | ||||
| Also all org headlines before the first date line are ignored. | ||||
| This means org users can manage their timelog as an org outline (eg | ||||
| using org-mode/orgstruct-mode in Emacs), for organisation, faster | ||||
| navigation, controlling visibility etc. | ||||
| .PP | ||||
| Examples: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| @ -63,8 +84,6 @@ inc:client1   .... .... | ||||
| biz:research  . | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| Or with numbers: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| @ -74,6 +93,35 @@ fos:hledger   3 | ||||
| biz:research  1 | ||||
| \f[R] | ||||
| .fi | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| * Time log | ||||
| ** 2020-01-01 | ||||
| *** adm:time  . | ||||
| *** adm:finance  . | ||||
| \f[R] | ||||
| .fi | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| * 2020 Work Diary | ||||
| ** Q1 | ||||
| *** 2020-02-29 | ||||
| **** DONE | ||||
| 0700 yoga | ||||
| **** UNPLANNED | ||||
| **** BEGUN | ||||
| hom:chores | ||||
|  cleaning  ... | ||||
|  water plants | ||||
|   outdoor - one full watering can | ||||
|   indoor - light watering | ||||
| **** TODO | ||||
| adm:planning: trip | ||||
| *** LATER | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| Reporting: | ||||
| .IP | ||||
|  | ||||
| @ -4,8 +4,8 @@ stdin. | ||||
|  | ||||
| File: hledger_timedot.info,  Node: Top,  Up: (dir) | ||||
| 
 | ||||
| hledger_timedot(5) hledger 1.16.99 | ||||
| ********************************** | ||||
| hledger_timedot(5) hledger 1.17 | ||||
| ******************************* | ||||
| 
 | ||||
| Timedot - hledger's human-friendly time logging format | ||||
| 
 | ||||
| @ -21,16 +21,20 @@ commodityless quantities, so it could be used to represent dated | ||||
| quantities other than time.  In the docs below we'll assume it's time. | ||||
| 
 | ||||
|    A timedot file contains a series of day entries.  A day entry begins | ||||
| with a date, and is followed by category/quantity pairs, one per line. | ||||
| Dates are hledger-style simple dates (see hledger_journal(5)). | ||||
| Categories are hledger-style account names, optionally indented.  As in | ||||
| a hledger journal, there must be at least two spaces between the | ||||
| category (account name) and the quantity. | ||||
| with a non-indented hledger-style simple date (Y-M-D, Y/M/D, Y.M.D..) | ||||
| Any additional text on the same line is used as a transaction | ||||
| description for this day. | ||||
| 
 | ||||
|    This is followed by optionally-indented timelog items for that day, | ||||
| one per line.  Each timelog item is a note, usually a | ||||
| hledger:style:account:name representing a time category, followed by two | ||||
| or more spaces, and a quantity.  Each timelog item generates a hledger | ||||
| transaction. | ||||
| 
 | ||||
|    Quantities can be written as: | ||||
| 
 | ||||
|    * a sequence of dots (.)  representing quarter hours.  Spaces may | ||||
|      optionally be used for grouping and readability.  Eg: ....  .. | ||||
|    * dots: a sequence of dots (.)  representing quarter hours.  Spaces | ||||
|      may optionally be used for grouping.  Eg: ....  .. | ||||
| 
 | ||||
|    * an integral or decimal number, representing hours.  Eg: 1.5 | ||||
| 
 | ||||
| @ -40,8 +44,23 @@ category (account name) and the quantity. | ||||
|      The following equivalencies are assumed, currently: 1m = 60s, 1h = | ||||
|      60m, 1d = 24h, 1w = 7d, 1mo = 30d, 1y=365d. | ||||
| 
 | ||||
|    Blank lines and lines beginning with #, ; or * are ignored.  An | ||||
| example: | ||||
|    There is some flexibility allowing notes and todo lists to be kept | ||||
| right in the time log, if needed: | ||||
| 
 | ||||
|    * Blank lines and lines beginning with '#' or ';' are ignored. | ||||
| 
 | ||||
|    * Lines not ending with a double-space and quantity are parsed as | ||||
|      items taking no time, which will not appear in balance reports by | ||||
|      default.  (Add -E to see them.) | ||||
| 
 | ||||
|    * Org mode headlines (lines beginning with one or more '*' followed | ||||
|      by a space) can be used as date lines or timelog items (the stars | ||||
|      are ignored).  Also all org headlines before the first date line | ||||
|      are ignored.  This means org users can manage their timelog as an | ||||
|      org outline (eg using org-mode/orgstruct-mode in Emacs), for | ||||
|      organisation, faster navigation, controlling visibility etc. | ||||
| 
 | ||||
|    Examples: | ||||
| 
 | ||||
| # on this day, 6h was spent on client work, 1.5h on haskell FOSS work, etc. | ||||
| 2016/2/1 | ||||
| @ -53,13 +72,32 @@ biz:research  . | ||||
| inc:client1   .... .... | ||||
| biz:research  . | ||||
| 
 | ||||
|    Or with numbers: | ||||
| 
 | ||||
| 2016/2/3 | ||||
| inc:client1   4 | ||||
| fos:hledger   3 | ||||
| biz:research  1 | ||||
| 
 | ||||
| * Time log | ||||
| ** 2020-01-01 | ||||
| *** adm:time  . | ||||
| *** adm:finance  . | ||||
| 
 | ||||
| * 2020 Work Diary | ||||
| ** Q1 | ||||
| *** 2020-02-29 | ||||
| **** DONE | ||||
| 0700 yoga | ||||
| **** UNPLANNED | ||||
| **** BEGUN | ||||
| hom:chores | ||||
|  cleaning  ... | ||||
|  water plants | ||||
|   outdoor - one full watering can | ||||
|   indoor - light watering | ||||
| **** TODO | ||||
| adm:planning: trip | ||||
| *** LATER | ||||
| 
 | ||||
|    Reporting: | ||||
| 
 | ||||
| $ hledger -f t.timedot print date:2016/2/2 | ||||
|  | ||||
| @ -19,16 +19,20 @@ DESCRIPTION | ||||
|        other than time.  In the docs below we'll assume it's time. | ||||
| 
 | ||||
|        A timedot file contains a series of day entries.  A  day  entry  begins | ||||
|        with  a date, and is followed by category/quantity pairs, one per line. | ||||
|        Dates are hledger-style simple dates (see  hledger_journal(5)).   Cate- | ||||
|        gories  are  hledger-style account names, optionally indented.  As in a | ||||
|        hledger journal, there must be at least two spaces between the category | ||||
|        (account name) and the quantity. | ||||
|        with  a  non-indented hledger-style simple date (Y-M-D, Y/M/D, Y.M.D..) | ||||
|        Any additional text on the same line is used as a transaction  descrip- | ||||
|        tion for this day. | ||||
| 
 | ||||
|        This is followed by optionally-indented timelog items for that day, one | ||||
|        per line.  Each timelog item is a  note,  usually  a  hledger:style:ac- | ||||
|        count:name  representing  a time category, followed by two or more spa- | ||||
|        ces, and a quantity.  Each timelog item generates  a  hledger  transac- | ||||
|        tion. | ||||
| 
 | ||||
|        Quantities can be written as: | ||||
| 
 | ||||
|        o a  sequence  of  dots (.) representing quarter hours.  Spaces may op- | ||||
|          tionally be used for grouping and readability.  Eg: ....  .. | ||||
|        o dots:  a sequence of dots (.) representing quarter hours.  Spaces may | ||||
|          optionally be used for grouping.  Eg: ....  .. | ||||
| 
 | ||||
|        o an integral or decimal number, representing hours.  Eg: 1.5 | ||||
| 
 | ||||
| @ -38,8 +42,23 @@ DESCRIPTION | ||||
|          lencies  are  assumed,  currently: 1m = 60s, 1h = 60m, 1d = 24h, 1w = | ||||
|          7d, 1mo = 30d, 1y=365d. | ||||
| 
 | ||||
|        Blank lines and lines beginning with #, ; or * are ignored.   An  exam- | ||||
|        ple: | ||||
|        There is some flexibility allowing notes and  todo  lists  to  be  kept | ||||
|        right in the time log, if needed: | ||||
| 
 | ||||
|        o Blank lines and lines beginning with # or ; are ignored. | ||||
| 
 | ||||
|        o Lines not ending with a double-space and quantity are parsed as items | ||||
|          taking no time, which will not appear in balance reports by  default. | ||||
|          (Add -E to see them.) | ||||
| 
 | ||||
|        o Org  mode headlines (lines beginning with one or more * followed by a | ||||
|          space) can be used as date lines or timelog items (the stars are  ig- | ||||
|          nored).   Also  all  org headlines before the first date line are ig- | ||||
|          nored.  This means org users can manage their timelog as an org  out- | ||||
|          line  (eg  using org-mode/orgstruct-mode in Emacs), for organisation, | ||||
|          faster navigation, controlling visibility etc. | ||||
| 
 | ||||
|        Examples: | ||||
| 
 | ||||
|               # on this day, 6h was spent on client work, 1.5h on haskell FOSS work, etc. | ||||
|               2016/2/1 | ||||
| @ -51,13 +70,32 @@ DESCRIPTION | ||||
|               inc:client1   .... .... | ||||
|               biz:research  . | ||||
| 
 | ||||
|        Or with numbers: | ||||
| 
 | ||||
|               2016/2/3 | ||||
|               inc:client1   4 | ||||
|               fos:hledger   3 | ||||
|               biz:research  1 | ||||
| 
 | ||||
|               * Time log | ||||
|               ** 2020-01-01 | ||||
|               *** adm:time  . | ||||
|               *** adm:finance  . | ||||
| 
 | ||||
|               * 2020 Work Diary | ||||
|               ** Q1 | ||||
|               *** 2020-02-29 | ||||
|               **** DONE | ||||
|               0700 yoga | ||||
|               **** UNPLANNED | ||||
|               **** BEGUN | ||||
|               hom:chores | ||||
|                cleaning  ... | ||||
|                water plants | ||||
|                 outdoor - one full watering can | ||||
|                 indoor - light watering | ||||
|               **** TODO | ||||
|               adm:planning: trip | ||||
|               *** LATER | ||||
| 
 | ||||
|        Reporting: | ||||
| 
 | ||||
|               $ hledger -f t.timedot print date:2016/2/2 | ||||
| @ -82,7 +120,7 @@ DESCRIPTION | ||||
|               ------------++---------------------------------------- | ||||
|                           ||         7.75         2.25         8.00 | ||||
| 
 | ||||
|        I  prefer to use period for separating account components.  We can make | ||||
|        I prefer to use period for separating account components.  We can  make | ||||
|        this work with an account alias: | ||||
| 
 | ||||
|               2016/2/4 | ||||
| @ -101,7 +139,7 @@ DESCRIPTION | ||||
| 
 | ||||
| 
 | ||||
| REPORTING BUGS | ||||
|        Report bugs at http://bugs.hledger.org (or on the #hledger IRC  channel | ||||
|        Report  bugs at http://bugs.hledger.org (or on the #hledger IRC channel | ||||
|        or hledger mail list) | ||||
| 
 | ||||
| 
 | ||||
| @ -115,7 +153,7 @@ COPYRIGHT | ||||
| 
 | ||||
| 
 | ||||
| SEE ALSO | ||||
|        hledger(1),      hledger-ui(1),     hledger-web(1),     hledger-api(1), | ||||
|        hledger(1),     hledger-ui(1),     hledger-web(1),      hledger-api(1), | ||||
|        hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- | ||||
|        dot(5), ledger(1) | ||||
| 
 | ||||
| @ -123,4 +161,4 @@ SEE ALSO | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| hledger 1.16.99                  February 2020              hledger_timedot(5) | ||||
| hledger 1.17                      March 2020                hledger_timedot(5) | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| 
 | ||||
| .TH "hledger-ui" "1" "February 2020" "hledger-ui 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger-ui" "1" "March 2020" "hledger-ui 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -3,8 +3,8 @@ This is hledger-ui.info, produced by makeinfo version 6.7 from stdin. | ||||
|  | ||||
| File: hledger-ui.info,  Node: Top,  Next: OPTIONS,  Up: (dir) | ||||
| 
 | ||||
| hledger-ui(1) hledger-ui 1.16.99 | ||||
| ******************************** | ||||
| hledger-ui(1) hledger-ui 1.17 | ||||
| ***************************** | ||||
| 
 | ||||
| hledger-ui - terminal interface for the hledger accounting tool | ||||
| 
 | ||||
| @ -499,26 +499,26 @@ program is restarted. | ||||
|  | ||||
| Tag Table: | ||||
| Node: Top71 | ||||
| Node: OPTIONS1476 | ||||
| Ref: #options1573 | ||||
| Node: KEYS5004 | ||||
| Ref: #keys5099 | ||||
| Node: SCREENS9375 | ||||
| Ref: #screens9480 | ||||
| Node: Accounts screen9570 | ||||
| Ref: #accounts-screen9698 | ||||
| Node: Register screen11914 | ||||
| Ref: #register-screen12069 | ||||
| Node: Transaction screen14066 | ||||
| Ref: #transaction-screen14224 | ||||
| Node: Error screen15094 | ||||
| Ref: #error-screen15216 | ||||
| Node: ENVIRONMENT15460 | ||||
| Ref: #environment15574 | ||||
| Node: FILES16381 | ||||
| Ref: #files16480 | ||||
| Node: BUGS16693 | ||||
| Ref: #bugs16770 | ||||
| Node: OPTIONS1470 | ||||
| Ref: #options1567 | ||||
| Node: KEYS4998 | ||||
| Ref: #keys5093 | ||||
| Node: SCREENS9369 | ||||
| Ref: #screens9474 | ||||
| Node: Accounts screen9564 | ||||
| Ref: #accounts-screen9692 | ||||
| Node: Register screen11908 | ||||
| Ref: #register-screen12063 | ||||
| Node: Transaction screen14060 | ||||
| Ref: #transaction-screen14218 | ||||
| Node: Error screen15088 | ||||
| Ref: #error-screen15210 | ||||
| Node: ENVIRONMENT15454 | ||||
| Ref: #environment15568 | ||||
| Node: FILES16375 | ||||
| Ref: #files16474 | ||||
| Node: BUGS16687 | ||||
| Ref: #bugs16764 | ||||
|  | ||||
| End Tag Table | ||||
| 
 | ||||
|  | ||||
| @ -441,4 +441,4 @@ SEE ALSO | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| hledger-ui 1.16.99               February 2020                   hledger-ui(1) | ||||
| hledger-ui 1.17                   March 2020                     hledger-ui(1) | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| 
 | ||||
| .TH "hledger-web" "1" "February 2020" "hledger-web 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger-web" "1" "March 2020" "hledger-web 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -343,8 +343,8 @@ what you get from \f[C]/transactions\f[R] or | ||||
| .PP | ||||
| Another way to generate test data is with the | ||||
| \f[C]readJsonFile\f[R]/\f[C]writeJsonFile\f[R] helpers in | ||||
| Hledger.Web.Json, which read or write any of hledger\[aq]s JSON-capable | ||||
| types from or to a file. | ||||
| Hledger.Web.Json, which can write or read most of hledger\[aq]s data | ||||
| types to or from a file. | ||||
| Eg here we write the first transaction of a sample journal: | ||||
| .IP | ||||
| .nf | ||||
|  | ||||
| @ -3,8 +3,8 @@ This is hledger-web.info, produced by makeinfo version 6.7 from stdin. | ||||
|  | ||||
| File: hledger-web.info,  Node: Top,  Next: OPTIONS,  Up: (dir) | ||||
| 
 | ||||
| hledger-web(1) hledger-web 1.16.99 | ||||
| ********************************** | ||||
| hledger-web(1) hledger-web 1.17 | ||||
| ******************************* | ||||
| 
 | ||||
| hledger-web - web interface for the hledger accounting tool | ||||
| 
 | ||||
| @ -350,8 +350,8 @@ form, hledger-web must be started with the 'add' capability for this | ||||
| what you get from '/transactions' or '/accounttransactions'. | ||||
| 
 | ||||
|    Another way to generate test data is with the | ||||
| 'readJsonFile'/'writeJsonFile' helpers in Hledger.Web.Json, which read | ||||
| or write any of hledger's JSON-capable types from or to a file.  Eg here | ||||
| 'readJsonFile'/'writeJsonFile' helpers in Hledger.Web.Json, which can | ||||
| write or read most of hledger's data types to or from a file.  Eg here | ||||
| we write the first transaction of a sample journal: | ||||
| 
 | ||||
| $ make ghci-web | ||||
| @ -427,22 +427,22 @@ awkward. | ||||
|  | ||||
| Tag Table: | ||||
| Node: Top72 | ||||
| Node: OPTIONS1752 | ||||
| Ref: #options1857 | ||||
| Node: PERMISSIONS8201 | ||||
| Ref: #permissions8340 | ||||
| Node: EDITING UPLOADING DOWNLOADING9552 | ||||
| Ref: #editing-uploading-downloading9733 | ||||
| Node: RELOADING10567 | ||||
| Ref: #reloading10701 | ||||
| Node: JSON API11134 | ||||
| Ref: #json-api11248 | ||||
| Node: ENVIRONMENT12689 | ||||
| Ref: #environment12805 | ||||
| Node: FILES13538 | ||||
| Ref: #files13638 | ||||
| Node: BUGS13851 | ||||
| Ref: #bugs13929 | ||||
| Node: OPTIONS1746 | ||||
| Ref: #options1851 | ||||
| Node: PERMISSIONS8195 | ||||
| Ref: #permissions8334 | ||||
| Node: EDITING UPLOADING DOWNLOADING9546 | ||||
| Ref: #editing-uploading-downloading9727 | ||||
| Node: RELOADING10561 | ||||
| Ref: #reloading10695 | ||||
| Node: JSON API11128 | ||||
| Ref: #json-api11242 | ||||
| Node: ENVIRONMENT12680 | ||||
| Ref: #environment12796 | ||||
| Node: FILES13529 | ||||
| Ref: #files13629 | ||||
| Node: BUGS13842 | ||||
| Ref: #bugs13920 | ||||
|  | ||||
| End Tag Table | ||||
| 
 | ||||
|  | ||||
| @ -309,8 +309,8 @@ JSON API | ||||
|        what you get from /transactions or /accounttransactions. | ||||
| 
 | ||||
|        Another way to generate test data is with  the  readJsonFile/writeJson- | ||||
|        File  helpers in Hledger.Web.Json, which read or write any of hledger's | ||||
|        JSON-capable types from or to a file.   Eg  here  we  write  the  first | ||||
|        File  helpers  in  Hledger.Web.Json,  which  can  write or read most of | ||||
|        hledger's data types to or from a file.  Eg here  we  write  the  first | ||||
|        transaction of a sample journal: | ||||
| 
 | ||||
|               $ make ghci-web | ||||
| @ -392,4 +392,4 @@ SEE ALSO | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| hledger-web 1.16.99              February 2020                  hledger-web(1) | ||||
| hledger-web 1.17                  March 2020                    hledger-web(1) | ||||
|  | ||||
| @ -499,5 +499,6 @@ Budget performance in 2019/01: | ||||
| 
 | ||||
| Output format | ||||
| 
 | ||||
| The balance command supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, (multicolumn | ||||
| non-budget reports only) html, and (experimental) json. | ||||
|  | ||||
| @ -39,5 +39,6 @@ for a balance sheet; note this means it ignores report begin dates (and | ||||
| -T/--row-total, since summing end balances generally does not make | ||||
| sense). Instead of absolute values percentages can be displayed with -%. | ||||
| 
 | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, html, and | ||||
| (experimental) json. | ||||
|  | ||||
| @ -29,3 +29,7 @@ Equity: | ||||
| Total: | ||||
| -------------------- | ||||
|                    0 | ||||
| 
 | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, html, and | ||||
| (experimental) json. | ||||
|  | ||||
| @ -30,5 +30,6 @@ though as with multicolumn balance reports you can alter the report mode | ||||
| with --change/--cumulative/--historical. Instead of absolute values | ||||
| percentages can be displayed with -%. | ||||
| 
 | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, html, and | ||||
| (experimental) json. | ||||
|  | ||||
| @ -39,5 +39,6 @@ period, though as with multicolumn balance reports you can alter the | ||||
| report mode with --change/--cumulative/--historical. Instead of absolute | ||||
| values percentages can be displayed with -%. | ||||
| 
 | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, html, and | ||||
| (experimental) json. | ||||
|  | ||||
| @ -70,8 +70,11 @@ This assumes that transactions added to FILE always have same or | ||||
| increasing dates, and that transactions on the same day do not get | ||||
| reordered. See also the import command. | ||||
| 
 | ||||
| This command also supports output destination and output format | ||||
| selection. Here's an example of print's CSV output: | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, and (experimental) | ||||
| json. | ||||
| 
 | ||||
| Here's an example of print's CSV output: | ||||
| 
 | ||||
| $ hledger print -Ocsv | ||||
| "txnidx","date","date2","status","code","description","comment","account","amount","commodity","credit","debit","posting-status","posting-comment" | ||||
|  | ||||
| @ -103,5 +103,6 @@ $ export COLUMNS=100; hledger reg # set till session end (or window resize) | ||||
| $ hledger reg -w 100,40           # set overall width 100, description width 40 | ||||
| $ hledger reg -w $COLUMNS,40      # use terminal width, & description width 40 | ||||
| 
 | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are txt, csv, and (experimental) | ||||
| json. | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| .\"t | ||||
| 
 | ||||
| .TH "hledger" "1" "February 2020" "hledger 1.16.99" "hledger User Manuals" | ||||
| .TH "hledger" "1" "March 2020" "hledger 1.17" "hledger User Manuals" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -1037,31 +1037,90 @@ If you need those, either use the include directive, or concatenate the | ||||
| files, eg: \f[C]cat a.journal b.journal | hledger -f- CMD\f[R]. | ||||
| .SS Output destination | ||||
| .PP | ||||
| Some commands (print, register, stats, the balance commands) can write | ||||
| their output to a destination other than the console. | ||||
| This is controlled by the \f[C]-o/--output-file\f[R] option. | ||||
| hledger commands send their output to the terminal by default. | ||||
| You can of course redirect this, eg into a file, using standard shell | ||||
| syntax: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| $ hledger balance -o -     # write to stdout (the default) | ||||
| $ hledger balance -o FILE  # write to FILE | ||||
| $ hledger print > foo.txt | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| Some commands (print, register, stats, the balance commands) also | ||||
| provide the \f[C]-o/--output-file\f[R] option, which does the same thing | ||||
| without needing the shell. | ||||
| Eg: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| $ hledger print -o foo.txt | ||||
| $ hledger print -o -        # write to stdout (the default) | ||||
| \f[R] | ||||
| .fi | ||||
| .SS Output format | ||||
| .PP | ||||
| Some commands can write their output in other formats. | ||||
| Eg print and register can output CSV, and the balance commands can | ||||
| output CSV or HTML. | ||||
| This is controlled by the \f[C]-O/--output-format\f[R] option, or by | ||||
| specifying a \f[C].csv\f[R] or \f[C].html\f[R] file extension with | ||||
| \f[C]-o/--output-file\f[R]. | ||||
| Some commands (print, register, the balance commands) offer a choice of | ||||
| output format. | ||||
| In addition to the usual plain text format (\f[C]txt\f[R]), there are | ||||
| CSV (\f[C]csv\f[R]), HTML (\f[C]html\f[R]) and JSON (\f[C]json\f[R]). | ||||
| This is controlled by the \f[C]-O/--output-format\f[R] option: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| $ hledger balance -O csv       # write CSV to stdout | ||||
| $ hledger balance -o FILE.csv  # write CSV to FILE.csv | ||||
| $ hledger print -O csv | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| or, by a file extension specified with \f[C]-o/--output-file\f[R]: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| $ hledger balancesheet -o foo.html   # write HTML to foo.html | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| The \f[C]-O\f[R] option can be used to override the file extension if | ||||
| needed: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| $ hledger balancesheet -o foo.txt -O html   # write HTML to foo.txt | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| Some notes about JSON output: | ||||
| .IP \[bu] 2 | ||||
| This feature is marked experimental, and not yet much used; you should | ||||
| expect our JSON to evolve. | ||||
| Real-world feedback is welcome. | ||||
| .IP \[bu] 2 | ||||
| Our JSON is rather large and verbose, as it is quite a faithful | ||||
| representation of hledger\[aq]s internal data types. | ||||
| To understand the JSON, read the Haskell type definitions, which are | ||||
| mostly in | ||||
| https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs. | ||||
| .IP \[bu] 2 | ||||
| The JSON output from hledger commands is essentially the same as the | ||||
| JSON served by hledger-web\[aq]s JSON API, but pretty printed, using | ||||
| line breaks and indentation. | ||||
| Our pretty printer has the ability to elide data in certain cases - | ||||
| rendering non-strings as if they were strings, or displaying | ||||
| \[dq]FOO..\[dq] instead of FOO\[aq]s full details. | ||||
| This should never happen in hledger\[aq]s JSON output; if you see | ||||
| otherwise, please report as a bug. | ||||
| .IP \[bu] 2 | ||||
| hledger represents quantities as Decimal values storing up to 255 | ||||
| significant digits, eg for repeating decimals. | ||||
| Such numbers can arise in practice (from automatically-calculated | ||||
| transaction prices), and would break most JSON consumers. | ||||
| So in JSON, we show quantities as simple Numbers with at most 10 decimal | ||||
| places. | ||||
| We don\[aq]t limit the number of integer digits, but that part is under | ||||
| your control. | ||||
| We hope this approach will not cause problems in practice; if you find | ||||
| otherwise, please let us know. | ||||
| (Cf #1195) | ||||
| .SS Regular expressions | ||||
| .PP | ||||
| hledger uses regular expressions in a number of places: | ||||
| @ -2955,8 +3014,10 @@ Budget performance in 2019/01: | ||||
| .fi | ||||
| .SS Output format | ||||
| .PP | ||||
| The balance command supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| (multicolumn non-budget reports only) \f[C]html\f[R], and (experimental) | ||||
| \f[C]json\f[R]. | ||||
| .SS balancesheet | ||||
| .PP | ||||
| balancesheet, bs | ||||
| @ -3010,8 +3071,9 @@ generally does not make sense). | ||||
| Instead of absolute values percentages can be displayed with | ||||
| \f[C]-%\f[R]. | ||||
| .PP | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| \f[C]html\f[R], and (experimental) \f[C]json\f[R]. | ||||
| .SS balancesheetequity | ||||
| .PP | ||||
| balancesheetequity, bse | ||||
| @ -3050,6 +3112,10 @@ Total: | ||||
|                    0 | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| \f[C]html\f[R], and (experimental) \f[C]json\f[R]. | ||||
| .SS cashflow | ||||
| .PP | ||||
| cashflow, cf | ||||
| @ -3093,8 +3159,9 @@ multicolumn balance reports you can alter the report mode with | ||||
| Instead of absolute values percentages can be displayed with | ||||
| \f[C]-%\f[R]. | ||||
| .PP | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| \f[C]html\f[R], and (experimental) \f[C]json\f[R]. | ||||
| .SS check-dates | ||||
| .PP | ||||
| check-dates | ||||
| @ -3461,8 +3528,9 @@ with multicolumn balance reports you can alter the report mode with | ||||
| Instead of absolute values percentages can be displayed with | ||||
| \f[C]-%\f[R]. | ||||
| .PP | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| \f[C]html\f[R], and (experimental) \f[C]json\f[R]. | ||||
| .SS notes | ||||
| .PP | ||||
| notes Show notes. | ||||
| @ -3602,8 +3670,10 @@ increasing dates, and that transactions on the same day do not get | ||||
| reordered. | ||||
| See also the import command. | ||||
| .PP | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| and (experimental) \f[C]json\f[R]. | ||||
| .PP | ||||
| Here\[aq]s an example of print\[aq]s CSV output: | ||||
| .IP | ||||
| .nf | ||||
| @ -3812,8 +3882,9 @@ $ hledger reg -w $COLUMNS,40      # use terminal width, & description width 40 | ||||
| \f[R] | ||||
| .fi | ||||
| .PP | ||||
| This command also supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are \f[C]txt\f[R], \f[C]csv\f[R], | ||||
| and (experimental) \f[C]json\f[R]. | ||||
| .SS register-match | ||||
| .PP | ||||
| register-match | ||||
|  | ||||
| @ -3,8 +3,8 @@ This is hledger.info, produced by makeinfo version 6.7 from stdin. | ||||
|  | ||||
| File: hledger.info,  Node: Top,  Next: COMMON TASKS,  Up: (dir) | ||||
| 
 | ||||
| hledger(1) hledger 1.16.99 | ||||
| ************************** | ||||
| hledger(1) hledger 1.17 | ||||
| *********************** | ||||
| 
 | ||||
| hledger - a command-line accounting tool | ||||
| 
 | ||||
| @ -978,12 +978,17 @@ File: hledger.info,  Node: Output destination,  Next: Output format,  Prev: Inpu | ||||
| 2.8 Output destination | ||||
| ====================== | ||||
| 
 | ||||
| Some commands (print, register, stats, the balance commands) can write | ||||
| their output to a destination other than the console.  This is | ||||
| controlled by the '-o/--output-file' option. | ||||
| hledger commands send their output to the terminal by default.  You can | ||||
| of course redirect this, eg into a file, using standard shell syntax: | ||||
| 
 | ||||
| $ hledger balance -o -     # write to stdout (the default) | ||||
| $ hledger balance -o FILE  # write to FILE | ||||
| $ hledger print > foo.txt | ||||
| 
 | ||||
|    Some commands (print, register, stats, the balance commands) also | ||||
| provide the '-o/--output-file' option, which does the same thing without | ||||
| needing the shell.  Eg: | ||||
| 
 | ||||
| $ hledger print -o foo.txt | ||||
| $ hledger print -o -        # write to stdout (the default) | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: Output format,  Next: Regular expressions,  Prev: Output destination,  Up: OPTIONS | ||||
| @ -991,13 +996,47 @@ File: hledger.info,  Node: Output format,  Next: Regular expressions,  Prev: Out | ||||
| 2.9 Output format | ||||
| ================= | ||||
| 
 | ||||
| Some commands can write their output in other formats.  Eg print and | ||||
| register can output CSV, and the balance commands can output CSV or | ||||
| HTML. This is controlled by the '-O/--output-format' option, or by | ||||
| specifying a '.csv' or '.html' file extension with '-o/--output-file'. | ||||
| Some commands (print, register, the balance commands) offer a choice of | ||||
| output format.  In addition to the usual plain text format ('txt'), | ||||
| there are CSV ('csv'), HTML ('html') and JSON ('json').  This is | ||||
| controlled by the '-O/--output-format' option: | ||||
| 
 | ||||
| $ hledger balance -O csv       # write CSV to stdout | ||||
| $ hledger balance -o FILE.csv  # write CSV to FILE.csv | ||||
| $ hledger print -O csv | ||||
| 
 | ||||
|    or, by a file extension specified with '-o/--output-file': | ||||
| 
 | ||||
| $ hledger balancesheet -o foo.html   # write HTML to foo.html | ||||
| 
 | ||||
|    The '-O' option can be used to override the file extension if needed: | ||||
| 
 | ||||
| $ hledger balancesheet -o foo.txt -O html   # write HTML to foo.txt | ||||
| 
 | ||||
|    Some notes about JSON output: | ||||
| 
 | ||||
|    * This feature is marked experimental, and not yet much used; you | ||||
|      should expect our JSON to evolve.  Real-world feedback is welcome. | ||||
| 
 | ||||
|    * Our JSON is rather large and verbose, as it is quite a faithful | ||||
|      representation of hledger's internal data types.  To understand the | ||||
|      JSON, read the Haskell type definitions, which are mostly in | ||||
|      https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs. | ||||
| 
 | ||||
|    * The JSON output from hledger commands is essentially the same as | ||||
|      the JSON served by hledger-web's JSON API, but pretty printed, | ||||
|      using line breaks and indentation.  Our pretty printer has the | ||||
|      ability to elide data in certain cases - rendering non-strings as | ||||
|      if they were strings, or displaying "FOO.." instead of FOO's full | ||||
|      details.  This should never happen in hledger's JSON output; if you | ||||
|      see otherwise, please report as a bug. | ||||
| 
 | ||||
|    * hledger represents quantities as Decimal values storing up to 255 | ||||
|      significant digits, eg for repeating decimals.  Such numbers can | ||||
|      arise in practice (from automatically-calculated transaction | ||||
|      prices), and would break most JSON consumers.  So in JSON, we show | ||||
|      quantities as simple Numbers with at most 10 decimal places.  We | ||||
|      don't limit the number of integer digits, but that part is under | ||||
|      your control.  We hope this approach will not cause problems in | ||||
|      practice; if you find otherwise, please let us know.  (Cf #1195) | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: Regular expressions,  Next: Smart dates,  Prev: Output format,  Up: OPTIONS | ||||
| @ -2437,8 +2476,9 @@ Budget performance in 2019/01: | ||||
| 3.4.9 Output format | ||||
| ------------------- | ||||
| 
 | ||||
| The balance command supports output destination and output format | ||||
| selection. | ||||
| This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', (multicolumn | ||||
| non-budget reports only) 'html', and (experimental) 'json'. | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: balancesheet,  Next: balancesheetequity,  Prev: balance,  Up: COMMANDS | ||||
| @ -2486,8 +2526,9 @@ for a balance sheet; note this means it ignores report begin dates (and | ||||
| sense).  Instead of absolute values percentages can be displayed with | ||||
| '-%'. | ||||
| 
 | ||||
|    This command also supports output destination and output format | ||||
| selection. | ||||
|    This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', 'html', and | ||||
| (experimental) 'json'. | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: balancesheetequity,  Next: cashflow,  Prev: balancesheet,  Up: COMMANDS | ||||
| @ -2525,6 +2566,10 @@ Total: | ||||
| -------------------- | ||||
|                    0 | ||||
| 
 | ||||
|    This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', 'html', and | ||||
| (experimental) 'json'. | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: cashflow,  Next: check-dates,  Prev: balancesheetequity,  Up: COMMANDS | ||||
| 
 | ||||
| @ -2561,8 +2606,9 @@ period, though as with multicolumn balance reports you can alter the | ||||
| report mode with '--change'/'--cumulative'/'--historical'.  Instead of | ||||
| absolute values percentages can be displayed with '-%'. | ||||
| 
 | ||||
|    This command also supports output destination and output format | ||||
| selection. | ||||
|    This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', 'html', and | ||||
| (experimental) 'json'. | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: check-dates,  Next: check-dupes,  Prev: cashflow,  Up: COMMANDS | ||||
| @ -2904,8 +2950,9 @@ per period, though as with multicolumn balance reports you can alter the | ||||
| report mode with '--change'/'--cumulative'/'--historical'.  Instead of | ||||
| absolute values percentages can be displayed with '-%'. | ||||
| 
 | ||||
|    This command also supports output destination and output format | ||||
| selection. | ||||
|    This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', 'html', and | ||||
| (experimental) 'json'. | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: notes,  Next: payees,  Prev: incomestatement,  Up: COMMANDS | ||||
| @ -3029,8 +3076,11 @@ $ hledger -f bank1.csv print --new | ||||
| increasing dates, and that transactions on the same day do not get | ||||
| reordered.  See also the import command. | ||||
| 
 | ||||
|    This command also supports output destination and output format | ||||
| selection.  Here's an example of print's CSV output: | ||||
|    This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', and | ||||
| (experimental) 'json'. | ||||
| 
 | ||||
|    Here's an example of print's CSV output: | ||||
| 
 | ||||
| $ hledger print -Ocsv | ||||
| "txnidx","date","date2","status","code","description","comment","account","amount","commodity","credit","debit","posting-status","posting-comment" | ||||
| @ -3198,8 +3248,9 @@ $ export COLUMNS=100; hledger reg # set till session end (or window resize) | ||||
| $ hledger reg -w 100,40           # set overall width 100, description width 40 | ||||
| $ hledger reg -w $COLUMNS,40      # use terminal width, & description width 40 | ||||
| 
 | ||||
|    This command also supports output destination and output format | ||||
| selection. | ||||
|    This command also supports the output destination and output format | ||||
| options The output formats supported are 'txt', 'csv', and | ||||
| (experimental) 'json'. | ||||
| 
 | ||||
|  | ||||
| File: hledger.info,  Node: register-match,  Next: rewrite,  Prev: register,  Up: COMMANDS | ||||
| @ -3683,187 +3734,187 @@ $ LANG=fr_FR.utf8 hledger -f my.journal print | ||||
|  | ||||
| Tag Table: | ||||
| Node: Top68 | ||||
| Node: COMMON TASKS2321 | ||||
| Ref: #common-tasks2433 | ||||
| Node: Getting help2840 | ||||
| Ref: #getting-help2972 | ||||
| Node: Constructing command lines3525 | ||||
| Ref: #constructing-command-lines3717 | ||||
| Node: Starting a journal file4414 | ||||
| Ref: #starting-a-journal-file4612 | ||||
| Node: Setting opening balances5800 | ||||
| Ref: #setting-opening-balances5996 | ||||
| Node: Recording transactions9137 | ||||
| Ref: #recording-transactions9317 | ||||
| Node: Reconciling9873 | ||||
| Ref: #reconciling10016 | ||||
| Node: Reporting12273 | ||||
| Ref: #reporting12413 | ||||
| Node: Migrating to a new file16412 | ||||
| Ref: #migrating-to-a-new-file16560 | ||||
| Node: OPTIONS16859 | ||||
| Ref: #options16966 | ||||
| Node: General options17336 | ||||
| Ref: #general-options17461 | ||||
| Node: Command options20231 | ||||
| Ref: #command-options20382 | ||||
| Node: Command arguments20780 | ||||
| Ref: #command-arguments20927 | ||||
| Node: Queries21807 | ||||
| Ref: #queries21962 | ||||
| Node: Special characters in arguments and queries25924 | ||||
| Ref: #special-characters-in-arguments-and-queries26152 | ||||
| Node: More escaping26603 | ||||
| Ref: #more-escaping26765 | ||||
| Node: Even more escaping27061 | ||||
| Ref: #even-more-escaping27255 | ||||
| Node: Less escaping27926 | ||||
| Ref: #less-escaping28088 | ||||
| Node: Unicode characters28333 | ||||
| Ref: #unicode-characters28515 | ||||
| Node: Input files29927 | ||||
| Ref: #input-files30070 | ||||
| Node: Output destination31999 | ||||
| Ref: #output-destination32151 | ||||
| Node: Output format32434 | ||||
| Ref: #output-format32584 | ||||
| Node: Regular expressions32969 | ||||
| Ref: #regular-expressions33126 | ||||
| Node: Smart dates34487 | ||||
| Ref: #smart-dates34638 | ||||
| Node: Report start & end date35999 | ||||
| Ref: #report-start-end-date36171 | ||||
| Node: Report intervals37609 | ||||
| Ref: #report-intervals37774 | ||||
| Node: Period expressions38164 | ||||
| Ref: #period-expressions38324 | ||||
| Node: Depth limiting42450 | ||||
| Ref: #depth-limiting42594 | ||||
| Node: Pivoting42936 | ||||
| Ref: #pivoting43059 | ||||
| Node: Valuation44735 | ||||
| Ref: #valuation44837 | ||||
| Node: -B Cost45017 | ||||
| Ref: #b-cost45128 | ||||
| Node: -V Market value45326 | ||||
| Ref: #v-market-value45500 | ||||
| Node: -X Market value in specified commodity46932 | ||||
| Ref: #x-market-value-in-specified-commodity47171 | ||||
| Node: --value Flexible valuation47347 | ||||
| Ref: #value-flexible-valuation47573 | ||||
| Node: Effect of --value on reports52078 | ||||
| Ref: #effect-of---value-on-reports52294 | ||||
| Node: Combining -B -V -X --value57840 | ||||
| Ref: #combining--b--v--x---value58023 | ||||
| Node: COMMANDS58059 | ||||
| Ref: #commands58167 | ||||
| Node: accounts59251 | ||||
| Ref: #accounts59349 | ||||
| Node: activity60048 | ||||
| Ref: #activity60158 | ||||
| Node: add60541 | ||||
| Ref: #add60640 | ||||
| Node: balance63379 | ||||
| Ref: #balance63490 | ||||
| Node: Classic balance report64948 | ||||
| Ref: #classic-balance-report65121 | ||||
| Node: Customising the classic balance report66490 | ||||
| Ref: #customising-the-classic-balance-report66718 | ||||
| Node: Colour support68794 | ||||
| Ref: #colour-support68961 | ||||
| Node: Flat mode69134 | ||||
| Ref: #flat-mode69282 | ||||
| Node: Depth limited balance reports69695 | ||||
| Ref: #depth-limited-balance-reports69880 | ||||
| Node: Percentages70336 | ||||
| Ref: #percentages70502 | ||||
| Node: Multicolumn balance report71639 | ||||
| Ref: #multicolumn-balance-report71819 | ||||
| Node: Budget report77081 | ||||
| Ref: #budget-report77224 | ||||
| Node: Nested budgets82426 | ||||
| Ref: #nested-budgets82538 | ||||
| Ref: #output-format-186019 | ||||
| Node: balancesheet86097 | ||||
| Ref: #balancesheet86233 | ||||
| Node: balancesheetequity87616 | ||||
| Ref: #balancesheetequity87765 | ||||
| Node: cashflow88326 | ||||
| Ref: #cashflow88454 | ||||
| Node: check-dates89550 | ||||
| Ref: #check-dates89677 | ||||
| Node: check-dupes89956 | ||||
| Ref: #check-dupes90080 | ||||
| Node: close90373 | ||||
| Ref: #close90487 | ||||
| Node: close usage92009 | ||||
| Ref: #close-usage92102 | ||||
| Node: commodities94915 | ||||
| Ref: #commodities95042 | ||||
| Node: descriptions95124 | ||||
| Ref: #descriptions95252 | ||||
| Node: diff95433 | ||||
| Ref: #diff95539 | ||||
| Node: files96586 | ||||
| Ref: #files96686 | ||||
| Node: help96833 | ||||
| Ref: #help96933 | ||||
| Node: import98014 | ||||
| Ref: #import98128 | ||||
| Node: Importing balance assignments99021 | ||||
| Ref: #importing-balance-assignments99169 | ||||
| Node: incomestatement99818 | ||||
| Ref: #incomestatement99951 | ||||
| Node: notes101355 | ||||
| Ref: #notes101468 | ||||
| Node: payees101594 | ||||
| Ref: #payees101700 | ||||
| Node: prices101858 | ||||
| Ref: #prices101964 | ||||
| Node: print102305 | ||||
| Ref: #print102415 | ||||
| Node: print-unique107123 | ||||
| Ref: #print-unique107249 | ||||
| Node: register107534 | ||||
| Ref: #register107661 | ||||
| Node: Custom register output111833 | ||||
| Ref: #custom-register-output111962 | ||||
| Node: register-match113224 | ||||
| Ref: #register-match113358 | ||||
| Node: rewrite113709 | ||||
| Ref: #rewrite113824 | ||||
| Node: Re-write rules in a file115679 | ||||
| Ref: #re-write-rules-in-a-file115813 | ||||
| Node: Diff output format117023 | ||||
| Ref: #diff-output-format117192 | ||||
| Node: rewrite vs print --auto118284 | ||||
| Ref: #rewrite-vs.-print---auto118463 | ||||
| Node: roi119019 | ||||
| Ref: #roi119117 | ||||
| Node: stats120129 | ||||
| Ref: #stats120228 | ||||
| Node: tags121016 | ||||
| Ref: #tags121114 | ||||
| Node: test121408 | ||||
| Ref: #test121516 | ||||
| Node: Add-on Commands122263 | ||||
| Ref: #add-on-commands122380 | ||||
| Node: ui123723 | ||||
| Ref: #ui123811 | ||||
| Node: web123865 | ||||
| Ref: #web123968 | ||||
| Node: iadd124084 | ||||
| Ref: #iadd124195 | ||||
| Node: interest124277 | ||||
| Ref: #interest124384 | ||||
| Node: ENVIRONMENT124624 | ||||
| Ref: #environment124736 | ||||
| Node: FILES125565 | ||||
| Ref: #files-1125668 | ||||
| Node: LIMITATIONS125881 | ||||
| Ref: #limitations126000 | ||||
| Node: TROUBLESHOOTING126742 | ||||
| Ref: #troubleshooting126855 | ||||
| Node: COMMON TASKS2315 | ||||
| Ref: #common-tasks2427 | ||||
| Node: Getting help2834 | ||||
| Ref: #getting-help2966 | ||||
| Node: Constructing command lines3519 | ||||
| Ref: #constructing-command-lines3711 | ||||
| Node: Starting a journal file4408 | ||||
| Ref: #starting-a-journal-file4606 | ||||
| Node: Setting opening balances5794 | ||||
| Ref: #setting-opening-balances5990 | ||||
| Node: Recording transactions9131 | ||||
| Ref: #recording-transactions9311 | ||||
| Node: Reconciling9867 | ||||
| Ref: #reconciling10010 | ||||
| Node: Reporting12267 | ||||
| Ref: #reporting12407 | ||||
| Node: Migrating to a new file16406 | ||||
| Ref: #migrating-to-a-new-file16554 | ||||
| Node: OPTIONS16853 | ||||
| Ref: #options16960 | ||||
| Node: General options17330 | ||||
| Ref: #general-options17455 | ||||
| Node: Command options20225 | ||||
| Ref: #command-options20376 | ||||
| Node: Command arguments20774 | ||||
| Ref: #command-arguments20921 | ||||
| Node: Queries21801 | ||||
| Ref: #queries21956 | ||||
| Node: Special characters in arguments and queries25918 | ||||
| Ref: #special-characters-in-arguments-and-queries26146 | ||||
| Node: More escaping26597 | ||||
| Ref: #more-escaping26759 | ||||
| Node: Even more escaping27055 | ||||
| Ref: #even-more-escaping27249 | ||||
| Node: Less escaping27920 | ||||
| Ref: #less-escaping28082 | ||||
| Node: Unicode characters28327 | ||||
| Ref: #unicode-characters28509 | ||||
| Node: Input files29921 | ||||
| Ref: #input-files30064 | ||||
| Node: Output destination31993 | ||||
| Ref: #output-destination32145 | ||||
| Node: Output format32570 | ||||
| Ref: #output-format32720 | ||||
| Node: Regular expressions34768 | ||||
| Ref: #regular-expressions34925 | ||||
| Node: Smart dates36286 | ||||
| Ref: #smart-dates36437 | ||||
| Node: Report start & end date37798 | ||||
| Ref: #report-start-end-date37970 | ||||
| Node: Report intervals39408 | ||||
| Ref: #report-intervals39573 | ||||
| Node: Period expressions39963 | ||||
| Ref: #period-expressions40123 | ||||
| Node: Depth limiting44249 | ||||
| Ref: #depth-limiting44393 | ||||
| Node: Pivoting44735 | ||||
| Ref: #pivoting44858 | ||||
| Node: Valuation46534 | ||||
| Ref: #valuation46636 | ||||
| Node: -B Cost46816 | ||||
| Ref: #b-cost46927 | ||||
| Node: -V Market value47125 | ||||
| Ref: #v-market-value47299 | ||||
| Node: -X Market value in specified commodity48731 | ||||
| Ref: #x-market-value-in-specified-commodity48970 | ||||
| Node: --value Flexible valuation49146 | ||||
| Ref: #value-flexible-valuation49372 | ||||
| Node: Effect of --value on reports53877 | ||||
| Ref: #effect-of---value-on-reports54093 | ||||
| Node: Combining -B -V -X --value59639 | ||||
| Ref: #combining--b--v--x---value59822 | ||||
| Node: COMMANDS59858 | ||||
| Ref: #commands59966 | ||||
| Node: accounts61050 | ||||
| Ref: #accounts61148 | ||||
| Node: activity61847 | ||||
| Ref: #activity61957 | ||||
| Node: add62340 | ||||
| Ref: #add62439 | ||||
| Node: balance65178 | ||||
| Ref: #balance65289 | ||||
| Node: Classic balance report66747 | ||||
| Ref: #classic-balance-report66920 | ||||
| Node: Customising the classic balance report68289 | ||||
| Ref: #customising-the-classic-balance-report68517 | ||||
| Node: Colour support70593 | ||||
| Ref: #colour-support70760 | ||||
| Node: Flat mode70933 | ||||
| Ref: #flat-mode71081 | ||||
| Node: Depth limited balance reports71494 | ||||
| Ref: #depth-limited-balance-reports71679 | ||||
| Node: Percentages72135 | ||||
| Ref: #percentages72301 | ||||
| Node: Multicolumn balance report73438 | ||||
| Ref: #multicolumn-balance-report73618 | ||||
| Node: Budget report78880 | ||||
| Ref: #budget-report79023 | ||||
| Node: Nested budgets84225 | ||||
| Ref: #nested-budgets84337 | ||||
| Ref: #output-format-187818 | ||||
| Node: balancesheet88015 | ||||
| Ref: #balancesheet88151 | ||||
| Node: balancesheetequity89617 | ||||
| Ref: #balancesheetequity89766 | ||||
| Node: cashflow90489 | ||||
| Ref: #cashflow90617 | ||||
| Node: check-dates91796 | ||||
| Ref: #check-dates91923 | ||||
| Node: check-dupes92202 | ||||
| Ref: #check-dupes92326 | ||||
| Node: close92619 | ||||
| Ref: #close92733 | ||||
| Node: close usage94255 | ||||
| Ref: #close-usage94348 | ||||
| Node: commodities97161 | ||||
| Ref: #commodities97288 | ||||
| Node: descriptions97370 | ||||
| Ref: #descriptions97498 | ||||
| Node: diff97679 | ||||
| Ref: #diff97785 | ||||
| Node: files98832 | ||||
| Ref: #files98932 | ||||
| Node: help99079 | ||||
| Ref: #help99179 | ||||
| Node: import100260 | ||||
| Ref: #import100374 | ||||
| Node: Importing balance assignments101267 | ||||
| Ref: #importing-balance-assignments101415 | ||||
| Node: incomestatement102064 | ||||
| Ref: #incomestatement102197 | ||||
| Node: notes103684 | ||||
| Ref: #notes103797 | ||||
| Node: payees103923 | ||||
| Ref: #payees104029 | ||||
| Node: prices104187 | ||||
| Ref: #prices104293 | ||||
| Node: print104634 | ||||
| Ref: #print104744 | ||||
| Node: print-unique109530 | ||||
| Ref: #print-unique109656 | ||||
| Node: register109941 | ||||
| Ref: #register110068 | ||||
| Node: Custom register output114240 | ||||
| Ref: #custom-register-output114369 | ||||
| Node: register-match115706 | ||||
| Ref: #register-match115840 | ||||
| Node: rewrite116191 | ||||
| Ref: #rewrite116306 | ||||
| Node: Re-write rules in a file118161 | ||||
| Ref: #re-write-rules-in-a-file118295 | ||||
| Node: Diff output format119505 | ||||
| Ref: #diff-output-format119674 | ||||
| Node: rewrite vs print --auto120766 | ||||
| Ref: #rewrite-vs.-print---auto120945 | ||||
| Node: roi121501 | ||||
| Ref: #roi121599 | ||||
| Node: stats122611 | ||||
| Ref: #stats122710 | ||||
| Node: tags123498 | ||||
| Ref: #tags123596 | ||||
| Node: test123890 | ||||
| Ref: #test123998 | ||||
| Node: Add-on Commands124745 | ||||
| Ref: #add-on-commands124862 | ||||
| Node: ui126205 | ||||
| Ref: #ui126293 | ||||
| Node: web126347 | ||||
| Ref: #web126450 | ||||
| Node: iadd126566 | ||||
| Ref: #iadd126677 | ||||
| Node: interest126759 | ||||
| Ref: #interest126866 | ||||
| Node: ENVIRONMENT127106 | ||||
| Ref: #environment127218 | ||||
| Node: FILES128047 | ||||
| Ref: #files-1128150 | ||||
| Node: LIMITATIONS128363 | ||||
| Ref: #limitations128482 | ||||
| Node: TROUBLESHOOTING129224 | ||||
| Ref: #troubleshooting129337 | ||||
|  | ||||
| End Tag Table | ||||
| 
 | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user