Commit Graph

772 Commits

Author SHA1 Message Date
Simon Michael
62bad65e5b tighten up status: docs and behaviour a bit (fix #227)
A status: query term no longer accepts * as a synonym for 1,
which was a bit confusing since 1 matches both * and !.
For now, it takes a value of 1 (true) or anything else (false).
2014-12-24 23:48:23 -08:00
Simon Michael
c138c35d3b register: support date:/date2:/--date2 better (fix #201, #221, #222) 2014-12-24 16:11:30 -08:00
Simon Michael
d1404adf3f note lack of date2 support in (eg) postingsReport 2014-12-24 14:54:56 -08:00
Simon Michael
6780c63ab3 simplify null Date2 queries too 2014-12-24 14:54:56 -08:00
Simon Michael
77c2c90290 cli: parse date2: correctly (#222) 2014-12-24 14:54:56 -08:00
Simon Michael
68a4adb0bd doc: draft changelogs for all three packages 2014-12-21 12:01:11 -08:00
Julien Moutinho
c65fea2b4b lib: fix combineJournalUpdates folding order
NOTE: this is important to correctly build JournalContext
NOTE: currently a list reverse must done at the end,
      maybe using a Data.Queue would be more efficient.
2014-12-11 04:37:10 +01:00
Simon Michael
855d4e1131 balance: with --tree and --flat, use the last (fix #219) 2014-12-05 12:56:33 -08:00
Simon Michael
d352bbedd2 cli: with a repeated flag, the last takes precedence
This is helpful eg for customising your reporting command aliases on the fly.
2014-12-04 12:41:47 -08:00
Simon Michael
bd39e5df99 showDateSpan: handle boundary-crossing 1-day spans
Eg recognise that 2014/11/30-2014/12/1 can be abbreviated to
2014/11/30d, similarly 2014/12/31-2015/1/1. Doesn't handle feb 29th
correctly, so eg 2000/2/28-2000/3/1 is wrongly abbreviated to
2000/2/28d.
2014-12-03 18:18:05 -08:00
Simon Michael
1708f0b441 csv: try to preserve order of same-day transactions
If the CSV records appear to have been in reverse date order,
we'll now reverse them all before also sorting by transaction date,
so that the original order of same-day transactions is preserved.
We detect this using a simple heuristic: if the first converted
transaction's date is later than the last's.
2014-12-02 11:16:51 -08:00
Simon Michael
733a7b12ef csv: include path is relative to current (close #198) 2014-12-02 10:50:31 -08:00
Julien Moutinho
cf28985cf2 lib: move from Text.ParserCombinators.Parsec to Text.Parsec
NOTE: required to use liftIO in includedirective
SEE: http://www.vex.net/~trebla/haskell/parsec-generally.xhtml#IO
2014-11-20 10:08:30 +01:00
Simon Michael
23fb4ffd84 export failIfInvalidMonth/Day (fixes #216) 2014-10-30 07:58:15 -07:00
Simon Michael
a2612f17c6 tweak wording 2014-10-29 08:27:52 -07:00
Simon Michael
d25fe21834 apply all matching account aliases, not just one directive and one option 2014-10-29 08:20:27 -07:00
Simon Michael
9fa22e0398 account aliases (and regexReplace) now support backreferences 2014-10-29 07:46:49 -07:00
Simon Michael
69636f70fb extract debug helpers into a module 2014-10-28 18:40:22 -07:00
Gergely Risko
6e4a7dff8c Add support for ledger3 style multi-line comments 2014-10-26 19:20:46 +01:00
Simon Michael
e892fdc6d5 parsing: aliases now match by regular expression
alias match patterns (the part left of the =) are now case-insensitive
regular expressions matching anywhere in the account name. The
replacement string (the part right of the =) can replace multiple
matches within the account name. The replacement string does not yet
support any of the usual syntax like backreferences.
2014-10-24 15:05:10 -07:00
Simon Michael
be9b637e0c fix a regexReplaceCI bug 2014-10-24 15:04:21 -07:00
Simon Michael
bfedf367c4 export Regexp types, disambiguate CsvReader's 2014-10-24 14:30:49 -07:00
Simon Michael
f064ecf138 fix a splitAtElement bug with adjacent separators 2014-10-24 14:30:00 -07:00
Simon Michael
b6774f47a3 balance, print: add -o and CSV output here too
Not very elegant yet, but works.
2014-10-21 12:02:23 -07:00
Simon Michael
7f6cf1f849 balance, register, register-csv: depth 0 shows summary items (#206)
Previously, a depth:0 query produced an empty report (since there are no
level zero accounts). Now, it aggregates all data into one summary item
with account name "...".

This makes it easier to see the kind of data Gwern was looking for from
register-csv (net worth over time). Eg this shows one line per month
summarising the total of assets and liabilities:

hledger register-csv -- -MHE ^assets ^liabilities depth:0

Single and multi-column balance reports behave similarly.
2014-10-19 17:53:20 -07:00
Simon Michael
0620ec9840 fix redundant compilation in the hledger packages, at last
This seems to work well now with my haddock and GHC 7.8.
Not tested with GHC 7.6 though.
2014-10-19 09:37:18 -07:00
Simon Michael
e8a58d9388 cli: add a hidden --version+ flag showing number representation (#118) 2014-10-18 12:35:58 -07:00
Simon Michael
3b70362525 switch to Decimal for representing quantities (closes #118)
hledger has represented quantities with floating point (Double) until
now.  While this has been working fine in practice, the time has come to
upgrade our number representation to something more principled: Decimal,
for now. As a bonus, this brings a ~30% speed boost to most reports.

We'll keep the old representation(s) around for a while, selectable via
hledger-lib cabal flag, for research/testing/benchmarking purposes. To
build with the old Double representation: cabal install -fdouble
hledger-lib hledger hledger-web
2014-10-18 12:33:31 -07:00
Simon Michael
e888be0bf4 clarify similarAmountsOp doc 2014-10-18 10:45:17 -07:00
Simon Michael
2b39f68682 fix a warning in TransactionsReports 2014-10-18 10:32:01 -07:00
Simon Michael
84a90374b4 make build warnings consistent 2014-10-18 10:16:22 -07:00
gwern
d1618aaca8 strip trailing whitespace from all Haskell files 2014-10-14 18:48:24 -07:00
Simon Michael
22279978af revert an unnecessary "fix" in efe7c7a that broke tests 2014-09-13 21:28:48 -07:00
Simon Michael
5d403c2bb7 doc: changelogs (resolve conflicts)
Conflicts:
	hledger-lib/CHANGES
	hledger-web/CHANGES
2014-09-12 18:41:35 -07:00
Simon Michael
efe7c7a029 journal: dates should be followed by whitespace or newline 2014-09-06 09:20:22 -07:00
Simon Michael
aa85e786b9 register: describe datespans briefly, like balance
Eg instead of 2014/01/01 - 2014/01/31, show 2014/01, as in a multicolumn
balance report. The data model is not very elegant, but works for now.
2014-08-08 07:34:11 -07:00
Simon Michael
c485017ca6 journal: require consistent separators in a Y/M/D date
Date separators can be /, - or . but only one kind should be used in
each date. Eg we now reject 2014-8/1.
2014-08-08 07:29:02 -07:00
Simon Michael
3e27f4fb8b journal: add p suffix to date[time] parsers 2014-08-08 07:29:02 -07:00
Simon Michael
a0010a294f cli: smart dates must use a consistent separator
Along with the preceding commits, this means that date:2014-8/1 is now
parsed as 2014/01/01-2014/08/01 as intended, not 2014/08/01.
2014-08-08 07:21:02 -07:00
Simon Michael
632dee668d parse period expressions and date: more strictly
Period expressions and date: query terms must now be parseable all the
way to their end; we won't ignore unparseable trailing bits.
2014-08-08 07:21:02 -07:00
Simon Michael
a675b99870 query: report an error when date:D fails to parse
Previously, a date:D query term was just ignored if D could not be
parsed as a date.
2014-08-08 07:21:02 -07:00
Simon Michael
f631e8e063 register: --average implies --empty
The -A flag now enables -E, so that with a report interval the averages
are always per-period and not per-report-line. (Without a report
interval, -E is already the default).
2014-08-07 14:03:56 -07:00
Simon Michael
d0ad571321 fix manual url in default CSV rules file 2014-08-07 13:15:40 -07:00
Julien Moutinho
a6190420b2 data: add source location to transactions 2014-08-07 16:38:44 +02:00
Simon Michael
3ce34b145c add missing dbgN helpers 2014-07-28 18:57:54 -07:00
Simon Michael
40ab1e17f6 amounts cleanups, and support zeros with commodity 2014-07-28 18:45:13 -07:00
Simon Michael
1333b2650a more showDateSpan cleanup 2014-07-26 17:07:36 -07:00
Simon Michael
a7f7c3181f balance: show compact headings for common intervals
In periodic multicolumn balance reports, column headings now show a more
compact description of common periods (years, half-years, quarters,
months, weeks) for better readability and screen space efficiency.
2014-07-26 16:54:18 -07:00
Simon Michael
f2d9c6e9c1 web: more register chart improvements
- show a background color for future and less-than-zero regions
- show points for transactions, not all line corners
- hovering over point shows balance, date, posted amount and transaction
- clicking a point scrolls towards that date
2014-07-18 16:45:46 -07:00
Simon Michael
4333cae43f web: register chart improvements
- bigger
- plot is horizontal when balance is not changing
- legend for commodities
- some work towards stable commodity colors
2014-07-17 18:56:55 -07:00
Simon Michael
663c68e8e2 web: fix 0s with search by acct within a register 2014-07-17 16:53:36 -07:00
Simon Michael
d3ede5d676 web: remove debug code 2014-07-17 16:29:14 -07:00
Simon Michael
441cae645f web: account transactions report, register clarifications
Clarify the semantics and code of account transactions report a bit.

In the web account register view, emphasise the "historical balance" vs
"running total" distinction; show it as a label for the chart as well,
to reduce confusion.
2014-07-17 16:20:34 -07:00
Simon Michael
b3da48aaa0 identify the commodity in balance assertion errors
Now that balance assertions are checking only a single commodity, it can
be confusing. Eg say all your amounts are in dollars, an assertion like
"= 0" checked the dollar balance in hledger 0.23 but always succeeds in
hledger 0.24. When an assertion fails, we now report which commodity was
checked to help troubleshooting.
2014-07-17 15:23:03 -07:00
Simon Michael
528913d1bd balance: -E adds all starting accounts to multicol rpts
multicolumn balance reports only show accounts with activity (postings)
during the report period, by default. Sometimes you want to show
accounts which have an interesting balance, even if they have no
activity during the period. -E now does this, in addition to showing
leading & trailing empty columns.
2014-07-17 15:18:40 -07:00
Simon Michael
8aec855d04 note dbg0 is like ltrace 2014-07-17 15:06:28 -07:00
Simon Michael
2bfbdd175b queryEndDate 2014-07-15 07:01:01 -07:00
Simon Michael
19d42f8c99 clarify failed balance assertion message 2014-07-15 06:55:46 -07:00
Simon Michael
9f991fa94b tweak Regex haddock 2014-07-08 11:50:19 -07:00
Simon Michael
5bebc2beb0 regex haddock fix 2014-07-06 14:08:45 -07:00
Simon Michael
3a16e6cfc7 mostly replace slow regexpr with regex-tdfa (fixes #189) 2014-07-06 14:03:28 -07:00
Simon Michael
04f6162e19 extract regular expression utils module 2014-07-06 10:11:02 -07:00
Simon Michael
16f8b78305 balance: show multi-commodity amts on one line (fixes #186)
To avoid totally breaking the layout of multicolumn balance reports when
there are multi-commodity balances, these are now rendered on a single
line, comma separated. Simple balance reports still use the old vertical
format for now.
2014-07-03 07:45:55 -07:00
Simon Michael
c31710d942 look harder for decimal point & digit groups (fixes #196)
Amount display styles have been reworked a bit; they are now calculated
after journal parsing, not during it. This allows the fix for #196:
we now search through the amounts until a decimal point is detected,
instead of just looking at the first one; likewise for digit groups.
Digit groups are now implemented with a better type.

Digit group size detection has been improved a little:
1000,000 now gives group sizes [3,4,4,...], not [3,3,...], and
10,000 gives groups sizes [3,3,...] not [3,2,2,..].
(To get [3,2,2,...] you'd use eg 00,00,000.)

There are still some old (or new ?) issues; I don't think we handle
inconsistent decimal points & digit groups too well. But for now all
tests pass.
2014-07-02 23:26:16 -07:00
Simon Michael
647d5833ff clarify dbgAtM issue 2014-07-02 23:24:58 -07:00
Simon Michael
330dfe6891 commodity & amount style parser cleanups, part 2 2014-07-02 17:41:33 -07:00
Simon Michael
9b4b85b4bf commodity & amount style parser cleanups 2014-07-02 11:23:30 -07:00
Simon Michael
8ae303f685 assert only a single commodity, like Ledger (fixes #195)
This change means you can make assertions on a multi-commodity account
balance (asserting one commodity at a time). On the flip side, you can
no longer assert the complete balance of an account (new unexpected
commodities will not be detected.) We might restore that ability later,
using the == syntax.
2014-07-02 07:35:06 -07:00
Simon Michael
0c3148ac7b add an --ignore-assertions flag
Can be helpful when reading Ledger files, where assertions may have
different semantics; or for getting some answers from your journal
to help you fix your assertions.

Could be called --no-assertions, but this might create surprise when it
has an effect contrary to --no-new-accounts.

I had to add another flag throughout the parsers & journal read
functions, ok for now.
2014-07-01 18:26:37 -07:00
Simon Michael
04cfdac0ce query: add >= and <= for amt queries 2014-06-29 11:09:13 -07:00
Simon Michael
201521dc5a a few tweaks 2014-06-24 14:51:09 -07:00
Simon Michael
2eb74d19c6 changelog 2014-06-21 20:14:11 -07:00
Simon Michael
6393293414 allow transformers 0.4* 2014-06-21 20:13:16 -07:00
Simon Michael
5af4ef33ab web: fix a warning 2014-06-13 00:21:26 +01:00
Simon Michael
ec51d28839 web: a bunch of ui cleanup & improvement
- the web UI has been streamlined; edit form, raw & entries views dropped
- we now remember whether sidebar is open or closed
- better help dialog
- keyboard shortcuts are now available
- better add form
- more bootstrap styling
- static file cleanups
- report filtering fixes
- upgrade jquery to 2.1.1, bootstrap to 3.1.1, drop select2, add typeahead, cookie, hotkeys
- clarify debug helpers a little
- refactoring
2014-06-13 00:19:00 +01:00
Simon Michael
34f4800e82 Revert "remove Setup.hs files again, fixing a yesod devel warning"
Setup.hs are required by the Hydra buildbot.

This reverts commit 97ab3db8f0.
2014-05-24 13:39:09 -07:00
Simon Michael
b22cb66319 refactor amount filtering helpers 2014-05-23 13:10:36 -07:00
Simon Michael
97ab3db8f0 remove Setup.hs files again, fixing a yesod devel warning
These were removed and re-added in 2011 because "hackage needed them".
Let's try again.
2014-05-23 09:04:00 -07:00
Simon Michael
cf3d21afef csv and general reader fixes, cleanups
- The CSV reader no longer writes a "(stdin).rules" file when reading
  from stdin.

- Selection of reader(s) is now smarter when input is coming from stdin.
  Previously, all readers were considered applicable for stdin.  This
  meant that when reading a CSV file from stdin, the journal and timelog
  readers were always tried first, and if the CSV file was unparseable,
  you'd see the first (journal) reader's error instead of the CSV
  reader's.  Now, the readers do some basic content sniffing when
  reading stdin, so it generally tries only the one right reader and
  we'll see the right errors.

- The read system now has more debug output.
2014-05-09 17:55:32 -07:00
Simon Michael
6871c4cce5 dbgtrace, does a trace if --debug was used 2014-05-09 17:52:23 -07:00
Simon Michael
2bba4dbe3c update changelogs 2014-05-08 14:35:20 -07:00
Simon Michael
25ccead21c register: also fix date (or date2) sorting of postings (#184) 2014-05-08 14:20:12 -07:00
Simon Michael
2bd785c3fb aregister: fix date filtering with disordered txns (fixes #184)
Fix a refactoring-related regression that the tests missed: if
transactions were not ordered by date in the journal, register
could include postings before the report start date in the output.
2014-05-07 06:31:34 -07:00
Simon Michael
88f18adbc4 show posting dates in debug output 2014-05-06 21:35:38 -07:00
Simon Michael
41add3ffeb oh fine still cant do that, bump to 0.23.98 2014-05-03 17:18:12 -07:00
Simon Michael
87f1e83d78 bump version to 0.24dev 2014-05-03 15:51:57 -07:00
Simon Michael
4740c7082e csv: allow an empty first name in fields list (fixes #178) 2014-05-03 15:05:35 -07:00
Simon Michael
dedd26bbf5 csv: don't count fields in skipped lines (fixes #177) 2014-05-03 14:54:15 -07:00
Simon Michael
07a82724ed lib, cli, web: change from "beta" to "stable"
Also add the hackage Console category to the first two.
2014-05-01 08:20:05 -07:00
Simon Michael
1eeedfe551 bump versions to 0.23 2014-05-01 08:17:17 -07:00
Simon Michael
524bfe73c6 final changelogs 2014-05-01 08:14:36 -07:00
Simon Michael
a28d4fd400 register: drop --display, use --historical instead
We provided a very limited implementation of --display only for one use
case: to see an accurate running balance. Now that is achieved more easily
with -H/--historical, similar to the balance command, and --display
can be dropped.
2014-04-30 17:24:41 -07:00
Simon Michael
0132ed7bea balance: a fix for starting balance with --date2 2014-04-30 17:20:02 -07:00
Simon Michael
70ad5b26ff journal: really don't parse + before an amount as part of the commodity (fixes #181 harder) 2014-04-30 11:28:47 -07:00
Simon Michael
8341b4a8d3 journal: don't parse + before an amount as part of the commodity (fixes #181) 2014-04-30 11:21:01 -07:00
Simon Michael
7d579adb0e changelog updates 2014-04-28 00:55:14 -07:00
Simon Michael
084bf8fea8 queries: treat amt:>0 like amt:>+0
Similar to the special case for amt:<0, for convenience.
To test that the absolute quantity is greater than 0, ie that the
quantity is non-zero, use not:amt:0.
2014-04-27 23:59:11 -07:00
Simon Michael
eeb48c86d1 default report dates come from secondary dates with --date2 2014-04-24 14:44:30 -07:00
Simon Michael
3ed82bd231 default report dates now include postings dated outside the transaction dates span
journalDateSpan now looks at posting dates as well as transaction dates.
2014-04-24 14:28:20 -07:00
Simon Michael
c9d60fab73 balance, register: fix --date2 with report intervals 2014-04-19 15:54:58 -07:00
Simon Michael
d46b290287 update tested-withs 2014-04-19 12:16:14 -07:00
Simon Michael
4ef33c012a register: report intervals now include all postings in the interval
As with balance. For example, register -p 'weekly in jan' generates
these intervals: 2013/12/30-2014/01/05, 2014/01/06-2014/01/12,
2014/01/13-2014/01/19, 2014/01/20-2014/01/26, 2014/01/27-2014/02/02.
With this change, postings on 2013/12/30-31 and 2014/2/1-2 will be
included in the report, so all period totals are complete and
comparable.
2014-04-19 11:47:05 -07:00
Simon Michael
6af5e6fe06 note potentially useful interval algebra link 2014-04-19 11:45:47 -07:00
Simon Michael
d0461c3ef7 cleanup 2014-04-19 11:26:01 -07:00
Simon Michael
3dd0894349 fix a warning 2014-04-19 11:25:45 -07:00
Simon Michael
6743f8c2a1 balance: multicolumn now includes all postings in the displayed periods 2014-04-19 08:45:46 -07:00
Simon Michael
1fca3e7472 orDatesFrom -> spanDefaultsFrom 2014-04-19 08:38:03 -07:00
Simon Michael
f94d784f48 changelog updates from release branch
give hledger-lib a changelog, update changelogs

(cherry picked from commit a67cee4e5f)

Conflicts:
	hledger/CHANGES

update changelogs

(cherry picked from commit ef053a4252)

web: changelog

(cherry picked from commit 105c1d0142)

web: changelog

(cherry picked from commit 3d42c123be)
2014-04-17 12:36:00 -07:00
Simon Michael
01e5a2245d clarify balance assertion error slightly 2014-04-16 14:45:41 -07:00
Simon Michael
f0167013ce queries: treat amt:<0 like amt:<+0 as a convenience 2014-04-16 10:48:56 -07:00
Simon Michael
dd1f58b785 balance: oops, note multicolumn reports not yet using all period data
87e2d49 seems to work only in GHCI, gives <<loop>> when compiled.
2014-04-15 17:19:55 -07:00
Simon Michael
9d10cfa180 fix single-quote-containing addon arguments harder 2014-04-15 13:07:43 -07:00
Simon Michael
0d1d3ed057 fix an error when running an addon with an argument containing a single quote
More crazy quote engineering.. seems more robust than before.
2014-04-15 11:45:30 -07:00
Simon Michael
87e2d49714 balance: multicolumn reports now use all data in the displayed periods
Previously, the first period's heading would show the start date of a
full period, but postings after this date but before the user-specified
report start date were not shown. Now those postings will be included,
making the first column's numbers more correct. Similarly, the report
end date is now adjusted to the displayed end date on the last column.
2014-04-14 13:10:34 -07:00
Simon Michael
d008c810dc balance: restore prefix on debug output from multibalance reports 2014-04-14 12:08:06 -07:00
Simon Michael
5885914547 refactor & use reportSpans 2014-04-14 08:31:57 -07:00
Simon Michael
020975555e clarify splitSpan function 2014-04-14 08:31:34 -07:00
Simon Michael
746f22458f fix a warning 2014-04-14 08:31:11 -07:00
Simon Michael
a761ae5b86 balance: support --date2 in multicolumn reports (cf #174) 2014-04-13 15:14:07 -07:00
Simon Michael
424db9a09e register: support --date2 with a report interval (fixes #174) 2014-04-13 14:57:40 -07:00
Simon Michael
2af04ec2fc balance: merge/improve multicol report implementations
Periodic, cumulative and historical multicolumn balance reports are now
generated by one code path, which helps with consistency and reducing
the bug/test surface. --tree now also works with --cumulative or
--historical.
2014-04-13 12:49:05 -07:00
Simon Michael
c93b19cb10 more debug utils, dbg0/dbg1/dbg2 2014-04-13 12:49:05 -07:00
Simon Michael
a4a332e64f drop sym: entirely in favour of cur: 2014-04-08 15:55:40 -07:00
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