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