move add-ons and scripts to bin/
This commit is contained in:
		
							parent
							
								
									e7f6bfa273
								
							
						
					
					
						commit
						34ec7406a1
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,6 +1,5 @@ | |||||||
| .* | .* | ||||||
| _* | _* | ||||||
| bin/* |  | ||||||
| cabal-dev* | cabal-dev* | ||||||
| cabal.sandbox.config | cabal.sandbox.config | ||||||
| */dist/ | */dist/ | ||||||
|  | |||||||
							
								
								
									
										20
									
								
								bin/README
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								bin/README
									
									
									
									
									
								
							| @ -1,9 +1,13 @@ | |||||||
| Interesting/historical binaries are kept here, such as: | hledger add-on commands, hledger-related scripts, developer builds. | ||||||
| 
 | 
 | ||||||
| - Optimised cabal builds, copied here from cabal's bin directory. | Scripts named hledger-* are hledger add-on commands. You can run them directly, | ||||||
| - Old versions, with the -X.Y suffix. Used for performance benchmarking. | or via "hledger [HLEDGEROPTS] ADDONCMD [-- ADDONOPTS]". You should: | ||||||
| - Builds for other platforms, with a -PLATFORM-ARCH suffix, maybe compressed for download. | 1. add this directory to your $PATH | ||||||
| - Non-optimised developer builds compiled with make (*dev). | 2. ensure the scripts have executable permission (they should already, at least on unix) | ||||||
|   Used during development for quicker, multi-package, and on-change compilation. | 3. optionally, compile them for quicker startup | ||||||
| - cabal and/or make builds with profiling enabled (*-prof). | See also: http://hledger.org/hledger.html#add-on-commands | ||||||
|   Used for investigating time and space usage. | 
 | ||||||
|  | Other hledger-related scripts include bash aliases, makefile examples, etc. | ||||||
|  | 
 | ||||||
|  | hledger development-related binaries also are stored here, such as | ||||||
|  | old versions for benchmarking, and platform-specific binaries. | ||||||
|  | |||||||
| @ -6,8 +6,8 @@ | |||||||
|   --package text |   --package text | ||||||
| -} | -} | ||||||
| -- To run or compile this script, it's easiest to be in the hledger source tree. Then: | -- To run or compile this script, it's easiest to be in the hledger source tree. Then: | ||||||
| -- To run it directly: extra/hledger-rewrite.hs ARGS | -- To run it directly: bin/hledger-rewrite.hs ARGS | ||||||
| -- To compile it: stack build hledger --only-dependencies && stack ghc extra/hledger-rewrite.hs | -- To compile it: stack build hledger --only-dependencies && stack ghc bin/hledger-rewrite.hs | ||||||
| 
 | 
 | ||||||
