Commit Graph

201 Commits

Author SHA1 Message Date
Simon Michael
fea7a1faf4 bin: hledger-check: use stack script command 2020-06-28 09:35:05 -07:00
Dmitry Astapov
54300328cd cli: ability to pass arguments to getHledgerCliOpts + two example scripts 2020-05-27 04:58:57 -07:00
Simon Michael
90d4bb9c0f ;bin: hledger-check-tag-files: fix comments 2020-03-27 17:22:56 -07:00
Simon Michael
53c08f45b2 ;bin: hledger-check-tag-files: consistency 2020-03-27 17:21:23 -07:00
Simon Michael
b78b98e372 bin: hledger-check-tag-files2, a version using cabal's v2-run command 2020-03-27 17:20:43 -07:00
Simon Michael
a38694b247 bin: hledger-check-tag-files, a script using stack's script command 2020-03-27 16:43:14 -07:00
Simon Michael
76776e28b2 ;bin: smooth: link to #1171
[ci skip]
2020-01-23 12:53:43 -08:00
Simon Michael
21fec478d4 ;bin: smooth: note/warn about date-order requirement (#1171)
[ci skip]
2020-01-23 12:40:25 -08:00
Simon Michael
4589ec51ba ;bin: smooth: fix Text "Empty stream" error (#1171)
[ci skip]
2020-01-23 12:22:24 -08:00
Simon Michael
82421d0eab ;bin: smooth: doesn't use hledger-lib
[ci skip]
2020-01-23 12:04:36 -08:00
Simon Michael
db74540280 ;bin: smooth: here -> string-qq, save several minutes of build time
[ci skip]
2020-01-23 12:04:28 -08:00
Simon Michael
8efae769c0 bin: smooth: update for current lib (RawOpts)
[ci skip]
2020-01-23 10:28:57 -08:00
Mykola Orliuk
ab9c150759 ;lib: clean out showTransactionUnelided
Keep aliases until next major release.
2019-11-16 12:53:07 +01:00
Simon Michael
a5cae2a859 bin: check: fix weird hashbang error (#1072)
Hashbangs and CPP on mac don't mix well.
https://gitlab.haskell.org/ghc/ghc/issues/6132

[ci skip]
2019-07-17 00:01:10 +01:00
Simon Michael
45bb513eb8 bin: smooth, swap-dates: fix compile.sh warnings (#1072)
[ci skip]
2019-07-17 00:01:06 +01:00
Simon Michael
64d6878d6c ;bin: update readme (#1072)
[ci skip]
2019-07-16 23:41:36 +01:00
Simon Michael
cb5334c8df bin: hledger-smooth: update for latest hledger-lib (#1072)
[ci skip]
2019-07-16 23:36:37 +01:00
Simon Michael
acd6e5bfe3 bin: hledger-swap-dates: update for latest hledger-lib, finish (#1072)
[ci skip]
2019-07-16 23:31:45 +01:00
Simon Michael
cfb32a89d6 bin: hledger-check: update for latest hledger-lib (#1072)
[ci skip]
2019-07-16 23:31:35 +01:00
Simon Michael
8bdcd9b38c bin: add hledger-swap-dates 2019-07-16 05:19:52 +01:00
Simon Michael
bc95f39757 ;bin: update, markdownify readme
[ci skip]
2019-07-16 05:19:33 +01:00
Caleb Maclennan
11d9e5eb6a code: Strip extraneous trailing whitespace from Haskell sources 2019-07-15 16:40:49 +01:00
Simon Michael
aebd6c50d6 smooth: smoothes out irregular transactions (experimental addon) 2018-07-16 23:36:06 +01:00
Alex Chen
b245ec7b3d lib: remove the megaparsec compatability module 2018-05-22 12:16:46 -07:00
Simon Michael
4474e4bd43 bin: drop hledger-autosync symlink, it breaks make watch-* 2018-05-17 19:00:09 -07:00
Simon Michael
84579bb1b4 silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
Simon Michael
61f7563fa2 budget: drop obsolete hledger-budget addon (close #620)
[ci skip]
2018-03-12 23:14:00 +00:00
Simon Michael
88ef586480 lib: rename, clarify purpose of balanceReportFromMultiBalanceReport 2018-01-23 11:32:24 -08:00
Mykola Orliuk
d05bdd5b4e hledger-check: compatibility with stack8.0.yaml 2017-11-29 07:05:22 -08:00
Dmitry Astapov
f101d5b515 cli: --forecast adds periodic transactions to reports
Ledger-style periodic transactions, previously supported only by
hledger-budget, have landed as a first-class feature.  The --forecast
flag activates them, so that any transactions they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
fbd28be6cb Allow hledger-budget to generate transactions past the end date of the last real transaction if -b/-e are supplied 2017-11-16 16:45:08 -08:00
Simon Michael
49090d9e53 bin: stop listing addons after compiling them 2017-11-01 08:05:17 -07:00
Simon Michael
78c97650f5 budget: include docs in command line help
[ci skip]
2017-10-15 19:35:02 -07:00
Mykola Orliuk
7cb7554ad1 bin: budget: re-factor to use hledgerCommandMode
This is preparation to make it part of of hledger.
2017-10-02 20:17:57 -10:00
Mykola Orliuk
8922d86eb9 bin: budget: adapt to CliOpts re-factoring
Fixes simonmichael/hledger#615
2017-10-01 11:27:12 -10:00
Simon Michael
e3902ebc6f cli: make tags a builtin command 2017-09-12 19:54:39 -07:00
Simon Michael
d2d7dbbce0 cli: make rewrite a builtin command 2017-09-12 19:51:27 -07:00
Simon Michael
89f694707b cli: make register-match a builtin command 2017-09-12 19:43:41 -07:00
Simon Michael
bf99c74198 cli: make print-unique a builtin command 2017-09-12 19:37:31 -07:00
Simon Michael
258efdf83c cli: make prices a builtin command 2017-09-12 19:28:01 -07:00
Simon Michael
4e6aa06b62 cli: make equity a builtin command 2017-09-12 19:17:47 -07:00
Simon Michael
fe9cd2a186 cli: make check-dupes a builtin command 2017-09-12 19:09:00 -07:00
Simon Michael
7f5985067d cli: begin merging addons, make check-dates a builtin command 2017-09-12 17:54:25 -07:00
Simon Michael
e4782d1184 bin: budget: info, man are no more 2017-09-12 10:04:52 -07:00
Simon Michael
5e4673bd1f bin: chart: rename script, skip deps to avoid breaking func tests
hledger-chart's deps are not currently GHC 8.2 compatible
2017-09-11 18:36:20 -07:00
Simon Michael
b1646b9f05 chart: specify older resolver, this doesn't build with GHC 8.2 2017-09-11 11:59:25 -07:00
Simon Michael
15a24da126 check: fix some string/text bitrot 2017-09-11 09:08:00 -07:00
Peter Simons
c571c6ff25 hledger-check: fix the name of this tool in the usage example comments 2017-09-09 13:10:21 -07:00
Simon Michael
2a3feb9288 bin: check: fix megaparsec-related build error 2017-07-31 08:09:05 -07:00
Simon Michael
d7d5f8a064 add support for megaparsec 6 (fixes #594)
Older megaparsec is still supported.
Also cleans up our custom parser types,
and some text (un)packing is done in different places
(possible performance impact).
2017-07-27 19:20:46 -07:00
Simon Michael
45eeb06ebc bin: tags: remove unused import 2017-07-16 07:24:30 +01:00
Simon Michael
e908d96fd9 bin: new hledger-tags addon, lists tags in matched transactions 2017-07-12 22:11:36 +01:00
Simon Michael
7e896572a7 make --help and -h the same, drop --man and --info for now (#579) 2017-07-07 02:08:34 +01:00
Simon Michael
817292a1dd bin: mention make addons in readme 2017-07-05 18:27:44 +01:00
Simon Michael
0b6b063fcc check-dupes: requires the hledger package too (#580) 2017-07-05 18:27:13 +01:00
Mykola Orliuk
15c86e1f79 prices: add inverted-costs support and sort output 2017-06-16 11:28:15 -07:00
Nikolay Orlyuk
8966e765c8 prices: improve precision 2017-06-16 11:28:15 -07:00
Simon Michael
430c49154a lib: rename Query's Status constructor to StatusQ 2017-06-15 19:16:39 -07:00
Simon Michael
eb42ea04e5 use consistent UPC order for --unmarked/--pending/--cleared (#564) 2017-06-15 19:16:39 -07:00
Simon Michael
e119941648 rename "uncleared" status to "unmarked" and --uncleared to --unmarked (#564)
See the issue and linked mail list discussion. Ambiguity between the
uncleared state, and the "not cleared" --uncleared flag causes confusion
and friction. At this point it seems best to break with Ledger and
past hledger, pick a new name and drop --uncleared to put an end to it.
2017-06-15 19:16:39 -07:00
Christian G. Warden
d39040c634 Add Support for Rewriting Multipler Postings Into Different Commodities (#557)
When generating a new posting as a multiple of an existing posting,
support conversion to a different commodity.  For example, postings in
hours can be used to generate postings in USD.

Automatic transactions generated from rewrite rules use the commodity,
amount style, and transaction price if the rewrite defines a commodity.
2017-05-30 07:30:15 -07:00
Simon Michael
344b4964a9 bin: fix a few missing --package declarations 2017-03-28 18:43:13 -07:00
Simon Michael
abfd6394ee bin: name hledger-check-dupes like other validation commands 2017-03-28 04:08:36 -07:00
Simon Michael
4a3e4b1725 addons: fix warnings 2017-03-22 15:25:30 +00:00
Simon Michael
a4a3039fe9 travis: require warning-free builds of addons #520 2017-03-22 14:18:29 +00:00
Simon Michael
c1103913b9 addons: fix new hledger-check build error 2017-03-22 13:55:56 +00:00
Simon Michael
3564c929e1 addons: fix compilation of rewrite by bin/compile.sh 2017-02-02 11:48:09 -08:00
Simon Michael
b7092f278b cli, addons: reduce boilerplate a little with hledgerCommandMode helper 2017-01-25 17:10:10 -08:00
Simon Michael
9f8e96d189 prices: update for latest options/help style 2017-01-25 16:36:49 -08:00
Michael Walker
66e33e0b0a Add hledger-check script. 2017-01-25 16:35:47 -08:00
Mykola Orliuk
0a8212bda3 equity: generate assertions 2017-01-25 14:45:54 -08:00
Mykola Orliuk
f3cb32a56f prices: new addon (#486) 2017-01-25 11:50:54 -08:00
Simon Michael
4b3d3fc2fa doc: move last addon docs out of hledger manual; add hledger-iadd
[ci skip]
2017-01-24 15:39:38 -08:00
Simon Michael
1fec6f624c addons, doc: consolidate addon docs in the scripts, rather than the hledger man page 2017-01-24 15:03:16 -08:00
Simon Michael
daf6732368 addons, doc: a new help scheme, more automated and usable
The previous cleanup defined long help separately from the usage text
generated by cmdargs. This meant keeping flag descriptions synced
between the two, and also the short help was often too verbose and
longer than the long help.

Now, the non-usage bits of long help are defined as pre and postambles
within the cmdargs mode, letting cmdargs generate the long help
including all flags. We derive the short help from this by truncating
at the start of the hledger common flags.

Most of the bundled addons (all but hledger-budget) now use the
new scheme and have pretty reasonable -h and --help output.
We can do more to reduce boilerplate for addon authors.
2017-01-24 09:27:43 -08:00
Simon Michael
f4eb9e23e3 addons: add -h & --help to most of them; CliOpts cleanups 2017-01-23 06:17:17 -08:00
Simon Michael
1218ca55f0 bin: don't list .dyn_* files after compile.sh on mac 2017-01-22 15:02:49 -08:00
Simon Michael
ee62d9eb79 rewrite: -> JournalSourcePos 2017-01-22 14:24:53 -08:00
Mykola Orliuk
25d4917ea2 doc: extend with budget addon section 2017-01-20 13:42:17 -08:00
Mykola Orliuk
d5c2ed4fa7 budget: bucketing 2017-01-20 13:42:17 -08:00
Mykola Orliuk
3a632acea0 budget: periodic transactions support 2017-01-20 13:42:17 -08:00
Mykola Orliuk
2d9259ab3a budget: new addon 2017-01-20 13:42:17 -08:00
Mykola Orliuk
7437c96ff6 Make hledger-rewrite tool suitable for re-factoring original journals (#490)
* cli: fix bug in pivot for postings without tag

Without this fix for postings without tag query checked effective
account which is always empty text ("").

* rewrite: inherit dates, change application order

For budgeting it is important to inherit actual date of posting if it
differs from date of transaction. These dates will be added
as a separate line of comment.

More natural order of rewrites is when result of first defined one is
available for all next rewrites.

* rewrite: factor out Hledger.Data.AutoTransaction

* rewrite: add diff output

With this option you can modify your original files without loosing
inter-transaction comments etc. I.e. you can run:

hledger-rewrite --diff Agency \
  --add-posting 'Expenses:Taxes  *0.17' \
  | patch

As result multiple files should be updated.
Also it is nice to review your changes using colordiff instead of
patch.

* lib: track source lines range for journal

* doc: auto entries and diff output for rewrite
2017-01-20 07:33:24 -08:00
Simon Michael
c61de771d4 equity: sync help message with doc 2017-01-19 08:26:03 -08:00
Simon Michael
9a1128e276 addons: in bin/compile.sh, ensure hledger-chart's extra deps are installed 2017-01-16 14:25:10 -08:00
Mykola Orliuk
3af81a73ca txnTieKnot fix (~10% memory reduce) (#483)
* bin: ignore chart and dupes addons

* lib: fix txnTieKnot

Ensure that postings refers to their transaction rather than original
one.
This should allow compiler perform destructive update and/or allow
garbage collecting old transaction.
2017-01-16 07:42:41 -08:00
Mykola Orliuk
8954944ee6 Apply ModifierTransaction's from journal during hledger-rewrite. (#477)
* rewrite: rewrite every posting

Also start using ModifierTransaction

* rewrite: use journal parser for postings

* rewrite: use ModifierTransactions from Journal

See simonmichael/hledger#99
2017-01-13 12:41:16 -08:00
Nikolay Orlyuk
ea7a7d78aa Strip prices for equity report (#468)
Fixes simonmichael/hledger#467
2017-01-11 07:53:01 -08:00
Nikolay Orlyuk
32d9365fc2 Ensure showTransaction produce a valid journal (#466)
- Make output of print to be a valid journal
- Partially reverts 419f5f2a2

Fixes simonmichael/hledger#465
2017-01-10 20:44:10 -08:00
Stefano Rodighiero
f12a57647e chmod a+x (#464) 2017-01-09 12:09:16 -08:00
Stefano Rodighiero
e8003ea524 + hledger-dupes (originally from https://github.com/larsen/hledger-dupes) (#463) 2017-01-09 09:40:51 -08:00
Simon Michael
7460aca70f chart: revive hledger-chart as an add-on
& drop the extra/ directory.
2017-01-09 07:31:45 -08:00
Simon Michael
031cad9497 bin: add-ons compile script 2017-01-08 10:24:40 -08:00
Simon Michael
a22d56ee28 bin: git ignore 2017-01-08 07:31:32 -08:00
Simon Michael
8eb77dce2b bin: add budget-rewrite.sh example 2017-01-08 07:28:23 -08:00
Simon Michael
ba99ad3388 bin: add hledger-autosync symlink as an example 2017-01-08 07:28:23 -08:00
Simon Michael
ab19a92187 bin: add register-match, convert all to stack scripts 2017-01-08 07:28:23 -08:00
Simon Michael
34ec7406a1 move add-ons and scripts to bin/ 2017-01-08 07:28:23 -08:00
Simon Michael
ecddd67689 doc: more consistent README file extensions 2014-10-31 16:16:41 -07:00
Simon Michael
187a4ec123 update bin/README 2014-07-06 10:12:09 -07:00
Simon Michael
ad8d937efc re-add bin and profs directories with READMEs, so crazy git can remember them 2013-04-05 20:18:50 -07:00