act: integrate CLI help & manual
This commit is contained in:
		
							parent
							
								
									f68309b106
								
							
						
					
					
						commit
						53620d0df2
					
				| @ -1,3 +1,5 @@ | |||||||
|  | {-# LANGUAGE TemplateHaskell #-} | ||||||
|  | 
 | ||||||
| {-| | {-| | ||||||
| 
 | 
 | ||||||
| Print a bar chart of posting activity per day, or other report interval.  | Print a bar chart of posting activity per day, or other report interval.  | ||||||
| @ -10,7 +12,6 @@ where | |||||||
| import Data.List | import Data.List | ||||||
| import Data.Maybe | import Data.Maybe | ||||||
| import Data.Ord | import Data.Ord | ||||||
| import System.Console.CmdArgs.Explicit |  | ||||||
| import Text.Printf | import Text.Printf | ||||||
| 
 | 
 | ||||||
| import Hledger | import Hledger | ||||||
| @ -18,17 +19,12 @@ import Hledger.Cli.CliOptions | |||||||
| import Prelude hiding (putStr) | import Prelude hiding (putStr) | ||||||
| import Hledger.Utils.UTF8IOCompat (putStr) | import Hledger.Utils.UTF8IOCompat (putStr) | ||||||
| 
 | 
 | ||||||
| activitymode :: Mode RawOpts | activitymode = hledgerCommandMode | ||||||
| activitymode = (defCommandMode $ ["activity"] ++ aliases) { |   $(hereFileRelative "Hledger/Cli/Commands/Activity.md") | ||||||
|   modeHelp = "show an ascii barchart of posting counts per interval (default: daily)" `withAliases` aliases |   [] | ||||||
|  ,modeHelpSuffix = [] |   [generalflagsgroup1] | ||||||
|  ,modeGroupFlags = Group { |   [] | ||||||
|      groupUnnamed = [] |   ([], Just $ argsFlag "[QUERY]") | ||||||
|     ,groupHidden = [] |  | ||||||
|     ,groupNamed = [generalflagsgroup1] |  | ||||||
|     } |  | ||||||
|  } |  | ||||||
|   where aliases = [] |  | ||||||
| 
 | 
 | ||||||
| barchar :: Char | barchar :: Char | ||||||
| barchar = '*' | barchar = '*' | ||||||
|  | |||||||
							
								
								
									
										17
									
								
								hledger/Hledger/Cli/Commands/Activity.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								hledger/Hledger/Cli/Commands/Activity.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | activity\ | ||||||
|  | Show an ascii barchart of posting counts per interval. | ||||||
|  | 
 | ||||||
|  | _FLAGS_ | ||||||
|  | 
 | ||||||
|  | The activity command displays an ascii histogram showing transaction | ||||||
|  | counts by day, week, month or other reporting interval (by day is the | ||||||
|  | default). With query arguments, it counts only matched transactions. | ||||||
|  | 
 | ||||||
|  | Examples: | ||||||
|  | ```shell | ||||||
|  | $ hledger activity --quarterly | ||||||
|  | 2008-01-01 ** | ||||||
|  | 2008-04-01 ******* | ||||||
|  | 2008-07-01  | ||||||
|  | 2008-10-01 ** | ||||||
|  | ``` | ||||||
| @ -1385,12 +1385,18 @@ liabilities:debts | |||||||
| .fi | .fi | ||||||
| .SS activity | .SS activity | ||||||
| .PP | .PP | ||||||
|  | activity | ||||||
|  | .PD 0 | ||||||
|  | .P | ||||||
|  | .PD | ||||||
| Show an ascii barchart of posting counts per interval. | Show an ascii barchart of posting counts per interval. | ||||||
| .PP | .PP | ||||||
| The activity command displays an ascii histogram showing transaction | The activity command displays an ascii histogram showing transaction | ||||||
| counts by day, week, month or other reporting interval (by day is the | counts by day, week, month or other reporting interval (by day is the | ||||||
| default). | default). | ||||||
| With query arguments, it counts only matched transactions. | With query arguments, it counts only matched transactions. | ||||||
|  | .PP | ||||||
|  | Examples: | ||||||
| .IP | .IP | ||||||
| .nf | .nf | ||||||
| \f[C] | \f[C] | ||||||
|  | |||||||
| @ -1050,12 +1050,15 @@ File: hledger.info,  Node: activity,  Next: add,  Prev: accounts,  Up: COMMANDS | |||||||
| 4.2 activity | 4.2 activity | ||||||
| ============ | ============ | ||||||
| 
 | 
 | ||||||
|  | activity | ||||||
| Show an ascii barchart of posting counts per interval. | Show an ascii barchart of posting counts per interval. | ||||||
| 
 | 
 | ||||||
|    The activity command displays an ascii histogram showing transaction |    The activity command displays an ascii histogram showing transaction | ||||||
| counts by day, week, month or other reporting interval (by day is the | counts by day, week, month or other reporting interval (by day is the | ||||||
| default).  With query arguments, it counts only matched transactions. | default).  With query arguments, it counts only matched transactions. | ||||||
| 
 | 
 | ||||||
|  |    Examples: | ||||||
|  | 
 | ||||||
| $ hledger activity --quarterly | $ hledger activity --quarterly | ||||||
| 2008-01-01 ** | 2008-01-01 ** | ||||||
| 2008-04-01 ******* | 2008-04-01 ******* | ||||||
| @ -2763,96 +2766,96 @@ Node: accounts33651 | |||||||
| Ref: #accounts33749 | Ref: #accounts33749 | ||||||
| Node: activity34448 | Node: activity34448 | ||||||
| Ref: #activity34558 | Ref: #activity34558 | ||||||
| Node: add34918 | Node: add34941 | ||||||
| Ref: #add35017 | Ref: #add35040 | ||||||
| Node: balance37678 | Node: balance37701 | ||||||
| Ref: #balance37789 | Ref: #balance37812 | ||||||
| Node: Classic balance report40909 | Node: Classic balance report40932 | ||||||
| Ref: #classic-balance-report41082 | Ref: #classic-balance-report41105 | ||||||
| Node: Customising the classic balance report42451 | Node: Customising the classic balance report42474 | ||||||
| Ref: #customising-the-classic-balance-report42679 | Ref: #customising-the-classic-balance-report42702 | ||||||
| Node: Colour support44753 | Node: Colour support44776 | ||||||
| Ref: #colour-support44920 | Ref: #colour-support44943 | ||||||
| Node: Flat mode45093 | Node: Flat mode45116 | ||||||
| Ref: #flat-mode45241 | Ref: #flat-mode45264 | ||||||
| Node: Depth limited balance reports45654 | Node: Depth limited balance reports45677 | ||||||
| Ref: #depth-limited-balance-reports45854 | Ref: #depth-limited-balance-reports45877 | ||||||
| Node: Multicolumn balance report46310 | Node: Multicolumn balance report46333 | ||||||
| Ref: #multicolumn-balance-report46508 | Ref: #multicolumn-balance-report46531 | ||||||
| Node: Budget report51748 | Node: Budget report51771 | ||||||
| Ref: #budget-report51891 | Ref: #budget-report51914 | ||||||
| Node: Nested budgets56575 | Node: Nested budgets56598 | ||||||
| Ref: #nested-budgets56687 | Ref: #nested-budgets56710 | ||||||
| Ref: #output-format-160167 | Ref: #output-format-160190 | ||||||
| Node: balancesheet60245 | Node: balancesheet60268 | ||||||
| Ref: #balancesheet60381 | Ref: #balancesheet60404 | ||||||
| Node: balancesheetequity62692 | Node: balancesheetequity62715 | ||||||
| Ref: #balancesheetequity62841 | Ref: #balancesheetequity62864 | ||||||
| Node: cashflow63378 | Node: cashflow63401 | ||||||
| Ref: #cashflow63506 | Ref: #cashflow63529 | ||||||
| Node: check-dates65629 | Node: check-dates65652 | ||||||
| Ref: #check-dates65756 | Ref: #check-dates65779 | ||||||
| Node: check-dupes65873 | Node: check-dupes65896 | ||||||
| Ref: #check-dupes65997 | Ref: #check-dupes66020 | ||||||
| Node: close66134 | Node: close66157 | ||||||
| Ref: #close66242 | Ref: #close66265 | ||||||
| Node: files69655 | Node: files69678 | ||||||
| Ref: #files69756 | Ref: #files69779 | ||||||
| Node: help69897 | Node: help69920 | ||||||
| Ref: #help69997 | Ref: #help70020 | ||||||
| Node: import71071 | Node: import71094 | ||||||
| Ref: #import71185 | Ref: #import71208 | ||||||
| Node: incomestatement71915 | Node: incomestatement71938 | ||||||
| Ref: #incomestatement72049 | Ref: #incomestatement72072 | ||||||
| Node: prices74453 | Node: prices74476 | ||||||
| Ref: #prices74568 | Ref: #prices74591 | ||||||
| Node: print74840 | Node: print74863 | ||||||
| Ref: #print74950 | Ref: #print74973 | ||||||
| Node: print-unique79844 | Node: print-unique79867 | ||||||
| Ref: #print-unique79970 | Ref: #print-unique79993 | ||||||
| Node: register80038 | Node: register80061 | ||||||
| Ref: #register80165 | Ref: #register80188 | ||||||
| Node: Custom register output84666 | Node: Custom register output84689 | ||||||
| Ref: #custom-register-output84795 | Ref: #custom-register-output84818 | ||||||
| Node: register-match86025 | Node: register-match86048 | ||||||
| Ref: #register-match86159 | Ref: #register-match86182 | ||||||
| Node: rewrite86342 | Node: rewrite86365 | ||||||
| Ref: #rewrite86457 | Ref: #rewrite86480 | ||||||
| Node: roi86526 | Node: roi86549 | ||||||
| Ref: #roi86624 | Ref: #roi86647 | ||||||
| Node: stats86740 | Node: stats86763 | ||||||
| Ref: #stats86839 | Ref: #stats86862 | ||||||
| Node: tags87709 | Node: tags87732 | ||||||
| Ref: #tags87807 | Ref: #tags87830 | ||||||
| Node: test88043 | Node: test88066 | ||||||
| Ref: #test88127 | Ref: #test88150 | ||||||
| Node: ADD-ON COMMANDS88835 | Node: ADD-ON COMMANDS88858 | ||||||
| Ref: #add-on-commands88945 | Ref: #add-on-commands88968 | ||||||
| Node: Official add-ons90232 | Node: Official add-ons90255 | ||||||
| Ref: #official-add-ons90372 | Ref: #official-add-ons90395 | ||||||
| Node: api90459 | Node: api90482 | ||||||
| Ref: #api90548 | Ref: #api90571 | ||||||
| Node: ui90600 | Node: ui90623 | ||||||
| Ref: #ui90699 | Ref: #ui90722 | ||||||
| Node: web90757 | Node: web90780 | ||||||
| Ref: #web90846 | Ref: #web90869 | ||||||
| Node: Third party add-ons90892 | Node: Third party add-ons90915 | ||||||
| Ref: #third-party-add-ons91067 | Ref: #third-party-add-ons91090 | ||||||
| Node: diff91202 | Node: diff91225 | ||||||
| Ref: #diff91299 | Ref: #diff91322 | ||||||
| Node: iadd91398 | Node: iadd91421 | ||||||
| Ref: #iadd91512 | Ref: #iadd91535 | ||||||
| Node: interest91595 | Node: interest91618 | ||||||
| Ref: #interest91716 | Ref: #interest91739 | ||||||
| Node: irr91811 | Node: irr91834 | ||||||
| Ref: #irr91909 | Ref: #irr91932 | ||||||
| Node: Experimental add-ons92040 | Node: Experimental add-ons92063 | ||||||
| Ref: #experimental-add-ons92192 | Ref: #experimental-add-ons92215 | ||||||
| Node: autosync92472 | Node: autosync92495 | ||||||
| Ref: #autosync92583 | Ref: #autosync92606 | ||||||
| Node: chart92822 | Node: chart92845 | ||||||
| Ref: #chart92941 | Ref: #chart92964 | ||||||
| Node: check93012 | Node: check93035 | ||||||
| Ref: #check93114 | Ref: #check93137 | ||||||
|  |  | ||||||
| End Tag Table | End Tag Table | ||||||
|  | |||||||
| @ -928,12 +928,15 @@ COMMANDS | |||||||
|               liabilities:debts |               liabilities:debts | ||||||
| 
 | 
 | ||||||
|    activity |    activity | ||||||
|  |        activity | ||||||
|        Show an ascii barchart of posting counts per interval. |        Show an ascii barchart of posting counts per interval. | ||||||
| 
 | 
 | ||||||
|        The activity command displays an ascii  histogram  showing  transaction |        The activity command displays an ascii  histogram  showing  transaction | ||||||
|        counts  by  day, week, month or other reporting interval (by day is the |        counts  by  day, week, month or other reporting interval (by day is the | ||||||
|        default).  With query arguments, it counts only matched transactions. |        default).  With query arguments, it counts only matched transactions. | ||||||
| 
 | 
 | ||||||
|  |        Examples: | ||||||
|  | 
 | ||||||
|               $ hledger activity --quarterly |               $ hledger activity --quarterly | ||||||
|               2008-01-01 ** |               2008-01-01 ** | ||||||
|               2008-04-01 ******* |               2008-04-01 ******* | ||||||
|  | |||||||
| @ -28,19 +28,8 @@ for each command: name, synopsis, description, examples. | |||||||
| _include_(Hledger/Cli/Commands/Accounts.md) | _include_(Hledger/Cli/Commands/Accounts.md) | ||||||
| 
 | 
 | ||||||
| ## activity | ## activity | ||||||
| Show an ascii barchart of posting counts per interval. |  | ||||||
| 
 | 
 | ||||||
| The activity command displays an ascii histogram showing | _include_(Hledger/Cli/Commands/Activity.md) | ||||||
| transaction counts by day, week, month or other reporting interval |  | ||||||
| (by day is the default). With query arguments, it counts only matched transactions. |  | ||||||
| 
 |  | ||||||
| ```shell |  | ||||||
| $ hledger activity --quarterly |  | ||||||
| 2008-01-01 ** |  | ||||||
| 2008-04-01 ******* |  | ||||||
| 2008-07-01  |  | ||||||
| 2008-10-01 ** |  | ||||||
| ``` |  | ||||||
| 
 | 
 | ||||||
| ## add | ## add | ||||||
| Prompt for transactions and add them to the journal. | Prompt for transactions and add them to the journal. | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user