| {-| | {-| | ||||||
| hledger-rewrite [PATTERNS] --add-posting "ACCT  AMTEXPR" ... | hledger-rewrite [PATTERNS] --add-posting "ACCT  AMTEXPR" ... | ||||||
| @ -31,6 +31,7 @@ Related: https://github.com/simonmichael/hledger/issues/99 | |||||||
| 
 | 
 | ||||||
| TODO: | TODO: | ||||||
| - should allow regex matching and interpolating matched name in replacement | - should allow regex matching and interpolating matched name in replacement | ||||||
|  | - should apply all matching rules to a transaction, not just one | ||||||
| - should apply the rule for each matched posting within a transaction, if there's more than one | - should apply the rule for each matched posting within a transaction, if there's more than one | ||||||
| - should be possible to use this on unbalanced entries, eg while editing one | - should be possible to use this on unbalanced entries, eg while editing one | ||||||
| 
 | 
 | ||||||
| @ -1 +1 @@ | |||||||
| Extra stuff: less-maintained add-ons, custom report scripts, shell aliases, make rules... | "Extra" stuff, such as the old hledger-chart package. | ||||||
|  | |||||||
| @ -884,7 +884,7 @@ $ LEDGER_FILE=unique.journal hledger print-unique | |||||||
| ## rewrite | ## rewrite | ||||||
| Prints all journal entries, adding specified custom postings to matched entries. | Prints all journal entries, adding specified custom postings to matched entries. | ||||||
| 
 | 
 | ||||||
| [hledger-rewrite.hs](https://github.com/simonmichael/hledger/blob/master/extra/hledger-rewrite.hs), | [hledger-rewrite.hs](https://github.com/simonmichael/hledger/blob/master/bin/hledger-rewrite.hs), | ||||||
| in hledger's extra directory (compilation optional), adds postings to existing transactions, | in hledger's extra directory (compilation optional), adds postings to existing transactions, | ||||||
| optionally with an amount based on the existing transaction's first amount. See the script for more details. | optionally with an amount based on the existing transaction's first amount. See the script for more details. | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -316,7 +316,7 @@ $ make test -n | |||||||
| 		&& echo pkgtest PASSED) || echo pkgtest FAILED | 		&& echo pkgtest PASSED) || echo pkgtest FAILED | ||||||
| (stack exec hledger test \ | (stack exec hledger test \ | ||||||
| 		&& echo builtintest PASSED) || echo builtintest FAILED | 		&& echo builtintest PASSED) || echo builtintest FAILED | ||||||
| (COLUMNS=80 PATH=`pwd`/bin:/home/simon/src/hledger/bin:/home/simon/src/hledger/extra:/home/simon/.local/bin:/home/simon/.cabal/bin:/opt/ghc/7.10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/var/lib/gems/1.9.1/bin stack exec -- shelltest --execdir -- -j16 --hide-successes tests \ | (COLUMNS=80 PATH=`pwd`/bin:/home/simon/src/hledger/bin:/home/simon/.local/bin:/home/simon/.cabal/bin:/opt/ghc/7.10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/var/lib/gems/1.9.1/bin stack exec -- shelltest --execdir -- -j16 --hide-successes tests \ | ||||||
| 		&& echo functest PASSED) || echo functest FAILED | 		&& echo functest PASSED) || echo functest FAILED | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -96,13 +96,13 @@ See also the two Twitter feeds: | |||||||
| - [ledger-autosync](https://bitbucket.org/egh/ledger-autosync) downloads/converts/deduplicates OFX data | - [ledger-autosync](https://bitbucket.org/egh/ledger-autosync) downloads/converts/deduplicates OFX data | ||||||
| - [hledger-chart](http://hackage.haskell.org/package/hledger-chart) generates simple pie charts (unmaintained) | - [hledger-chart](http://hackage.haskell.org/package/hledger-chart) generates simple pie charts (unmaintained) | ||||||
| - [hledger-vty](http://hackage.haskell.org/package/hledger-vty) a simple curses-style UI (unmaintained) | - [hledger-vty](http://hackage.haskell.org/package/hledger-vty) a simple curses-style UI (unmaintained) | ||||||
| - More in [extra/](https://github.com/simonmichael/hledger/tree/master/extra/) | - More in [bin/](https://github.com/simonmichael/hledger/tree/master/bin/) | ||||||
| 
 | 
 | ||||||
| ## Scripting examples | ## Scripting examples | ||||||
| 
 | 
 | ||||||
| - <https://gist.github.com/4172604> printing average expenses by month | - <https://gist.github.com/4172604> printing average expenses by month | ||||||
| - <https://gist.github.com/4210558> calculating historical account balances | - <https://gist.github.com/4210558> calculating historical account balances | ||||||
| - More in [extra/](https://github.com/simonmichael/hledger/tree/master/extra/) | - More in [bin/](https://github.com/simonmichael/hledger/tree/master/bin/) | ||||||
| 
 | 
 | ||||||
| ## Similar projects | ## Similar projects | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -138,7 +138,7 @@ Simon Michael, Johannes Gerer, Nikolay Orlyuk, Shubham Lagwankar. | |||||||
| 
 | 
 | ||||||
| -   fix non-existent "oldtime" dependency ([#431](http://bugs.hledger.org/431)) | -   fix non-existent "oldtime" dependency ([#431](http://bugs.hledger.org/431)) | ||||||
| 
 | 
 | ||||||
| -   [hledger-equity.hs](https://github.com/simonmichael/hledger/blob/master/extra/hledger-equity.hs) now generates valid journal format when there are multiple commodities | -   [hledger-equity.hs](https://github.com/simonmichael/hledger/blob/master/bin/hledger-equity.hs) now generates valid journal format when there are multiple commodities | ||||||
| 
 | 
 | ||||||
| ### hledger-ui 1.1 | ### hledger-ui 1.1 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| # Tests for equity addon | # Tests for equity addon | ||||||
| 
 | 
 | ||||||
| # Simple case | # Simple case | ||||||
| runghc ../../extra/hledger-equity.hs -f- -p 2016 assets liabilities | runghc ../../bin/hledger-equity.hs -f- -p 2016 assets liabilities | ||||||
| <<< | <<< | ||||||
| 2016/1/1 open | 2016/1/1 open | ||||||
|     assets:bank         $100 |     assets:bank         $100 | ||||||
| @ -35,7 +35,7 @@ runghc ../../extra/hledger-equity.hs -f- -p 2016 assets liabilities | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Verify effect of period | # Verify effect of period | ||||||
| runghc ../../extra/hledger-equity.hs -f- -p 2016 assets liabilities | runghc ../../bin/hledger-equity.hs -f- -p 2016 assets liabilities | ||||||
| <<< | <<< | ||||||
| 2015/12/31 open | 2015/12/31 open | ||||||
|     assets:bank         $100 |     assets:bank         $100 | ||||||
| @ -68,7 +68,7 @@ runghc ../../extra/hledger-equity.hs -f- -p 2016 assets liabilities | |||||||
| 
 | 
 | ||||||
| # # Tear transaction across periods | # # Tear transaction across periods | ||||||
| # # TODO: clarify what should we see for this case | # # TODO: clarify what should we see for this case | ||||||
| # runghc ../../extra/hledger-equity.hs -f- -p 2016 assets liabilities | # runghc ../../bin/hledger-equity.hs -f- -p 2016 assets liabilities | ||||||
| # <<< | # <<< | ||||||
| # 2016/1/1 open | # 2016/1/1 open | ||||||
| #     assets:bank         $100 | #     assets:bank         $100 | ||||||
| @ -1,7 +1,7 @@ | |||||||
| # Tests for rewrite addon | # Tests for rewrite addon | ||||||
| 
 | 
 | ||||||
| # Add proportional income tax (from documentation) | # Add proportional income tax (from documentation) | ||||||
| runghc ../../extra/hledger-rewrite.hs -f- ^income --add-posting '(liabilities:tax)  *.33' | runghc ../../bin/hledger-rewrite.hs -f- ^income --add-posting '(liabilities:tax)  *.33' | ||||||
| <<< | <<< | ||||||
| 2016/1/1 paycheck | 2016/1/1 paycheck | ||||||
|     income:remuneration     $-100 |     income:remuneration     $-100 | ||||||
| @ -23,7 +23,7 @@ runghc ../../extra/hledger-rewrite.hs -f- ^income --add-posting '(liabilities:ta | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Duplicate posting for budgeting (from documentation) | # Duplicate posting for budgeting (from documentation) | ||||||
| runghc ../../extra/hledger-rewrite.hs -f- expenses:gifts --add-posting '(budget:gifts)  *-1' | runghc ../../bin/hledger-rewrite.hs -f- expenses:gifts --add-posting '(budget:gifts)  *-1' | ||||||
| <<< | <<< | ||||||
| 2016/1/1 withdraw | 2016/1/1 withdraw | ||||||
|     assets:cash     $20 |     assets:cash     $20 | ||||||
| @ -45,7 +45,7 @@ runghc ../../extra/hledger-rewrite.hs -f- expenses:gifts --add-posting '(budget: | |||||||
| >>>=0 | >>>=0 | ||||||
| 
 | 
 | ||||||
| # Add absolute bank processing fee | # Add absolute bank processing fee | ||||||
| runghc ../../extra/hledger-rewrite.hs -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  --add-posting 'assets:bank  $-5' | runghc ../../bin/hledger-rewrite.hs -f- assets:bank and 'amt:<0' --add-posting 'expenses:fee  $5'  --add-posting 'assets:bank  $-5' | ||||||
| <<< | <<< | ||||||
| 2016/1/1 withdraw | 2016/1/1 withdraw | ||||||
|     assets:cash     $20 |     assets:cash     $20 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user