regen manuals
[ci skip]
This commit is contained in:
		
							parent
							
								
									1c2bf7e784
								
							
						
					
					
						commit
						a3ae68020f
					
				| @ -232,7 +232,7 @@ period (without -E, leading and trailing columns with all zeroes are not | ||||
| shown). Second, all accounts which existed at the report start date will | ||||
| be considered, not just the ones with activity during the report period | ||||
| (use -E to include low-activity accounts which would otherwise would be | ||||
| omitted). With --budget, --empty also shows unbudgeted accounts. | ||||
| omitted). | ||||
| 
 | ||||
| The -T/--row-total flag adds an additional column showing the total for | ||||
| each row. | ||||
| @ -320,13 +320,28 @@ Budget performance in 2017/11/01-2017/12/31: | ||||
| ----------------------++---------------------------------------------------- | ||||
|                       ||      0 [              0]       0 [              0]  | ||||
| 
 | ||||
| By default, only accounts with budget goals during the report period are | ||||
| shown. In the example above, transactions in expenses:gifts and | ||||
| expenses:supplies are counted towards expenses budget, but accounts | ||||
| expenses:gifts and expenses:supplies are not shown, as they don't have | ||||
| any budgets. | ||||
| Note this is different from a normal balance report in several ways: | ||||
| 
 | ||||
| You can use --empty shows unbudgeted accounts as well: | ||||
| -   Only accounts with budget goals during the report period are shown, | ||||
|     by default. | ||||
| 
 | ||||
| -   In each column, in square brackets after the actual amount, budgeted | ||||
|     amounts are shown, along with the percentage of budget used. | ||||
| 
 | ||||
| -   All parent accounts are always shown, even in flat mode. Eg assets, | ||||
|     assets:bank, and expenses above. | ||||
| 
 | ||||
| -   Amounts always include all subaccounts, budgeted or unbudgeted, even | ||||
|     in flat mode. | ||||
| 
 | ||||
| This means that the numbers displayed will not always add up! Eg above, | ||||
| the expenses actual amount includes the gifts and supplies transactions, | ||||
| but the expenses:gifts and expenses:supplies accounts are not shown, as | ||||
| they have no budget amounts declared. | ||||
| 
 | ||||
| This can be confusing. When you need to make things clearer, use the | ||||
| -E/--empty flag, which will reveal all accounts including unbudgeted | ||||
| ones, giving the full picture. Eg: | ||||
| 
 | ||||
| $ hledger balance -M --budget --empty | ||||
| Budget performance in 2017/11/01-2017/12/31: | ||||
| @ -364,9 +379,6 @@ Budget performance in 2017/11/01-2017/12/31: | ||||
| ----------------------++---------------------------------------------------- | ||||
|                       ||      0 [              0]       0 [              0]  | ||||
| 
 | ||||
| Note, the -S/--sort-amount flag is not yet fully supported with | ||||
| --budget. | ||||
| 
 | ||||
| For more examples, see Budgeting and Forecasting. | ||||
| 
 | ||||
| Nested budgets | ||||
|  | ||||
| @ -1783,8 +1783,6 @@ Second, all accounts which existed at the report start date will be | ||||
| considered, not just the ones with activity during the report period | ||||
| (use \-E to include low\-activity accounts which would otherwise would | ||||
| be omitted). | ||||
| With \f[C]\-\-budget\f[], \f[C]\-\-empty\f[] also shows unbudgeted | ||||
| accounts. | ||||
| .PP | ||||
| The \f[C]\-T/\-\-row\-total\f[] flag adds an additional column showing | ||||
| the total for each row. | ||||
| @ -1884,14 +1882,31 @@ Budget\ performance\ in\ 2017/11/01\-2017/12/31: | ||||
| \f[] | ||||
| .fi | ||||
| .PP | ||||
| By default, only accounts with budget goals during the report period are | ||||
| shown. | ||||
| In the example above, transactions in \f[C]expenses:gifts\f[] and | ||||
| \f[C]expenses:supplies\f[] are counted towards \f[C]expenses\f[] budget, | ||||
| but accounts \f[C]expenses:gifts\f[] and \f[C]expenses:supplies\f[] are | ||||
| not shown, as they don\[aq]t have any budgets. | ||||
| Note this is different from a normal balance report in several ways: | ||||
| .IP \[bu] 2 | ||||
| Only accounts with budget goals during the report period are shown, by | ||||
| default. | ||||
| .IP \[bu] 2 | ||||
| In each column, in square brackets after the actual amount, budgeted | ||||
| amounts are shown, along with the percentage of budget used. | ||||
| .IP \[bu] 2 | ||||
| All parent accounts are always shown, even in flat mode. | ||||
| Eg assets, assets:bank, and expenses above. | ||||
| .IP \[bu] 2 | ||||
| Amounts always include all subaccounts, budgeted or unbudgeted, even in | ||||
| flat mode. | ||||
| .PP | ||||
| You can use \f[C]\-\-empty\f[] shows unbudgeted accounts as well: | ||||
| This means that the numbers displayed will not always add up! Eg above, | ||||
| the \f[C]expenses\f[] actual amount includes the gifts and supplies | ||||
| transactions, but the \f[C]expenses:gifts\f[] and | ||||
| \f[C]expenses:supplies\f[] accounts are not shown, as they have no | ||||
| budget amounts declared. | ||||
| .PP | ||||
| This can be confusing. | ||||
| When you need to make things clearer, use the \f[C]\-E/\-\-empty\f[] | ||||
| flag, which will reveal all accounts including unbudgeted ones, giving | ||||
| the full picture. | ||||
| Eg: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| @ -1938,9 +1953,6 @@ Budget\ performance\ in\ 2017/11/01\-2017/12/31: | ||||
| \f[] | ||||
| .fi | ||||
| .PP | ||||
| Note, the \f[C]\-S/\-\-sort\-amount\f[] flag is not yet fully supported | ||||
| with \f[C]\-\-budget\f[]. | ||||
| .PP | ||||
| For more examples, see Budgeting and Forecasting. | ||||
| .SS Nested budgets | ||||
| .PP | ||||
|  | ||||
| @ -1404,8 +1404,7 @@ period (without -E, leading and trailing columns with all zeroes are not | ||||
| shown).  Second, all accounts which existed at the report start date | ||||
| will be considered, not just the ones with activity during the report | ||||
| period (use -E to include low-activity accounts which would otherwise | ||||
| would be omitted).  With '--budget', '--empty' also shows unbudgeted | ||||
| accounts. | ||||
| would be omitted). | ||||
| 
 | ||||
|    The '-T/--row-total' flag adds an additional column showing the total | ||||
| for each row. | ||||
| @ -1497,13 +1496,29 @@ Budget performance in 2017/11/01-2017/12/31: | ||||
| ----------------------++---------------------------------------------------- | ||||
|                       ||      0 [              0]       0 [              0]  | ||||
| 
 | ||||
|    By default, only accounts with budget goals during the report period | ||||
| are shown.  In the example above, transactions in 'expenses:gifts' and | ||||
| 'expenses:supplies' are counted towards 'expenses' budget, but accounts | ||||
| 'expenses:gifts' and 'expenses:supplies' are not shown, as they don't | ||||
| have any budgets. | ||||
|    Note this is different from a normal balance report in several ways: | ||||
| 
 | ||||
|    You can use '--empty' shows unbudgeted accounts as well: | ||||
|    * Only accounts with budget goals during the report period are shown, | ||||
|      by default. | ||||
| 
 | ||||
|    * In each column, in square brackets after the actual amount, | ||||
|      budgeted amounts are shown, along with the percentage of budget | ||||
|      used. | ||||
| 
 | ||||
|    * All parent accounts are always shown, even in flat mode.  Eg | ||||
|      assets, assets:bank, and expenses above. | ||||
| 
 | ||||
|    * Amounts always include all subaccounts, budgeted or unbudgeted, | ||||
|      even in flat mode. | ||||
| 
 | ||||
|    This means that the numbers displayed will not always add up!  Eg | ||||
| above, the 'expenses' actual amount includes the gifts and supplies | ||||
| transactions, but the 'expenses:gifts' and 'expenses:supplies' accounts | ||||
| are not shown, as they have no budget amounts declared. | ||||
| 
 | ||||
|    This can be confusing.  When you need to make things clearer, use the | ||||
| '-E/--empty' flag, which will reveal all accounts including unbudgeted | ||||
| ones, giving the full picture.  Eg: | ||||
| 
 | ||||
| $ hledger balance -M --budget --empty | ||||
| Budget performance in 2017/11/01-2017/12/31: | ||||
| @ -1541,9 +1556,6 @@ Budget performance in 2017/11/01-2017/12/31: | ||||
| ----------------------++---------------------------------------------------- | ||||
|                       ||      0 [              0]       0 [              0]  | ||||
| 
 | ||||
|    Note, the '-S/--sort-amount' flag is not yet fully supported with | ||||
| '--budget'. | ||||
| 
 | ||||
