Commit Graph

97 Commits

Author SHA1 Message Date
Simon Michael
d4965b87ff web: -fweb now builds with simpleserver; the alternate -fwebhappstack builds with happstack
hack-handler-simpleserver is presumably quite a bit easier to install than
happstack, and so far fits hledger's needs just as well, so it is now the
default when installing with -fweb. To build with happstack, use
-fwebhappstack instead.  hledger --version shows which webserver was
built. Also webserver thread management has been simplified so should be
more consistent across platforms.
2010-02-16 03:39:19 +00:00
gwern0
357f56d0f4 de-haskell98 2010-03-09 01:51:21 +00:00
Simon Michael
a50d3e2b71 refactor, allow in-module unit tests
Until now, all unit tests were defined in Tests.hs. Pro: simple, makes
code/test line counting easy. Con: tests are far from code, Tests.hs turns
into a big wall of test code. Now, unit tests can also be defined in modules.

To avoid name clashes and template haskell complexity, a dumb manual
naming scheme is used: any module may export a hunit Test(List) named
tests_ModuleName. These are manually aggregated and re-exported when
appropriate, eg in Commands.All and finally in Tests.hs.
2010-03-08 21:47:36 +00:00
Simon Michael
306013e21e refactor 2010-03-07 15:32:48 +00:00
Simon Michael
abcc831b5a register: fix a Prelude.head error with reporting interval, --empty, and --depth 2010-02-16 21:45:40 +00:00
ob
8937ed457d GHC 6.12.1 has UTF8 support on board. Using System.IO.UTF8 can cause problems.
Therefore use System.IO.UTF8 only on previous versions.
Testet with GHC 6.10.4 and 6.12.1
2010-02-13 20:00:34 +00:00
Simon Michael
736897998f web: use today as default when adding with a blank date 2009-12-12 22:21:51 +00:00
Simon Michael
4acc2c55ea web: first cut at preserving encoding during add, assumes utf-8 (#15) 2009-12-12 22:08:28 +00:00
Simon Michael
73ecaec6c9 add: ctrl-d doesn't work on windows, suggest ctrl-c instead 2009-12-18 04:32:28 +00:00
Simon Michael
50200e38ed more cleanup, move journal text into Journal 2009-12-21 05:43:10 +00:00
Simon Michael
4d5d9214b1 web: re-enable account/period fields, they seem to be fixed, along with file re-reading (#16) 2009-12-21 05:53:08 +00:00
Simon Michael
2edb9e4a79 register: make reporting intervals honour a display expression (#18) 2009-12-21 06:03:34 +00:00
Simon Michael
86020e8f4a web: remove debug print 2010-02-03 21:20:32 +00:00
Simon Michael
3a8906b956 resolve conflicts (Make previous entered day a default one) 2010-02-03 22:53:55 +00:00
Simon Michael
8274de5e92 resolve conflicts (Add: --no-new-accounts: don't allow to create new accounts) 2010-02-03 22:49:02 +00:00
Roman Cheplyaka
acecc28ce5 Make previous entered day a default one 2010-02-03 01:56:36 +00:00
Roman Cheplyaka
b2e89a8c13 Add: --no-new-accounts: don't allow to create new accounts 2010-02-03 01:23:14 +00:00
Simon Michael
8310eaa6ff resolve conflicts/explain (Add: filter relevant transactions by account)
Previously, we supported "hledger add [DESCRIPTION]". A DESCRIPTION just
pre-filled the description field and bypassed that prompt, after which
existing transactions with similar descriptions were offered as
defaults/reminders.

Now, we support "hledger add [ACCOUNTPATTERN]" instead. After the
description prompt, existing transactions with similar descriptions *and*
which match ACCOUNTPATTERN are offered as defaults. This can be helpful eg
with a multi-person ledger, to match only your own transactions.
2010-02-04 15:57:19 +00:00
Roman Cheplyaka
20b243a3a3 Add: filter relevant transactions by account 2009-10-11 20:12:10 +00:00
Simon Michael
3aba40c5b6 fix warnings 2010-02-04 18:32:54 +00:00
Simon Michael
812a800303 stats: fix number of accounts 2010-02-06 20:47:14 +00:00
Simon Michael
0734da2bbe chart: handle positive/negative balances better; tune defaults
Mixed positive and negative balances were confusing things. Now, the chart
will omit any balances which do not match the sign of the first balance.
Various other size/font/colour tweaks. 

Charts are now red for positive balances (like expense accounts) and green
for negative balances (like income accounts). This is fun, but falls down
for eg assets and liabilities.. better ideas welcome.
2010-02-06 21:45:41 +00:00
Simon Michael
160f8dc5b8 chart: show top 10 (or --items N) accounts, sorted by amount 2010-02-05 01:18:51 +00:00
Simon Michael
71c6b13717 chart: filter based on opts & args 2010-02-04 21:11:59 +00:00
Simon Michael
a2b8faa4d6 big refactoring, do filtering afresh in each command
We now do data filtering/massage as late as possible, not just once at
startup. This should work better for multiple commands, as with web or ui.
The basic benchmark seems at least as good as before thanks to laziness.
2009-12-21 05:23:07 +00:00
Simon Michael
7bd14a367a web: get static files from the cabal data dir, or the current dir when using make (#13) 2009-12-18 22:33:02 +00:00
Simon Michael
60bda57a26 drop LedgerPosting, it's no longer needed; more rename cleanups 2009-12-19 05:57:54 +00:00
Simon Michael
ec95b0723c make Postings reference their parent Transaction
With this change, Transactions and Postings reference each other
co-recursively.  This makes constructing them more tedious, but it
may also allow LedgerPostings to be dropped and code to be simplified.
Time and space performance of register and balance is as before.
2009-12-19 03:44:52 +00:00
Simon Michael
f1813fbb0e more LedgerTransaction/Transaction/LedgerPosting field renames 2009-12-16 17:58:51 +00:00
Simon Michael
30b83bb105 rename LedgerTransaction to Transaction 2009-12-16 08:07:26 +00:00
Simon Michael
39fd143c84 web: update help link 2009-12-12 20:32:10 +00:00
Simon Michael
0656d575ac rename Transaction to LedgerPosting 2009-12-16 07:58:06 +00:00
Simon Michael
2e9b27da0d rename RawLedger to Journal 2009-12-16 07:00:43 +00:00
Simon Michael
83f9aa5693 resolve conflicts (New command 'chart': generate balances pie chart) 2010-02-04 20:59:07 +00:00
Simon Michael
885ec16f58 chart: messing with colours 2010-02-06 16:08:51 +00:00
Roman Cheplyaka
e96350c3f1 New command 'chart': generate balances pie chart 2009-09-26 22:53:54 +00:00
Simon Michael
87fc165918 note an issue 2009-08-26 17:19:26 +00:00
marko.kocic
cca81d199f Hlint: Error: Use better pragmas 2009-09-22 12:22:44 +00:00
marko.kocic
52e167f5e4 Hlint: Error: Use notElem 2009-09-22 12:38:18 +00:00
marko.kocic
469550b640 Hlint: Error: Use uncurry 2009-09-22 12:40:12 +00:00
marko.kocic
1e6f38eb41 Hlint: Error: Use unless 2009-09-22 12:43:30 +00:00
Simon Michael
c9cb3d4399 hlint: use on 2009-09-23 17:59:24 +00:00
Simon Michael
092c9ad7a7 web: change probably misleading startup message 2009-09-23 22:33:19 +00:00
Simon Michael
bb50382446 web: interim port fix, use port 5000 as before 2009-09-23 23:17:29 +00:00
Simon Michael
fc117d504c web: call print command "journal", make it default; hide histogram command 2009-11-19 19:15:33 +00:00
Simon Michael
6d931ce54d web: quick fix for bad localhost redirect 2009-09-23 22:32:52 +00:00
Simon Michael
40f61be1e3 web: several tweaks 2009-09-23 23:36:37 +00:00
Simon Michael
70e33a5fdf web: allow arbitrary commodities and an implicit second amount in add form 2009-11-19 19:18:29 +00:00
Simon Michael
34019d5973 fix ghc warnings in new web code 2009-09-23 22:24:38 +00:00
Simon Michael
0ddd3ca05a web: support full date syntax in add form 2009-11-19 20:43:06 +00:00