Simon Michael
7d99ae5033
balance: --tree makes multicolumn reports show hierarchy
...
Multicolumn balance reports can now be switched to a hierarchical view
with --tree. This is similar to the single column balance report with
--no-elide, ie we do not elide boring parents into the following line.
The --flat and --tree flags are opposites; the last one to appear on
the command line is decisive (in future, if not already).
2014-04-06 21:56:47 -07:00
Simon Michael
349bb1db01
forgot to import nullamt
2014-04-06 07:43:04 -07:00
Simon Michael
b689b791e3
fix amt: false positives on multi-commodity amounts
2014-04-05 19:33:44 -07:00
Simon Michael
125a72f874
avoid a haddock crash
2014-04-04 09:09:00 -07:00
Simon Michael
029528519c
remove out of date comment
2014-04-03 18:55:43 -07:00
Simon Michael
6a928a03a8
overhaul single- and multi-column balance reports
...
Changes include:
- flat mode now shows exclusive (subaccount-excluding) balances.
This is a deviation from ledger, but seems simpler and clearer
for users and implementors across the various modes.
- in flat mode, --depth now aggregates deeper accounts at the
depth limit, rather than just excluding them from the report.
This is more useful.
- in flat mode, --empty no longer shows parent accounts with
no postings.
- more tests, more debug output, clearer code
2014-04-03 18:49:57 -07:00
Simon Michael
4dc61e76bf
test and fix display of zero-balance leaves ( fixes #170 )
2014-04-03 18:49:57 -07:00
Simon Michael
cf254b0da3
show anumpostings in Account's show instance
2014-04-03 18:49:57 -07:00
Simon Michael
d21085cc6e
an Account now knows how many postings it has
2014-04-03 18:49:57 -07:00
Simon Michael
2844333857
less debug output from some low-level functions
2014-04-03 18:49:57 -07:00
Simon Michael
f409f72899
force DateSpans to line-wrap better in debug output
2014-04-03 18:49:57 -07:00
Simon Michael
577ff7902c
dbgAtM, monadic version of dbgAt
2014-04-03 18:49:56 -07:00
Simon Michael
21575ed47b
more verbose Amount debug output at level 6+
2014-04-03 18:49:56 -07:00
Simon Michael
874c467789
briefer mixed amount debug output below level 3
2014-04-03 18:49:56 -07:00
Simon Michael
a05810f8e0
dbgAt
2014-04-03 18:49:56 -07:00
Simon Michael
784e9eff8a
dbg(ppshow) output improvements
...
- align single-line output a little better
- start multi-line output on a new line and indent it
2014-04-03 18:49:56 -07:00
Simon Michael
c5a839b309
3/4/5-tuple accessors
2014-04-03 18:49:56 -07:00
Simon Michael
b69e6c6946
unused extensions
2014-03-28 16:23:40 -07:00
Simon Michael
ef1cc06cab
avoid pretty-show with GHC < 7.4; update tested-with ( fixes #155 )
...
hledger builds with GHC 7.2 through 7.8. 7.0 is not supported
because we require shakespeare which requires the DeriveGeneric extension.
2014-03-27 12:29:34 -07:00
Simon Michael
da0ce23144
don't let default commodity limit the max precision ( fixes #169 )
2014-03-26 17:25:59 -07:00
Simon Michael
882a9dbf1c
cli, report & raw options cleanups
2014-03-25 19:03:56 -07:00
Peter Simons
6319ecd0b7
showDateSpan: remove redundant local definition of showDate
2014-03-22 12:03:00 +01:00
Peter Simons
a56231751f
showDate: use '%0C' to get a two-digit century with time-1.4.0.1 or later
2014-03-22 12:02:22 +01:00
Simon Michael
25a8aa2970
fix hunit compilation warnings
2014-03-21 17:41:54 -07:00
Simon Michael
e99c3c4b01
queries: amt: compares unsigned by default, signed if number has + or -
2014-03-20 19:10:48 -07:00
Simon Michael
467c50e06c
fix a redundant import
2014-03-19 17:32:35 -07:00
Simon Michael
77d24fc241
split up Hledger.Reports
2014-03-19 17:31:18 -07:00
Simon Michael
59cbc230d8
drop data-pprint for now, does not support ghc 7.8
...
The data-pprint and pretty-show packages used for debugging
tend to be poorly supported, drop one of them for now.
2014-03-19 16:11:46 -07:00
Simon Michael
bff69227f7
balance: more comment cleanups
2014-03-18 18:16:47 -07:00
Simon Michael
4d8d0d9aa6
balance: make BalanceReport more like MultiBalanceReport, doc cleanups
2014-03-18 18:01:24 -07:00
Simon Michael
e42e58fd26
the sym: prefix seems unintuitive, try cur: as an alias
2014-03-16 09:43:15 -07:00
Simon Michael
e97b8b20b8
balance: make sym: filtering work as expected in multicolumn reports
2014-03-16 09:40:51 -07:00
Simon Michael
712e6f1e36
register: fix tag: matching all sibling postings
2014-03-05 14:43:58 -08:00
Simon Michael
97e3f852a1
bump version to 0.22.98 aka 0.23 alpha
2014-03-04 11:17:56 -08:00
Simon Michael
7291977e6f
rename Format to StorageFormat
2014-03-02 13:37:10 -08:00
Simon Michael
dd2f293094
rename FormatString to OutputFormat
...
It was going to be Format, but that clashes with file format. Press on.
2014-03-02 13:33:56 -08:00
Simon Michael
6f49263c9b
print: tag queries will match transactions whose postings contain the tag
2014-03-01 17:42:13 -08:00
Simon Michael
4b4715ab76
parsing: don't accept . as a valid amount
2014-03-01 10:26:20 -08:00
Simon Michael
46d594bada
balance, register now filter more strongly by sym:
2014-02-27 17:47:47 -08:00
Simon Michael
73c09f91d7
queryFromOptsOnly for when args aren't query terms
2014-02-27 17:46:05 -08:00
Simon Michael
762a1b4d74
parsing: comments can also start with # in col 0
2014-02-27 11:47:36 -08:00
Simon Michael
431ef894e0
cli: clarify "hledger add" command in no journal file error
2014-02-12 09:15:21 -08:00
Simon Michael
d158d401d9
fix some breakages found by Hydra
2014-02-05 19:30:01 -08:00
Simon Michael
5223bc5c41
lib: rename and expose more journal file parsers
2014-02-05 18:55:38 -08:00
Simon Michael
dc8b687056
extra: hledger-rewrite script
2014-02-05 13:03:06 -08:00
Simon Michael
f87a68999f
mention the often-overlooked 2-space rule in the too many missing amounts error
2014-01-24 15:28:37 -08:00
Simon Michael
d55f686f68
avoid a Text.Printf name collision with GHC 7.7+ ( fixes #153 )
2014-01-10 08:29:25 -08:00
Simon Michael
2ec6231a51
bump version to 0.22.1
2014-01-08 15:01:45 -08:00
Simon Michael
62b0461c0e
require latest pretty-show to allow install with standard happy and fix hackage docs
2014-01-08 15:00:41 -08:00
Clint Adams
cf365524cb
Use regex-tdfa instead of regex-compat-tdfa
2014-01-08 14:37:30 -08:00
Simon Michael
8befcb8354
bump version to 0.22, update tested-with & doc building
2013-12-13 18:28:45 -08:00
Simon Michael
8261ac0f56
three fixes to handle --debug=N like --debug
2013-12-07 06:09:39 -08:00
Simon Michael
c53732a4af
balance: new multi-column reports & documentation
...
Two new multi-column balance report modes show ending balance per
period: `--cumulative`, starting from 0, and `--historical`, starting
from the historical starting balance.
The balance command's specification has been clarified and consolidated
in the Balance.hs haddock. Reports.hs has also had haddock updates. The
old AccountsReport type is now BalanceReport, still used by
single-column balance report. The new MultiBalanceReport type is used by
the multi-column reports.
2013-12-07 05:43:31 -08:00
Simon Michael
b2c6a8e7d2
require data-pprint 0.2.3, works with ghc < 7.2
2013-12-06 13:58:06 -08:00
Simon Michael
13641eab66
debug level sets amount/journal show verbosity
...
Amounts and journal values are often rendered too verbosely in debug
output, obscuring what's important. Here we try adjusting the level
of detail in the Show instance based on the global debug level.
Needs more work.
2013-12-06 13:51:19 -08:00
Simon Michael
3cf53661f3
new debug helpers; --debug=N sets debugLevel
...
The debug level set by `--debug[=N]` is now available to pure and
startup code as debugLevel, using unsafePerformIO.
`dbg LABEL ...` is now the go-to helper for tracing values on the
console; it produces output when the debug level is non-zero. `dbgExit`
is similar but exits immediately, avoiding further output. The
`dbgshow`, `dbgppshow` and `dbgpprint` variants allow control over the
pretty-printing method and required debug level, allowing more control
over what is displayed when.
Other cleanups: lstrace -> ltrace, pdbgAt -> pdbg, tracewith -> traceWith.
2013-12-06 13:35:50 -08:00
Simon Michael
22a8020296
make most types instances of Data (and Typeable)
...
This allows them to be pretty-printed with pprint (from data-pprint)
when debugging, and shouldn't have much impact otherwise.
2013-12-06 13:19:43 -08:00
Simon Michael
2de58e2ec0
fix haddock errors in Reports.hs
2013-09-28 10:14:43 -07:00
Simon Michael
7e06a6a24c
balance: basic multi-column balance (change) reports
2013-09-26 15:06:48 -07:00
Simon Michael
d6c841d93b
show search queries more accurately in --debug output
2013-09-23 11:50:20 -07:00
Simon Michael
009c7e3f90
bump version to 0.22 alpha
2013-09-22 22:38:27 -07:00
Simon Michael
671bb6c4a2
require data-pprint as a debugging aid and make some types compatible with it
2013-09-21 13:36:43 -07:00
Simon Michael
8444be6f88
docs: report haddock cleanups
2013-09-10 13:42:57 -07:00
Simon Michael
f9656a21af
print: comment positions (same line or next line) are now preserved
2013-09-10 10:32:49 -07:00
Simon Michael
7ed0705398
register: --average/-A
shows a running average, like ledger
2013-09-09 18:25:53 -07:00
Simon Michael
3d205ec03f
refactor: rename unclear helper
2013-09-09 17:41:29 -07:00
Simon Michael
060d1fdd1b
change comm: to sym: and require a match on the whole symbol
2013-09-09 15:26:45 -07:00
Simon Michael
957f57a07b
new comm:REGEXP query matches commodity symbols. Also some minor amt: fixes.
2013-09-09 15:04:43 -07:00
Simon Michael
73230838c5
parsing: amt queries use the = operator by default
2013-09-09 11:57:25 -07:00
Max Bolingbroke
e96fff7887
Upgrade to regex-compat-tdfa to squelch unicode problems
2013-08-20 21:19:28 +01:00
Simon Michael
eff1d3f1a5
csv reader: add the include
directive, useful for factoring out common rules used with multiple CSV files
2013-08-03 20:53:41 -07:00
Simon Michael
318d36d712
bump version
2013-06-23 16:50:35 -07:00
Dmitry Astapov
ed58d815d6
Fix for multiple field assignments in CSV parsing
2013-06-19 08:30:33 +01:00
Simon Michael
4eda6119f8
bump version to 0.21.2
2013-06-04 19:07:22 -07:00
Simon Michael
080eb866ec
web: clean up language extensions a bit, make autoweb works again
2013-06-04 18:23:55 -07:00
Simon Michael
e13ea5706d
oops, missed a build failure
2013-06-04 11:43:26 -07:00
Simon Michael
557419de8c
bump version to 0.21.1
2013-06-03 23:18:30 -07:00
Simon Michael
fd8de9558e
web: show proper Y-values in register chart ( fixes #122 )
2013-06-03 23:15:30 -07:00
Simon Michael
4041f5a553
bump version to 0.21
2013-06-01 15:58:06 -07:00
Simon Michael
2e5718d5ea
web: show one line per commodity in charts. Needs more polish, but fixes #109 .
2013-06-01 15:33:33 -07:00
Simon Michael
95f909543a
fix a haddock failure reported by hydra
2013-06-01 13:55:34 -07:00
Simon Michael
c2fa4b3c21
parsing: make balance assertions more robust with different precisions ( #119 )
...
Also note another issue.
2013-06-01 13:39:00 -07:00
Simon Michael
44545d6ec7
parsing: update a csv reader error message
2013-06-01 12:38:58 -07:00
Simon Michael
a26ab926d8
parsing: don't fail when a csv amount has trailing whitespace ( fixes #113 )
2013-06-01 12:38:13 -07:00
Simon Michael
ce651bd614
Merge pull request #112 from clinty/testsuites
...
cabal testsuites for hledger-lib and hledger
2013-05-30 16:25:35 -07:00
Simon Michael
56a37aabcf
small cleanup
2013-05-30 15:17:21 -07:00
Simon Michael
6073b56b9e
parsing: order postings first by date, then by parse order when checking balance assertions
2013-05-30 15:16:54 -07:00
Simon Michael
5685b3dc9c
parsing: don't allow = in unquoted commodity symbols, fixes commodity-less balance assertion amounts
2013-05-30 15:15:38 -07:00
Simon Michael
87820705f5
parsing: after reading a journal file, check all balance assertions and continue only if they pass
2013-05-28 16:25:00 -07:00
Simon Michael
0be986fcb9
parsing: actually parse balance assertions
...
Parser unit test is commented out until HTF tests are fixed.
2013-05-28 16:22:30 -07:00
Clint Adams
1cbe6c95b2
Add cabal testsuite for hledger-lib.
2013-05-15 15:56:01 -04:00
Simon Michael
4ff2635bf8
bump version to 0.20.98 (0.21 alpha)
2013-05-14 10:30:46 -07:00
Simon Michael
1db8920644
bump version to 0.20.0.1
2013-05-04 07:26:15 -07:00
Simon Michael
28a605ceb0
docs: update bug tracker and repository locations in cabal files
2013-05-03 06:46:23 -07:00
Simon Michael
b89168d1b0
bump version number
2013-05-01 12:46:37 -07:00
Simon Michael
a32b0513bd
update tested-withs. hledger needs 7.2+, hledger-web needs 7.4+ for now
2013-04-19 12:26:05 -07:00
Simon Michael
fc39b4c25d
the version bump was premature, revert so I can push
...
This reverts commit 1bc8b73159
.
2013-04-19 11:54:26 -07:00
Simon Michael
1bc8b73159
bump version
2013-04-17 17:20:59 -07:00
Simon Michael
e89bd131e9
also fix warnings in UTF8IOCompat
2013-04-12 16:28:29 -07:00
Simon Michael
42385fc8bf
parsing: read dos line endings, deprecate encoding compatibility layer
...
We should now read all text in universal newline mode, so eg journal
files with DOS/windows line endings are fine.
This also deprecates and disables our IO encoding compatibility layer,
which prevented many encoding-related problems with certain platforms
and GHC versions. With modern GHC (7.x) this is now hopefully totally
unnecessary, but the module remains in place just in case.
2013-04-12 16:18:20 -07:00