|    For more examples, see Budgeting and Forecasting. | ||||
| * Menu: | ||||
| 
 | ||||
| @ -2759,86 +2771,86 @@ Node: Depth limited balance reports43924 | ||||
| Ref: #depth-limited-balance-reports44124 | ||||
| Node: Multicolumn balance report44580 | ||||
| Ref: #multicolumn-balance-report44778 | ||||
| Node: Budget report50018 | ||||
| Ref: #budget-report50161 | ||||
| Node: Nested budgets54845 | ||||
| Ref: #nested-budgets54957 | ||||
| Ref: #output-format-158437 | ||||
| Node: balancesheet58515 | ||||
| Ref: #balancesheet58651 | ||||
| Node: balancesheetequity59885 | ||||
| Ref: #balancesheetequity60034 | ||||
| Node: cashflow60595 | ||||
| Ref: #cashflow60723 | ||||
| Node: check-dates61751 | ||||
| Ref: #check-dates61878 | ||||
| Node: check-dupes62157 | ||||
| Ref: #check-dupes62281 | ||||
| Node: close62574 | ||||
| Ref: #close62682 | ||||
| Node: files66095 | ||||
| Ref: #files66196 | ||||
| Node: help66343 | ||||
| Ref: #help66443 | ||||
| Node: import67536 | ||||
| Ref: #import67650 | ||||
| Node: incomestatement68394 | ||||
| Ref: #incomestatement68528 | ||||
| Node: prices69864 | ||||
| Ref: #prices69979 | ||||
| Node: print70258 | ||||
| Ref: #print70368 | ||||
| Node: print-unique74861 | ||||
| Ref: #print-unique74987 | ||||
| Node: register75272 | ||||
| Ref: #register75399 | ||||
| Node: Custom register output79570 | ||||
| Ref: #custom-register-output79699 | ||||
| Node: register-match80961 | ||||
| Ref: #register-match81095 | ||||
| Node: rewrite81446 | ||||
| Ref: #rewrite81561 | ||||
| Node: Re-write rules in a file83410 | ||||
| Ref: #re-write-rules-in-a-file83544 | ||||
| Node: Diff output format84754 | ||||
| Ref: #diff-output-format84923 | ||||
| Node: rewrite vs print --auto86015 | ||||
| Ref: #rewrite-vs.-print---auto86194 | ||||
| Node: roi86750 | ||||
| Ref: #roi86848 | ||||
| Node: stats87860 | ||||
| Ref: #stats87959 | ||||
| Node: tags88713 | ||||
| Ref: #tags88811 | ||||
| Node: test89041 | ||||
| Ref: #test89125 | ||||
| Node: ADD-ON COMMANDS89886 | ||||
| Ref: #add-on-commands89996 | ||||
| Node: Official add-ons91283 | ||||
| Ref: #official-add-ons91423 | ||||
| Node: api91510 | ||||
| Ref: #api91599 | ||||
| Node: ui91651 | ||||
| Ref: #ui91750 | ||||
| Node: web91808 | ||||
| Ref: #web91897 | ||||
| Node: Third party add-ons91943 | ||||
| Ref: #third-party-add-ons92118 | ||||
| Node: diff92253 | ||||
| Ref: #diff92350 | ||||
| Node: iadd92449 | ||||
| Ref: #iadd92563 | ||||
| Node: interest92646 | ||||
| Ref: #interest92767 | ||||
| Node: irr92862 | ||||
| Ref: #irr92960 | ||||
| Node: Experimental add-ons93091 | ||||
| Ref: #experimental-add-ons93243 | ||||
| Node: autosync93523 | ||||
| Ref: #autosync93634 | ||||
| Node: chart93873 | ||||
| Ref: #chart93992 | ||||
| Node: check94063 | ||||
| Ref: #check94165 | ||||
| Node: Budget report49958 | ||||
| Ref: #budget-report50101 | ||||
| Node: Nested budgets55302 | ||||
| Ref: #nested-budgets55414 | ||||
| Ref: #output-format-158894 | ||||
| Node: balancesheet58972 | ||||
| Ref: #balancesheet59108 | ||||
| Node: balancesheetequity60342 | ||||
| Ref: #balancesheetequity60491 | ||||
| Node: cashflow61052 | ||||
| Ref: #cashflow61180 | ||||
| Node: check-dates62208 | ||||
| Ref: #check-dates62335 | ||||
| Node: check-dupes62614 | ||||
| Ref: #check-dupes62738 | ||||
| Node: close63031 | ||||
| Ref: #close63139 | ||||
| Node: files66552 | ||||
| Ref: #files66653 | ||||
| Node: help66800 | ||||
| Ref: #help66900 | ||||
| Node: import67993 | ||||
| Ref: #import68107 | ||||
| Node: incomestatement68851 | ||||
| Ref: #incomestatement68985 | ||||
| Node: prices70321 | ||||
| Ref: #prices70436 | ||||
| Node: print70715 | ||||
| Ref: #print70825 | ||||
| Node: print-unique75318 | ||||
| Ref: #print-unique75444 | ||||
| Node: register75729 | ||||
| Ref: #register75856 | ||||
| Node: Custom register output80027 | ||||
| Ref: #custom-register-output80156 | ||||
| Node: register-match81418 | ||||
| Ref: #register-match81552 | ||||
| Node: rewrite81903 | ||||
| Ref: #rewrite82018 | ||||
| Node: Re-write rules in a file83867 | ||||
| Ref: #re-write-rules-in-a-file84001 | ||||
| Node: Diff output format85211 | ||||
| Ref: #diff-output-format85380 | ||||
| Node: rewrite vs print --auto86472 | ||||
| Ref: #rewrite-vs.-print---auto86651 | ||||
| Node: roi87207 | ||||
| Ref: #roi87305 | ||||
| Node: stats88317 | ||||
| Ref: #stats88416 | ||||
| Node: tags89170 | ||||
| Ref: #tags89268 | ||||
| Node: test89498 | ||||
| Ref: #test89582 | ||||
| Node: ADD-ON COMMANDS90343 | ||||
| Ref: #add-on-commands90453 | ||||
| Node: Official add-ons91740 | ||||
| Ref: #official-add-ons91880 | ||||
| Node: api91967 | ||||
| Ref: #api92056 | ||||
| Node: ui92108 | ||||
| Ref: #ui92207 | ||||
| Node: web92265 | ||||
| Ref: #web92354 | ||||
| Node: Third party add-ons92400 | ||||
| Ref: #third-party-add-ons92575 | ||||
| Node: diff92710 | ||||
| Ref: #diff92807 | ||||
| Node: iadd92906 | ||||
| Ref: #iadd93020 | ||||
| Node: interest93103 | ||||
| Ref: #interest93224 | ||||
| Node: irr93319 | ||||
| Ref: #irr93417 | ||||
| Node: Experimental add-ons93548 | ||||
| Ref: #experimental-add-ons93700 | ||||
| Node: autosync93980 | ||||
| Ref: #autosync94091 | ||||
| Node: chart94330 | ||||
| Ref: #chart94449 | ||||
| Node: check94520 | ||||
| Ref: #check94622 | ||||
|  | ||||
| End Tag Table | ||||
|  | ||||
| @ -1251,13 +1251,12 @@ COMMANDS | ||||
|        not shown).  Second, all accounts which existed  at  the  report  start | ||||
|        date  will  be  considered,  not just the ones with activity during the | ||||
|        report period (use -E to include low-activity accounts which would oth- | ||||
|        erwise would be omitted).  With --budget, --empty also shows unbudgeted | ||||
|        accounts. | ||||
|        erwise would be omitted). | ||||
| 
 | ||||
|        The -T/--row-total flag adds an additional column showing the total for | ||||
|        each row. | ||||
| 
 | ||||
|        The  -A/--average  flag adds a column showing the average value in each | ||||
|        The -A/--average flag adds a column showing the average value  in  each | ||||
|        row. | ||||
| 
 | ||||
|        Here's an example of all three: | ||||
| @ -1281,20 +1280,20 @@ COMMANDS | ||||
|        Limitations: | ||||
| 
 | ||||
|        In multicolumn reports the -V/--value flag uses the market price on the | ||||
|        report  end  date,  for all columns (not the price on each column's end | ||||
|        report end date, for all columns (not the price on  each  column's  end | ||||
|        date). | ||||
| 
 | ||||
|        Eliding of boring parent accounts in tree mode, as in the classic  bal- | ||||
|        Eliding  of boring parent accounts in tree mode, as in the classic bal- | ||||
|        ance report, is not yet supported in multicolumn reports. | ||||
| 
 | ||||
|    Budget report | ||||
|        With  --budget,  extra  columns  are displayed showing budget goals for | ||||
|        each account and period, if any.  Budget goals are defined by  periodic | ||||
|        transactions.   This  is  very  useful for comparing planned and actual | ||||
|        income, expenses, time usage, etc.  --budget  is  most  often  combined | ||||
|        With --budget, extra columns are displayed  showing  budget  goals  for | ||||
|        each  account and period, if any.  Budget goals are defined by periodic | ||||
|        transactions.  This is very useful for  comparing  planned  and  actual | ||||
|        income,  expenses,  time  usage,  etc.  --budget is most often combined | ||||
|        with a report interval. | ||||
| 
 | ||||
|        For  example,  you  can  take  average  monthly  expenses in the common | ||||
|        For example, you can  take  average  monthly  expenses  in  the  common | ||||
|        expense categories to construct a minimal monthly budget: | ||||
| 
 | ||||
|               ;; Budget | ||||
| @ -1339,13 +1338,28 @@ COMMANDS | ||||
|               ----------------------++---------------------------------------------------- | ||||
|                                     ||      0 [              0]       0 [              0] | ||||
| 
 | ||||
|        By default, only accounts with budget goals during  the  report  period | ||||
|        are  shown.   In  the example above, transactions in expenses:gifts and | ||||
|        expenses:supplies are counted towards  expenses  budget,  but  accounts | ||||
|        expenses:gifts  and expenses:supplies are not shown, as they don't have | ||||
|        any budgets. | ||||
|        Note this is different from a normal balance report in several ways: | ||||
| 
 | ||||
|        You can use --empty shows unbudgeted accounts as well: | ||||
|        o Only  accounts  with budget goals during the report period are shown, | ||||
|          by default. | ||||
| 
 | ||||
|        o In each column, in square brackets after the actual amount,  budgeted | ||||
|          amounts are shown, along with the percentage of budget used. | ||||
| 
 | ||||
|        o All  parent accounts are always shown, even in flat mode.  Eg assets, | ||||
|          assets:bank, and expenses above. | ||||
| 
 | ||||
|        o Amounts always include all subaccounts, budgeted or unbudgeted,  even | ||||
|          in flat mode. | ||||
| 
 | ||||
|        This means that the numbers displayed will not always add up! Eg above, | ||||
|        the expenses actual amount includes the  gifts  and  supplies  transac- | ||||
|        tions,  but  the  expenses:gifts and expenses:supplies accounts are not | ||||
|        shown, as they have no budget amounts declared. | ||||
| 
 | ||||
|        This can be confusing.  When you need to make things clearer,  use  the | ||||
|        -E/--empty  flag,  which  will reveal all accounts including unbudgeted | ||||
|        ones, giving the full picture.  Eg: | ||||
| 
 | ||||
|               $ hledger balance -M --budget --empty | ||||
|               Budget performance in 2017/11/01-2017/12/31: | ||||
| @ -1383,18 +1397,15 @@ COMMANDS | ||||
|               ----------------------++---------------------------------------------------- | ||||
|                                     ||      0 [              0]       0 [              0] | ||||
| 
 | ||||
|        Note, the -S/--sort-amount flag is not yet fully supported with  --bud- | ||||
|        get. | ||||
| 
 | ||||
|        For more examples, see Budgeting and Forecasting. | ||||
| 
 | ||||
|    Nested budgets | ||||
|        You  can  add budgets to any account in your account hierarchy.  If you | ||||
|        You can add budgets to any account in your account hierarchy.   If  you | ||||
|        have budgets on both parent account and some of its children, then bud- | ||||
|        get(s)  of  the  child account(s) would be added to the budget of their | ||||
|        get(s) of the child account(s) would be added to the  budget  of  their | ||||
|        parent, much like account balances behave. | ||||
| 
 | ||||
|        In the most simple case this means that once you add a  budget  to  any | ||||
|        In  the  most  simple case this means that once you add a budget to any | ||||
|        account, all its parents would have budget as well. | ||||
| 
 | ||||
|        To illustrate this, consider the following budget: | ||||
| @ -1404,13 +1415,13 @@ COMMANDS | ||||
|                   expenses:personal:electronics    $100.00 | ||||
|                   liabilities | ||||
| 
 | ||||
|        With  this,  monthly  budget  for electronics is defined to be $100 and | ||||
|        budget for personal expenses is an additional  $1000,  which  implicity | ||||
|        With this, monthly budget for electronics is defined  to  be  $100  and | ||||
|        budget  for  personal  expenses is an additional $1000, which implicity | ||||
|        means that budget for both expenses:personal and expenses is $1100. | ||||
| 
 | ||||
|        Transactions  in  expenses:personal:electronics  will  be  counted both | ||||
|        towards its $100 budget and $1100 of expenses:personal ,  and  transac- | ||||
|        tions  in  any  other  subaccount of expenses:personal would be counted | ||||
|        Transactions in  expenses:personal:electronics  will  be  counted  both | ||||
|        towards  its  $100 budget and $1100 of expenses:personal , and transac- | ||||
|        tions in any other subaccount of  expenses:personal  would  be  counted | ||||
|        towards only towards the budget of expenses:personal. | ||||
| 
 | ||||
|        For example, let's consider these transactions: | ||||
| @ -1436,9 +1447,9 @@ COMMANDS | ||||
|                   expenses:personal          $30.00 | ||||
|                   liabilities | ||||
| 
 | ||||
|        As you can see, we  have  transactions  in  expenses:personal:electron- | ||||
|        ics:upgrades  and  expenses:personal:train tickets,  and  since both of | ||||
|        these accounts are without explicitly defined  budget,  these  transac- | ||||
|        As  you  can  see,  we have transactions in expenses:personal:electron- | ||||
|        ics:upgrades and expenses:personal:train tickets,  and  since  both  of | ||||
|        these  accounts  are  without explicitly defined budget, these transac- | ||||
|        tions would be counted towards budgets of expenses:personal:electronics | ||||
|        and expenses:personal accordingly: | ||||
| 
 | ||||
| @ -1454,7 +1465,7 @@ COMMANDS | ||||
|               -------------------------------++------------------------------- | ||||
|                                              ||        0 [                 0] | ||||
| 
 | ||||
|        And with --empty, we can get a better picture of budget allocation  and | ||||
|        And  with --empty, we can get a better picture of budget allocation and | ||||
|        consumption: | ||||
| 
 | ||||
|               $ hledger balance --budget -M --empty | ||||
| @ -1472,17 +1483,17 @@ COMMANDS | ||||
|                                                       ||        0 [                 0] | ||||
| 
 | ||||
|    Output format | ||||
|        The  balance  command  supports  output  destination  and output format | ||||
|        The balance command  supports  output  destination  and  output  format | ||||
|        selection. | ||||
| 
 | ||||
|    balancesheet | ||||
|        balancesheet, bs | ||||
|        This command displays a simple balance sheet, showing historical ending | ||||
|        balances  of  asset  and  liability accounts (ignoring any report begin | ||||
|        date).  It assumes that these accounts are under a top-level  asset  or | ||||
|        balances of asset and liability accounts  (ignoring  any  report  begin | ||||
|        date).   It  assumes that these accounts are under a top-level asset or | ||||
|        liability account (case insensitive, plural forms also allowed). | ||||
| 
 | ||||
|        Note  this  report shows all account balances with normal positive sign | ||||
|        Note this report shows all account balances with normal  positive  sign | ||||
|        (like conventional financial statements, unlike balance/print/register) | ||||
|        (experimental). | ||||
| 
 | ||||
| @ -1508,17 +1519,17 @@ COMMANDS | ||||
|                                  0 | ||||
| 
 | ||||
|        With a reporting interval, multiple columns will be shown, one for each | ||||
|        report period.  As with multicolumn balance reports, you can alter  the | ||||
|        report  mode  with  --change/--cumulative/--historical.   Normally bal- | ||||
|        ancesheet shows historical ending balances, which is what you need  for | ||||
|        report  period.  As with multicolumn balance reports, you can alter the | ||||
|        report mode  with  --change/--cumulative/--historical.   Normally  bal- | ||||
|        ancesheet  shows historical ending balances, which is what you need for | ||||
|        a balance sheet; note this means it ignores report begin dates. | ||||
| 
 | ||||
|        This  command also supports output destination and output format selec- | ||||
|        This command also supports output destination and output format  selec- | ||||
|        tion. | ||||
| 
 | ||||
|    balancesheetequity | ||||
|        balancesheetequity, bse | ||||
|        Just like balancesheet, but also reports Equity (which  it  assumes  is | ||||
|        Just  like  balancesheet,  but also reports Equity (which it assumes is | ||||
|        under a top-level equity account). | ||||
| 
 | ||||
|        Example: | ||||
| @ -1549,10 +1560,10 @@ COMMANDS | ||||
| 
 | ||||
|    cashflow | ||||
|        cashflow, cf | ||||
|        This  command  displays a simple cashflow statement, showing changes in | ||||
|        "cash" accounts.  It assumes that these accounts are under a  top-level | ||||
|        asset  account (case insensitive, plural forms also allowed) and do not | ||||
|        contain receivable or A/R in their name.  Note this  report  shows  all | ||||
|        This command displays a simple cashflow statement, showing  changes  in | ||||
|        "cash"  accounts.  It assumes that these accounts are under a top-level | ||||
|        asset account (case insensitive, plural forms also allowed) and do  not | ||||
|        contain  receivable  or  A/R in their name.  Note this report shows all | ||||
|        account balances with normal positive sign (like conventional financial | ||||
|        statements, unlike balance/print/register) (experimental). | ||||
| 
 | ||||
| @ -1573,77 +1584,77 @@ COMMANDS | ||||
|                                $-1 | ||||
| 
 | ||||
|        With a reporting interval, multiple columns will be shown, one for each | ||||
|        report  period.   Normally cashflow shows changes in assets per period, | ||||
|        though as with multicolumn balance reports you  can  alter  the  report | ||||
|        report period.  Normally cashflow shows changes in assets  per  period, | ||||
|        though  as  with  multicolumn  balance reports you can alter the report | ||||
|        mode with --change/--cumulative/--historical. | ||||
| 
 | ||||
|        This  command also supports output destination and output format selec- | ||||
|        This command also supports output destination and output format  selec- | ||||
|        tion. | ||||
| 
 | ||||
|    check-dates | ||||
|        check-dates | ||||
|        Check that transactions are sorted by increasing date.   With  --date2, | ||||
|        checks  secondary  dates  instead.   With  --strict, dates must also be | ||||
|        unique.  With a query, only matched transactions'  dates  are  checked. | ||||
|        Check  that  transactions are sorted by increasing date.  With --date2, | ||||
|        checks secondary dates instead.  With  --strict,  dates  must  also  be | ||||
|        unique.   With  a  query, only matched transactions' dates are checked. | ||||
|        Reads the default journal file, or another specified with -f. | ||||
| 
 | ||||
|    check-dupes | ||||
|        check-dupes | ||||
|        Reports  account names having the same leaf but different prefixes.  In | ||||
|        other words, two or  more  leaves  that  are  categorized  differently. | ||||
|        Reports account names having the same leaf but different prefixes.   In | ||||
|        other  words,  two  or  more  leaves  that are categorized differently. | ||||
|        Reads the default journal file, or another specified as an argument. | ||||
| 
 | ||||
|        An example: http://stefanorodighiero.net/software/hledger-dupes.html | ||||
| 
 | ||||
|    close | ||||
|        close, equity | ||||
|        Prints  a  "closing  balances"  transaction  and  an "opening balances" | ||||
|        Prints a "closing  balances"  transaction  and  an  "opening  balances" | ||||
|        transaction that bring account balances to and from zero, respectively. | ||||
|        Useful for bringing asset/liability balances forward into a new journal | ||||
|        file, or for closing out revenues/expenses to retained earnings at  the | ||||
|        file,  or for closing out revenues/expenses to retained earnings at the | ||||
|        end of a period. | ||||
| 
 | ||||
|        The  closing  transaction  transfers  balances  to "equity:closing bal- | ||||
|        ances".  The opening transaction transfers balances from  "equity:open- | ||||
|        ing  balances".  You can chose to print just one of the transactions by | ||||
|        The closing transaction  transfers  balances  to  "equity:closing  bal- | ||||
|        ances".   The opening transaction transfers balances from "equity:open- | ||||
|        ing balances".  You can chose to print just one of the transactions  by | ||||
|        using the --opening or --closing flag. | ||||
| 
 | ||||
|        If you split your journal files by time (eg yearly), you will typically | ||||
|        run  this command at the end of the year, and save the closing transac- | ||||
|        tion as last entry of the old file, and the opening transaction as  the | ||||
|        first  entry  of the new file.  This makes the files self contained, so | ||||
|        that correct balances are reported no matter which of them are  loaded. | ||||
|        Ie,  if you load just one file, the balances are initialised correctly; | ||||
|        or if you load several files, the  redundant  closing/opening  transac- | ||||
|        tions  cancel  each other out.  (They will show up in print or register | ||||
|        reports; you can  exclude  them  with  a  query  like  not:desc:'(open- | ||||
|        run this command at the end of the year, and save the closing  transac- | ||||
|        tion  as last entry of the old file, and the opening transaction as the | ||||
|        first entry of the new file.  This makes the files self  contained,  so | ||||
|        that  correct balances are reported no matter which of them are loaded. | ||||
|        Ie, if you load just one file, the balances are initialised  correctly; | ||||
|        or  if  you  load several files, the redundant closing/opening transac- | ||||
|        tions cancel each other out.  (They will show up in print  or  register | ||||
|        reports;  you  can  exclude  them  with  a  query like not:desc:'(open- | ||||
|        ing|closing) balances'.) | ||||
| 
 | ||||
|        If you're running a business, you might also use this command to "close | ||||
|        the books" at the end of  an  accounting  period,  transferring  income | ||||
|        statement  account  balances  to  retained  earnings.  (You may want to | ||||
|        the  books"  at  the  end  of an accounting period, transferring income | ||||
|        statement account balances to retained  earnings.   (You  may  want  to | ||||
|        change the equity account name to something like "equity:retained earn- | ||||
|        ings".) | ||||
| 
 | ||||
|        By  default,  the  closing transaction is dated yesterday, the balances | ||||
|        are calculated as of end of yesterday, and the opening  transaction  is | ||||
|        dated  today.  To close on some other date, use: hledger close -e OPEN- | ||||
|        INGDATE.  Eg, to close/open on the  2018/2019  boundary,  use  -e 2019. | ||||
|        By default, the closing transaction is dated  yesterday,  the  balances | ||||
|        are  calculated  as of end of yesterday, and the opening transaction is | ||||
|        dated today.  To close on some other date, use:  hledger close -e OPEN- | ||||
|        INGDATE.   Eg,  to  close/open  on the 2018/2019 boundary, use -e 2019. | ||||
|        You can also use -p or date:PERIOD (any starting date is ignored). | ||||
| 
 | ||||
|        Both   transactions   will   include   balance   assertions   for   the | ||||
|        closed/reopened accounts.  You probably shouldn't use status  or  real- | ||||
|        ness  filters (like -C or -R or status:) with this command, or the gen- | ||||
|        closed/reopened  accounts.   You probably shouldn't use status or real- | ||||
|        ness filters (like -C or -R or status:) with this command, or the  gen- | ||||
|        erated balance assertions will depend on these flags.  Likewise, if you | ||||
|        run  this  command  with  --auto,  the balance assertions will probably | ||||
|        run this command with --auto,  the  balance  assertions  will  probably | ||||
|        always require --auto. | ||||
| 
 | ||||
|        Examples: | ||||
| 
 | ||||
|        Carrying asset/liability balances into a new file for  2019,  all  from | ||||
|        Carrying  asset/liability  balances  into a new file for 2019, all from | ||||
|        command line: | ||||
| 
 | ||||
|        Warning:  we  use  >> here to append; be careful not to type a single > | ||||
|        Warning: we use >> here to append; be careful not to type  a  single  > | ||||
|        which would wipe your journal! | ||||
| 
 | ||||
|               $ hledger close -f 2018.journal -e 2019 assets liabilities --opening >>2019.journal | ||||
| @ -1676,20 +1687,20 @@ COMMANDS | ||||
| 
 | ||||
|    files | ||||
|        files | ||||
|        List  all  files  included in the journal.  With a REGEX argument, only | ||||
|        file names matching the regular expression (case sensitive) are  shown. | ||||
|        List all files included in the journal.  With a  REGEX  argument,  only | ||||
|        file  names matching the regular expression (case sensitive) are shown. | ||||
| 
 | ||||
|    help | ||||
|        help | ||||
|        Show any of the hledger manuals. | ||||
| 
 | ||||
|        The  help  command  displays any of the main hledger manuals, in one of | ||||
|        several ways.  Run it with no argument to list the manuals, or  provide | ||||
|        The help command displays any of the main hledger manuals,  in  one  of | ||||
|        several  ways.  Run it with no argument to list the manuals, or provide | ||||
|        a full or partial manual name to select one. | ||||
| 
 | ||||
|        hledger  manuals  are  available in several formats.  hledger help will | ||||
|        use the first of these  display  methods  that  it  finds:  info,  man, | ||||
|        $PAGER,  less,  stdout (or when non-interactive, just stdout).  You can | ||||
|        hledger manuals are available in several formats.   hledger  help  will | ||||
|        use  the  first  of  these  display  methods  that it finds: info, man, | ||||
|        $PAGER, less, stdout (or when non-interactive, just stdout).   You  can | ||||
|        force a particular viewer with the --info, --man, --pager, --cat flags. | ||||
| 
 | ||||
|        Examples: | ||||
| @ -1716,8 +1727,8 @@ COMMANDS | ||||
| 
 | ||||
|    import | ||||
|        import | ||||
|        Read  new  transactions added to each FILE since last run, and add them | ||||
|        to the main journal file.  Or with --dry-run, just print  the  transac- | ||||
|        Read new transactions added to each FILE since last run, and  add  them | ||||
|        to  the  main journal file.  Or with --dry-run, just print the transac- | ||||
|        tions that would be added. | ||||
| 
 | ||||
|        The input files are specified as arguments - no need to write -f before | ||||
| @ -1728,22 +1739,22 @@ COMMANDS | ||||
|        ing transactions are always added to the input files in increasing date | ||||
|        order, and by saving .latest.FILE state files. | ||||
| 
 | ||||
|        The  --dry-run output is in journal format, so you can filter it, eg to | ||||
|        The --dry-run output is in journal format, so you can filter it, eg  to | ||||
|        see only uncategorised transactions: | ||||
| 
 | ||||
|               $ hledger import --dry ... | hledger -f- print unknown --ignore-assertions | ||||
| 
 | ||||
|    incomestatement | ||||
|        incomestatement, is | ||||
|        This command displays a simple income statement, showing  revenues  and | ||||
|        expenses  during  a period.  It assumes that these accounts are under a | ||||
|        top-level revenue or income or expense account (case insensitive,  plu- | ||||
|        ral  forms  also allowed).  Note this report shows all account balances | ||||
|        with normal positive  sign  (like  conventional  financial  statements, | ||||
|        This  command  displays a simple income statement, showing revenues and | ||||
|        expenses during a period.  It assumes that these accounts are  under  a | ||||
|        top-level  revenue or income or expense account (case insensitive, plu- | ||||
|        ral forms also allowed).  Note this report shows all  account  balances | ||||
|        with  normal  positive  sign  (like  conventional financial statements, | ||||
|        unlike balance/print/register) (experimental). | ||||
| 
 | ||||
|        This  command displays a simple income statement.  It currently assumes | ||||
|        that you have top-level accounts named income (or revenue) and  expense | ||||
|        This command displays a simple income statement.  It currently  assumes | ||||
|        that  you have top-level accounts named income (or revenue) and expense | ||||
|        (plural forms also allowed.) | ||||
| 
 | ||||
|               $ hledger incomestatement | ||||
| @ -1768,19 +1779,19 @@ COMMANDS | ||||
|                                  0 | ||||
| 
 | ||||
|        With a reporting interval, multiple columns will be shown, one for each | ||||
|        report period.  Normally incomestatement  shows  revenues/expenses  per | ||||
|        period,  though  as  with multicolumn balance reports you can alter the | ||||
|        report  period.   Normally  incomestatement shows revenues/expenses per | ||||
|        period, though as with multicolumn balance reports you  can  alter  the | ||||
|        report mode with --change/--cumulative/--historical. | ||||
| 
 | ||||
|        This command also supports output destination and output format  selec- | ||||
|        This  command also supports output destination and output format selec- | ||||
|        tion. | ||||
| 
 | ||||
|    prices | ||||
|        prices | ||||
|        Print  market  price  directives  from the journal.  With --costs, also | ||||
|        print synthetic  market  prices  based  on  transaction  prices.   With | ||||
|        Print market price directives from the  journal.   With  --costs,  also | ||||
|        print  synthetic  market  prices  based  on  transaction  prices.  With | ||||
|        --inverted-costs,  also  print  inverse  prices  based  on  transaction | ||||
|        prices.  Prices (and postings providing prices) can be  filtered  by  a | ||||
|        prices.   Prices  (and  postings providing prices) can be filtered by a | ||||
|        query. | ||||
| 
 | ||||
|    print | ||||
| @ -1788,11 +1799,11 @@ COMMANDS | ||||
|        Show transaction journal entries, sorted by date. | ||||
| 
 | ||||
|        The print command displays full journal entries (transactions) from the | ||||
|        journal file in date order, tidily formatted.  With  --date2,  transac- | ||||
|        journal  file  in date order, tidily formatted.  With --date2, transac- | ||||
|        tions are sorted by secondary date instead. | ||||
| 
 | ||||
|        print's output is always a valid hledger journal. | ||||
|        It  preserves  all  transaction  information,  but it does not preserve | ||||
|        It preserves all transaction information,  but  it  does  not  preserve | ||||
|        directives or inter-transaction comments | ||||
| 
 | ||||
|               $ hledger print | ||||
| @ -1818,39 +1829,39 @@ COMMANDS | ||||
|                   assets:bank:checking           $-1 | ||||
| 
 | ||||
|        Normally, the journal entry's explicit or implicit amount style is pre- | ||||
|        served.   Ie when an amount is omitted in the journal, it will be omit- | ||||
|        ted in the output.  You can use the  -x/--explicit  flag  to  make  all | ||||
|        served.  Ie when an amount is omitted in the journal, it will be  omit- | ||||
|        ted  in  the  output.   You  can use the -x/--explicit flag to make all | ||||
|        amounts explicit, which can be useful for troubleshooting or for making | ||||
|        your journal more readable and robust against data entry errors.  Note, | ||||
|        -x  will  cause postings with a multi-commodity amount (these can arise | ||||
|        when a multi-commodity transaction has  an  implicit  amount)  will  be | ||||
|        split  into  multiple single-commodity postings, for valid journal out- | ||||
|        -x will cause postings with a multi-commodity amount (these  can  arise | ||||
|        when  a  multi-commodity  transaction  has  an implicit amount) will be | ||||
|        split into multiple single-commodity postings, for valid  journal  out- | ||||
|        put. | ||||
| 
 | ||||
|        With -B/--cost, amounts with transaction prices are converted  to  cost | ||||
|        With  -B/--cost,  amounts with transaction prices are converted to cost | ||||
|        using that price.  This can be used for troubleshooting. | ||||
| 
 | ||||
|        With  -m/--match and a STR argument, print will show at most one trans- | ||||
|        action: the one one whose description is most similar to  STR,  and  is | ||||
|        most  recent.  STR should contain at least two characters.  If there is | ||||
|        With -m/--match and a STR argument, print will show at most one  trans- | ||||
|        action:  the  one  one whose description is most similar to STR, and is | ||||
|        most recent.  STR should contain at least two characters.  If there  is | ||||
|        no similar-enough match, no transaction will be shown. | ||||
| 
 | ||||
|        With --new, for each FILE being read, hledger reads (and writes) a spe- | ||||
|        cial  state  file  (.latest.FILE in the same directory), containing the | ||||
|        latest transaction date(s) that were seen  last  time  FILE  was  read. | ||||
|        When  this  file  is found, only transactions with newer dates (and new | ||||
|        transactions on the latest date)  are  printed.   This  is  useful  for | ||||
|        ignoring  already-seen  entries  in import data, such as downloaded CSV | ||||
|        cial state file (.latest.FILE in the same  directory),  containing  the | ||||
|        latest  transaction  date(s)  that  were  seen last time FILE was read. | ||||
|        When this file is found, only transactions with newer  dates  (and  new | ||||
|        transactions  on  the  latest  date)  are  printed.  This is useful for | ||||
|        ignoring already-seen entries in import data, such  as  downloaded  CSV | ||||
|        files.  Eg: | ||||
| 
 | ||||
|               $ hledger -f bank1.csv print --new | ||||
|               # shows transactions added since last print --new on this file | ||||
| 
 | ||||
|        This assumes that transactions  added  to  FILE  always  have  same  or | ||||
|        increasing  dates,  and  that  transactions  on the same day do not get | ||||
|        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  selec- | ||||
|        This  command also supports output destination and output format selec- | ||||
|        tion.  Here's an example of print's CSV output: | ||||
| 
 | ||||
|               $ hledger print -Ocsv | ||||
| @ -1867,20 +1878,20 @@ COMMANDS | ||||
|               "5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","","" | ||||
|               "5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","","" | ||||
| 
 | ||||
|        o There  is  one  CSV record per posting, with the parent transaction's | ||||
|        o There is one CSV record per posting, with  the  parent  transaction's | ||||
|          fields repeated. | ||||
| 
 | ||||
|        o The "txnidx" (transaction index) field shows which postings belong to | ||||
|          the  same transaction.  (This number might change if transactions are | ||||
|          reordered within the file, files are parsed/included in  a  different | ||||
|          the same transaction.  (This number might change if transactions  are | ||||
|          reordered  within  the file, files are parsed/included in a different | ||||
|          order, etc.) | ||||
| 
 | ||||
|        o The  amount  is  separated into "commodity" (the symbol) and "amount" | ||||
|        o The amount is separated into "commodity" (the  symbol)  and  "amount" | ||||
|          (numeric quantity) fields. | ||||
| 
 | ||||
|        o The numeric amount is repeated in either the "credit" or "debit" col- | ||||
|          umn,  for convenience.  (Those names are not accurate in the account- | ||||
|          ing sense; it just puts negative amounts under  credit  and  zero  or | ||||
|          umn, for convenience.  (Those names are not accurate in the  account- | ||||
|          ing  sense;  it  just  puts negative amounts under credit and zero or | ||||
|          greater amounts under debit.) | ||||
| 
 | ||||
|    print-unique | ||||
| @ -1904,7 +1915,7 @@ COMMANDS | ||||
|        Show postings and their running total. | ||||
| 
 | ||||
|        The register command displays postings in date order, one per line, and | ||||
|        their running total.  This is typically used with a query  selecting  a | ||||
|        their  running  total.  This is typically used with a query selecting a | ||||
|        particular account, to see that account's activity: | ||||
| 
 | ||||
|               $ hledger register checking | ||||
| @ -1915,8 +1926,8 @@ COMMANDS | ||||
| 
 | ||||
|        With --date2, it shows and sorts by secondary date instead. | ||||
| 
 | ||||
|        The  --historical/-H  flag  adds the balance from any undisplayed prior | ||||
|        postings to the running total.  This is useful when  you  want  to  see | ||||
|        The --historical/-H flag adds the balance from  any  undisplayed  prior | ||||
|        postings  to  the  running  total.  This is useful when you want to see | ||||
|        only recent activity, with a historically accurate running balance: | ||||
| 
 | ||||
|               $ hledger register checking -b 2008/6 --historical | ||||
| @ -1926,30 +1937,30 @@ COMMANDS | ||||
| 
 | ||||
|        The --depth option limits the amount of sub-account detail displayed. | ||||
| 
 | ||||
|        The  --average/-A flag shows the running average posting amount instead | ||||
|        The --average/-A flag shows the running average posting amount  instead | ||||
|        of the running total (so, the final number displayed is the average for | ||||
|        the  whole  report period).  This flag implies --empty (see below).  It | ||||
|        is affected by --historical.  It  works  best  when  showing  just  one | ||||
|        the whole report period).  This flag implies --empty (see  below).   It | ||||
|        is  affected  by  --historical.   It  works  best when showing just one | ||||
|        account and one commodity. | ||||
| 
 | ||||
|        The  --related/-r  flag shows the other postings in the transactions of | ||||
|        The --related/-r flag shows the other postings in the  transactions  of | ||||
|        the postings which would normally be shown. | ||||
| 
 | ||||
|        The --invert flag negates all amounts.  For example, it can be used  on | ||||
|        The  --invert flag negates all amounts.  For example, it can be used on | ||||
|        an income account where amounts are normally displayed as negative num- | ||||
|        bers.  It's also useful  to  show  postings  on  the  checking  account | ||||
|        bers.   It's  also  useful  to  show  postings  on the checking account | ||||
|        together with the related account: | ||||
| 
 | ||||
|               $ hledger register --related --invert assets:checking | ||||
| 
 | ||||
|        With  a  reporting  interval,  register shows summary postings, one per | ||||
|        With a reporting interval, register shows  summary  postings,  one  per | ||||
|        interval, aggregating the postings to each account: | ||||
| 
 | ||||
|               $ hledger register --monthly income | ||||
|               2008/01                 income:salary                          $-1          $-1 | ||||
|               2008/06                 income:gifts                           $-1          $-2 | ||||
| 
 | ||||
|        Periods with no activity, and summary postings with a zero amount,  are | ||||
|        Periods  with no activity, and summary postings with a zero amount, are | ||||
|        not shown by default; use the --empty/-E flag to see them: | ||||
| 
 | ||||
|               $ hledger register --monthly income -E | ||||
| @ -1966,7 +1977,7 @@ COMMANDS | ||||
|               2008/11                                                          0          $-2 | ||||
|               2008/12                                                          0          $-2 | ||||
| 
 | ||||
|        Often,  you'll  want  to  see  just one line per interval.  The --depth | ||||
|        Often, you'll want to see just one  line  per  interval.   The  --depth | ||||
|        option helps with this, causing subaccounts to be aggregated: | ||||
| 
 | ||||
|               $ hledger register --monthly assets --depth 1h | ||||
| @ -1974,19 +1985,19 @@ COMMANDS | ||||
|               2008/06                 assets                                 $-1            0 | ||||
|               2008/12                 assets                                 $-1          $-1 | ||||
| 
 | ||||
|        Note when using report intervals, if you specify start/end dates  these | ||||
|        will  be  adjusted  outward  if  necessary to contain a whole number of | ||||
|        intervals.  This ensures that the first and  last  intervals  are  full | ||||
|        Note  when using report intervals, if you specify start/end dates these | ||||
|        will be adjusted outward if necessary to  contain  a  whole  number  of | ||||
|        intervals.   This  ensures  that  the first and last intervals are full | ||||
|        length and comparable to the others in the report. | ||||
| 
 | ||||
|    Custom register output | ||||
|        register  uses  the  full terminal width by default, except on windows. | ||||
|        You can override this by setting the COLUMNS environment variable  (not | ||||
|        register uses the full terminal width by default,  except  on  windows. | ||||
|        You  can override this by setting the COLUMNS environment variable (not | ||||
|        a bash shell variable) or by using the --width/-w option. | ||||
| 
 | ||||
|        The  description  and  account columns normally share the space equally | ||||
|        (about half of (width - 40) each).  You can adjust  this  by  adding  a | ||||
|        description  width  as  part  of  --width's  argument, comma-separated: | ||||
|        The description and account columns normally share  the  space  equally | ||||
|        (about  half  of  (width  - 40) each).  You can adjust this by adding a | ||||
|        description width  as  part  of  --width's  argument,  comma-separated: | ||||
|        --width W,D .  Here's a diagram (won't display correctly in --help): | ||||
| 
 | ||||
|               <--------------------------------- width (W) ----------------------------------> | ||||
| @ -2002,27 +2013,27 @@ COMMANDS | ||||
|               $ 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  selec- | ||||
|        This  command also supports output destination and output format selec- | ||||
|        tion. | ||||
| 
 | ||||
|    register-match | ||||
|        register-match | ||||
|        Print the one posting whose transaction description is closest to DESC, | ||||
|        in the style of the register command.  If there  are  multiple  equally | ||||
|        good  matches,  it  shows the most recent.  Query options (options, not | ||||
|        arguments)  can  be  used  to  restrict  the   search   space.    Helps | ||||
|        in  the  style  of the register command.  If there are multiple equally | ||||
|        good matches, it shows the most recent.  Query  options  (options,  not | ||||
|        arguments)   can   be   used  to  restrict  the  search  space.   Helps | ||||
|        ledger-autosync detect already-seen transactions when importing. | ||||
| 
 | ||||
|    rewrite | ||||
|        rewrite | ||||
|        Print all transactions, rewriting the postings of matched transactions. | ||||
|        For now the only rewrite available is adding new postings,  like  print | ||||
|        For  now  the only rewrite available is adding new postings, like print | ||||
|        --auto. | ||||
| 
 | ||||
|        This is a start at a generic rewriter of transaction entries.  It reads | ||||
|        the default journal and prints the transactions, like print,  but  adds | ||||
|        the  default  journal and prints the transactions, like print, but adds | ||||
|        one or more specified postings to any transactions matching QUERY.  The | ||||
|        posting amounts can be fixed, or a multiplier of the existing  transac- | ||||
|        posting  amounts can be fixed, or a multiplier of the existing transac- | ||||
|        tion's first posting amount. | ||||
| 
 | ||||
|        Examples: | ||||
| @ -2038,7 +2049,7 @@ COMMANDS | ||||
|                 (reserve:grocery)  *0.25  ; reserve 25% for grocery | ||||
|                 (reserve:)  *0.25  ; reserve 25% for grocery | ||||
| 
 | ||||
|        Note  the  single  quotes to protect the dollar sign from bash, and the | ||||
|        Note the single quotes to protect the dollar sign from  bash,  and  the | ||||
|        two spaces between account and amount. | ||||
| 
 | ||||
|        More: | ||||
| @ -2048,16 +2059,16 @@ COMMANDS | ||||
|               $ hledger rewrite -- expenses:gifts --add-posting '(budget:gifts)  *-1"' | ||||
|               $ hledger rewrite -- ^income        --add-posting '(budget:foreign currency)  *0.25 JPY; diversify' | ||||
| 
 | ||||
|        Argument for --add-posting option is a  usual  posting  of  transaction | ||||
|        with  an  exception  for amount specification.  More precisely, you can | ||||
|        Argument  for  --add-posting  option  is a usual posting of transaction | ||||
|        with an exception for amount specification.  More  precisely,  you  can | ||||
|        use '*' (star symbol) before the amount to indicate that that this is a | ||||
|        factor  for  an  amount  of  original  matched  posting.  If the amount | ||||
|        includes a commodity name, the new posting amount will be  in  the  new | ||||
|        commodity;  otherwise,  it will be in the matched posting amount's com- | ||||
|        factor for an amount  of  original  matched  posting.   If  the  amount | ||||
|        includes  a  commodity  name, the new posting amount will be in the new | ||||
|        commodity; otherwise, it will be in the matched posting  amount's  com- | ||||
|        modity. | ||||
| 
 | ||||
|    Re-write rules in a file | ||||
|        During the run this tool will execute  so  called  "Automated  Transac- | ||||
|        During  the  run  this  tool will execute so called "Automated Transac- | ||||
|        tions" found in any journal it process.  I.e instead of specifying this | ||||
|        operations in command line you can put them in a journal file. | ||||
| 
 | ||||
| @ -2072,7 +2083,7 @@ COMMANDS | ||||
|                   budget:gifts  *-1 | ||||
|                   assets:budget  *1 | ||||
| 
 | ||||
|        Note that '=' (equality symbol) that is used instead of date in  trans- | ||||
|        Note  that '=' (equality symbol) that is used instead of date in trans- | ||||
|        actions you usually write.  It indicates the query by which you want to | ||||
|        match the posting to add new ones. | ||||
| 
 | ||||
| @ -2085,12 +2096,12 @@ COMMANDS | ||||
|                                                               --add-posting 'assets:budget  *1'       \ | ||||
|                 > rewritten-tidy-output.journal | ||||
| 
 | ||||
|        It is important to understand that relative order of  such  entries  in | ||||
|        journal  is important.  You can re-use result of previously added post- | ||||
|        It  is  important  to understand that relative order of such entries in | ||||
|        journal is important.  You can re-use result of previously added  post- | ||||
|        ings. | ||||
| 
 | ||||
|    Diff output format | ||||
|        To use this tool for batch modification of your journal files  you  may | ||||
|        To  use  this tool for batch modification of your journal files you may | ||||
|        find useful output in form of unified diff. | ||||
| 
 | ||||
|               $ hledger rewrite -- --diff -f examples/sample.journal '^income' --add-posting '(liabilities:tax)  *.33' | ||||
| @ -2114,10 +2125,10 @@ COMMANDS | ||||
| 
 | ||||
|        If you'll pass this through patch tool you'll get transactions contain- | ||||
|        ing the posting that matches your query be updated.  Note that multiple | ||||
|        files  might  be  update according to list of input files specified via | ||||
|        files might be update according to list of input  files  specified  via | ||||
|        --file options and include directives inside of these files. | ||||
| 
 | ||||
|        Be careful.  Whole transaction being re-formatted in a style of  output | ||||
|        Be  careful.  Whole transaction being re-formatted in a style of output | ||||
|        from hledger print. | ||||
| 
 | ||||
|        See also: | ||||
| @ -2125,48 +2136,48 @@ COMMANDS | ||||
|        https://github.com/simonmichael/hledger/issues/99 | ||||
| 
 | ||||
|    rewrite vs. print --auto | ||||
|        This  command  predates  print --auto, and currently does much the same | ||||
|        This command predates print --auto, and currently does  much  the  same | ||||
|        thing, but with these differences: | ||||
| 
 | ||||
|        o with multiple files, rewrite lets rules in any file affect all  other | ||||
|          files.   print  --auto  uses standard directive scoping; rules affect | ||||
|        o with  multiple files, rewrite lets rules in any file affect all other | ||||
|          files.  print --auto uses standard directive  scoping;  rules  affect | ||||
|          only child files. | ||||
| 
 | ||||
|        o rewrite's query limits which transactions can be rewritten;  all  are | ||||
|        o rewrite's  query  limits which transactions can be rewritten; all are | ||||
|          printed.  print --auto's query limits which transactions are printed. | ||||
| 
 | ||||
|        o rewrite applies rules specified on command line or  in  the  journal. | ||||
|        o rewrite  applies  rules  specified on command line or in the journal. | ||||
|          print --auto applies rules specified in the journal. | ||||
| 
 | ||||
|    roi | ||||
|        roi | ||||
|        Shows  the  time-weighted (TWR) and money-weighted (IRR) rate of return | ||||
|        Shows the time-weighted (TWR) and money-weighted (IRR) rate  of  return | ||||
|        on your investments. | ||||
| 
 | ||||
|        This command assumes that you have account(s)  that  hold  nothing  but | ||||
|        This  command  assumes  that  you have account(s) that hold nothing but | ||||
|        your investments and whenever you record current appraisal/valuation of | ||||
|        these investments you offset unrealized profit and loss into account(s) | ||||
|        that, again, hold nothing but unrealized profit and loss. | ||||
| 
 | ||||
|        Any  transactions  affecting  balance  of investment account(s) and not | ||||
|        originating from unrealized profit and loss account(s) are  assumed  to | ||||
|        Any transactions affecting balance of  investment  account(s)  and  not | ||||
|        originating  from  unrealized profit and loss account(s) are assumed to | ||||
|        be your investments or withdrawals. | ||||
| 
 | ||||
|        At  a  minimum,  you  need  to  supply  a query (which could be just an | ||||
|        account name) to select your investments with --inv, and another  query | ||||
|        At a minimum, you need to supply  a  query  (which  could  be  just  an | ||||
|        account  name) to select your investments with --inv, and another query | ||||
|        to identify your profit and loss transactions with --pnl. | ||||
| 
 | ||||
|        It  will  compute and display the internalized rate of return (IRR) and | ||||
|        time-weighted rate of return (TWR) for your investments  for  the  time | ||||
|        period  requested.  Both rates of return are annualized before display, | ||||
|        It will compute and display the internalized rate of return  (IRR)  and | ||||
|        time-weighted  rate  of  return (TWR) for your investments for the time | ||||
|        period requested.  Both rates of return are annualized before  display, | ||||
|        regardless of the length of reporting interval. | ||||
| 
 | ||||
|    stats | ||||
|        stats | ||||
|        Show some journal statistics. | ||||
| 
 | ||||
|        The stats command displays summary information for the  whole  journal, | ||||
|        or  a matched part of it.  With a reporting interval, it shows a report | ||||
|        The  stats  command displays summary information for the whole journal, | ||||
|        or a matched part of it.  With a reporting interval, it shows a  report | ||||
|        for each report period. | ||||
| 
 | ||||
|        Example: | ||||
| @ -2183,60 +2194,60 @@ COMMANDS | ||||
|               Accounts                 : 8 (depth 3) | ||||
|               Commodities              : 1 ($) | ||||
| 
 | ||||
|        This command also supports output destination and output format  selec- | ||||
|        This  command also supports output destination and output format selec- | ||||
|        tion. | ||||
| 
 | ||||
|    tags | ||||
|        tags | ||||
|        List  all the tag names used in the journal.  With a TAGREGEX argument, | ||||
|        only tag names matching the regular expression (case  insensitive)  are | ||||
|        shown.   With QUERY arguments, only transactions matching the query are | ||||
|        List all the tag names used in the journal.  With a TAGREGEX  argument, | ||||
|        only  tag  names matching the regular expression (case insensitive) are | ||||
|        shown.  With QUERY arguments, only transactions matching the query  are | ||||
|        considered. | ||||
| 
 | ||||
|    test | ||||
|        test | ||||
|        Run built-in unit tests. | ||||
| 
 | ||||
|        This command runs the unit tests built in to hledger-lib  and  hledger, | ||||
|        This  command  runs the unit tests built in to hledger-lib and hledger, | ||||
|        printing test names and results on stdout.  If any test fails, the exit | ||||
|        code will be non-zero. | ||||
| 
 | ||||
|        Test names include a group prefix.  If a (exact, case sensitive)  group | ||||
|        prefix,  or  a  full  test name is provided as the first argument, only | ||||
|        Test  names include a group prefix.  If a (exact, case sensitive) group | ||||
|        prefix, or a full test name is provided as  the  first  argument,  only | ||||
|        that group or test is run. | ||||
| 
 | ||||
|        If a numeric second argument is provided, it will  set  the  randomness | ||||
|        seed,  for  repeatable  results  from tests using randomness (currently | ||||
|        If  a  numeric  second argument is provided, it will set the randomness | ||||
|        seed, for repeatable results from  tests  using  randomness  (currently | ||||
|        none of them). | ||||
| 
 | ||||
|        This is mainly used by developers, but it's nice to  be  able  to  san- | ||||
|        This  is  mainly  used  by developers, but it's nice to be able to san- | ||||
|        ity-check your installed hledger executable at any time.  All tests are | ||||
|        expected to pass - if you ever see otherwise, something has gone wrong, | ||||
|        please report a bug! | ||||
| 
 | ||||
| ADD-ON COMMANDS | ||||
|        hledger  also  searches  for external add-on commands, and will include | ||||
|        hledger also searches for external add-on commands,  and  will  include | ||||
|        these in the commands list.  These are programs or scripts in your PATH | ||||
|        whose  name starts with hledger- and ends with a recognised file exten- | ||||
|        whose name starts with hledger- and ends with a recognised file  exten- | ||||
|        sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh). | ||||
| 
 | ||||
|        Add-ons can be invoked like any hledger command, but there  are  a  few | ||||
|        Add-ons  can  be  invoked like any hledger command, but there are a few | ||||
|        things to be aware of.  Eg if the hledger-web add-on is installed, | ||||
| 
 | ||||
|        o hledger -h web  shows  hledger's  help,  while  hledger web -h  shows | ||||
|          hledger-web's help. | ||||
| 
 | ||||
|        o Flags specific to the add-on must have a preceding --  to  hide  them | ||||
|          from  hledger.   So hledger web --serve --port 9000 will be rejected; | ||||
|        o Flags  specific  to  the add-on must have a preceding -- to hide them | ||||
|          from hledger.  So hledger web --serve --port 9000 will  be  rejected; | ||||
|          you must use hledger web -- --serve --port 9000. | ||||
| 
 | ||||
|        o You   can    always    run    add-ons    directly    if    preferred: | ||||
|        o You    can    always    run    add-ons    directly    if   preferred: | ||||
|          hledger-web --serve --port 9000. | ||||
| 
 | ||||
|        Add-ons  are  a relatively easy way to add local features or experiment | ||||
|        with new ideas.  They can be  written  in  any  language,  but  haskell | ||||
|        scripts  have  a  big  advantage:  they  can  use the same hledger (and | ||||
|        haskell) library functions that built-in commands do, for  command-line | ||||
|        Add-ons are a relatively easy way to add local features  or  experiment | ||||
|        with  new  ideas.   They  can  be  written in any language, but haskell | ||||
|        scripts have a big advantage:  they  can  use  the  same  hledger  (and | ||||
|        haskell)  library functions that built-in commands do, for command-line | ||||
|        options, journal parsing, reporting, etc. | ||||
| 
 | ||||
|        Here are some hledger add-ons available: | ||||
| @ -2254,7 +2265,7 @@ ADD-ON COMMANDS | ||||
|        hledger-web provides a simple web interface. | ||||
| 
 | ||||
|    Third party add-ons | ||||
|        These  are  maintained  separately, and usually updated shortly after a | ||||
|        These are maintained separately, and usually updated  shortly  after  a | ||||
|        hledger release. | ||||
| 
 | ||||
|    diff | ||||
| @ -2262,7 +2273,7 @@ ADD-ON COMMANDS | ||||
|        journal file and another. | ||||
| 
 | ||||
|    iadd | ||||
|        hledger-iadd  is  a  curses-style, more interactive replacement for the | ||||
|        hledger-iadd is a curses-style, more interactive  replacement  for  the | ||||
|        add command. | ||||
| 
 | ||||
|    interest | ||||
| @ -2270,19 +2281,19 @@ ADD-ON COMMANDS | ||||
|        ing to various schemes. | ||||
| 
 | ||||
|    irr | ||||
|        hledger-irr  calculates  the  internal  rate of return of an investment | ||||
|        hledger-irr calculates the internal rate of  return  of  an  investment | ||||
|        account, but it's superseded now by the built-in roi command. | ||||
| 
 | ||||
|    Experimental add-ons | ||||
|        These are available in source form in the hledger  repo's  bin/  direc- | ||||
|        These  are  available  in source form in the hledger repo's bin/ direc- | ||||
|        tory; installing them is pretty easy.  They may be less mature and doc- | ||||
|        umented than built-in commands.  Reading and tweaking these is  a  good | ||||
|        umented  than  built-in commands.  Reading and tweaking these is a good | ||||
|        way to start making your own! | ||||
| 
 | ||||
|    autosync | ||||
|        hledger-autosync is a symbolic link for easily running ledger-autosync, | ||||
|        if installed.  ledger-autosync does  deduplicating  conversion  of  OFX | ||||
|        data  and some CSV formats, and can also download the data if your bank | ||||
|        if  installed.   ledger-autosync  does  deduplicating conversion of OFX | ||||
|        data and some CSV formats, and can also download the data if your  bank | ||||
|        offers OFX Direct Connect. | ||||
| 
 | ||||
|    chart | ||||
| @ -2292,21 +2303,21 @@ ADD-ON COMMANDS | ||||
|        hledger-check.hs checks more powerful account balance assertions. | ||||
| 
 | ||||
| ENVIRONMENT | ||||
|        COLUMNS The screen width used by the register  command.   Default:  the | ||||
|        COLUMNS  The  screen  width used by the register command.  Default: the | ||||
|        full terminal width. | ||||
| 
 | ||||
|        LEDGER_FILE The journal file path when not specified with -f.  Default: | ||||
|        ~/.hledger.journal (on  windows,  perhaps  C:/Users/USER/.hledger.jour- | ||||
|        ~/.hledger.journal  (on  windows,  perhaps C:/Users/USER/.hledger.jour- | ||||
|        nal). | ||||
| 
 | ||||
| FILES | ||||
|        Reads  data from one or more files in hledger journal, timeclock, time- | ||||
|        dot,  or  CSV  format  specified   with   -f,   or   $LEDGER_FILE,   or | ||||
|        $HOME/.hledger.journal           (on          windows,          perhaps | ||||
|        Reads data from one or more files in hledger journal, timeclock,  time- | ||||
|        dot,   or   CSV   format   specified   with  -f,  or  $LEDGER_FILE,  or | ||||
|        $HOME/.hledger.journal          (on          windows,           perhaps | ||||
|        C:/Users/USER/.hledger.journal). | ||||
| 
 | ||||
| BUGS | ||||
|        The need to precede addon command options with  --  when  invoked  from | ||||
|        The  need  to  precede  addon command options with -- when invoked from | ||||
|        hledger is awkward. | ||||
| 
 | ||||
|        When input data contains non-ascii characters, a suitable system locale | ||||
| @ -2319,33 +2330,33 @@ BUGS | ||||
|        In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger | ||||
|        add. | ||||
| 
 | ||||
|        Not  all of Ledger's journal file syntax is supported.  See file format | ||||
|        Not all of Ledger's journal file syntax is supported.  See file  format | ||||
|        differences. | ||||
| 
 | ||||
|        On large data files, hledger  is  slower  and  uses  more  memory  than | ||||
|        On  large  data  files,  hledger  is  slower  and uses more memory than | ||||
|        Ledger. | ||||
| 
 | ||||
| TROUBLESHOOTING | ||||
|        Here  are  some  issues  you  might encounter when you run hledger (and | ||||
|        remember you can also seek help from the IRC channel, mail list or  bug | ||||
|        Here are some issues you might encounter  when  you  run  hledger  (and | ||||
|        remember  you can also seek help from the IRC channel, mail list or bug | ||||
|        tracker): | ||||
| 
 | ||||
|        Successfully installed, but "No command 'hledger' found" | ||||
|        stack and cabal install binaries into a special directory, which should | ||||
|        be added to your PATH environment variable.  Eg on  unix-like  systems, | ||||
|        be  added  to your PATH environment variable.  Eg on unix-like systems, | ||||
|        that is ~/.local/bin and ~/.cabal/bin respectively. | ||||
| 
 | ||||
|        I set a custom LEDGER_FILE, but hledger is still using the default file | ||||
|        LEDGER_FILE should be a real environment variable,  not  just  a  shell | ||||
|        variable.   The command env | grep LEDGER_FILE should show it.  You may | ||||
|        LEDGER_FILE  should  be  a  real environment variable, not just a shell | ||||
|        variable.  The command env | grep LEDGER_FILE should show it.  You  may | ||||
|        need to use export.  Here's an explanation. | ||||
| 
 | ||||
|        "Illegal byte sequence" or "Invalid or  incomplete  multibyte  or  wide | ||||
|        "Illegal  byte  sequence"  or  "Invalid or incomplete multibyte or wide | ||||
|        character" errors | ||||
|        In order to handle non-ascii letters and symbols (like ), hledger needs | ||||
|        an appropriate locale.  This is usually configured system-wide; you can | ||||
|        also configure it temporarily.  The locale may need to be one that sup- | ||||
|        ports UTF-8, if you built hledger with GHC < 7.2 (or  possibly  always, | ||||
|        ports  UTF-8,  if you built hledger with GHC < 7.2 (or possibly always, | ||||
|        I'm not sure yet). | ||||
| 
 | ||||
|        Here's  an  example  of  setting  the  locale  temporarily,  on  ubuntu | ||||
| @ -2364,7 +2375,7 @@ TROUBLESHOOTING | ||||
|               $ echo "export LANG=en_US.UTF-8" >>~/.bash_profile | ||||
|               $ bash --login | ||||
| 
 | ||||
|        If we preferred to use eg fr_FR.utf8, we might  have  to  install  that | ||||
|        If  we  preferred  to  use eg fr_FR.utf8, we might have to install that | ||||
|        first: | ||||
| 
 | ||||
|               $ apt-get install language-pack-fr | ||||
| @ -2385,7 +2396,7 @@ TROUBLESHOOTING | ||||
| 
 | ||||
| 
 | ||||
| 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) | ||||
| 
 | ||||
| 
 | ||||
| @ -2399,7 +2410,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) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user