Simon Michael
78837c66a6
parsing: fix test breakage due to new csv rules format ( fixes #102 )
2013-04-12 14:59:28 -07:00
Simon Michael
616a25979a
CSV reader version 2 with new rules syntax
...
At long last. The main change is a new rules file format that aims to
be more powerful and more intuitive than v1 (hledger 0.19.x and older).
Existing rules files will need to be adapted manually to the new format.
2013-03-29 22:56:55 +00:00
Simon Michael
af5c0e80e0
parsing: read files in universal newline mode
...
Line endings other than the unix style, are now accepted in journal and rules files.
2013-03-29 18:46:10 +00:00
Simon Michael
7b6a59123d
eolof parser matches end of line or end of file
2013-03-29 18:42:00 +00:00
Simon Michael
69f2491224
export journal file code parser
2013-02-24 21:07:54 +00:00
Simon Michael
621a91807e
rename actual/effective dates to primary/secondary
...
The command-line flag is now --date2. Alternate spellings --effective and --aux-date
are accepted for compatibility.
2012-12-06 04:43:41 +00:00
Simon Michael
869ff2528a
accept normal simple date syntax in posting dates, give an error on bad date syntax here
2012-12-06 03:23:56 +00:00
Simon Michael
20e68f23a8
support effective dates on postings as well
...
We now preserve all dates while reporting, instead of overwriting one with the other.
2012-12-06 02:41:37 +00:00
Simon Michael
e75abc4625
parse posting dates, better comment/tag handling, begin using HTF for unit testing
2012-12-06 00:28:23 +00:00
Simon Michael
4aafeb32e6
refactor: clean up Posting construction
2012-12-06 00:03:07 +00:00
Joachim Breitner
f0372bdd93
Also parse ! as a modifier, like *
2012-12-03 21:38:05 +00:00
Simon Michael
6eda8c4bbf
csv reader: append ".rules" to the original file name instead of replacing its extension
2012-11-26 01:56:39 +00:00
Simon Michael
afb4fb0356
csv reader: parse parenthesised amounts as negative
2012-11-26 01:56:01 +00:00
Simon Michael
8b4a99c4d5
79: convert: add a skip-lines directive (Magnus Henoch)
2012-11-18 18:21:52 +00:00
Simon Michael
1c6a7d8a6f
rename the commodityless amount constructor to num
2012-11-20 02:22:20 +00:00
Simon Michael
45d4a38cc7
refactor: setAmountPrecision -> withPrecision
2012-11-19 23:24:04 +00:00
Simon Michael
64180b18ef
refactor: clarify that price amounts have only a single commodity
2012-11-19 23:17:55 +00:00
Simon Michael
8c06553e3b
refactor: make amount price a non-maybe, reducing noise
2012-11-19 22:39:08 +00:00
Simon Michael
4567e91409
refactor: move amount display settings out of commodity, simplify amount construction
2012-11-19 21:20:10 +00:00
Simon Michael
1c1058be4e
70: ignore ledger's fixed lot price declarations
2012-11-17 02:40:27 +00:00
Simon Michael
28baf926f7
parsing: ignore ledger-style balance assertions ("= BAL" after a posting's amount)
2012-11-02 16:50:36 +00:00
Simon Michael
5b9c5459be
web: make hledger[-lib] compatible with all of yesod's language extensions
...
Useful when building all of hledger-web at once.
2012-11-14 17:25:02 +00:00
Simon Michael
2a4d89bb27
expose more utilities from CsvReader
2012-05-29 21:00:49 +00:00
Simon Michael
0b96a767b4
support tilde (~) in journal and rules file paths
2012-05-30 08:36:01 +00:00
Simon Michael
776ad2a098
remove ensureRulesFile debug trace
2012-05-30 08:36:34 +00:00
Simon Michael
34318906d8
register, print: fix reverse ordering of same-day transactions
2012-06-29 18:06:58 +00:00
Simon Michael
33b7c91e20
combine journal updates with foldl' instead of foldr
...
on general principles, even though it makes no measurable difference
2012-05-30 10:19:08 +00:00
Simon Michael
9a239789fa
apply journal updates in the order they were parsed, not the reverse (!)
...
Fixes the order of include files in stats command.
2012-05-30 10:16:37 +00:00
Simon Michael
50068221c3
fix build warnings in all GHC versions
2012-03-29 21:19:35 +00:00
Simon Michael
b77ba66fb1
haddock fix
2012-05-15 01:51:14 +00:00
Simon Michael
9524e6d927
more metadata -> tag renaming in the parser
2012-05-28 00:24:49 +00:00
Simon Michael
1062e2f9a4
clean up reader selection, don't write a csv rules file on journal parse error
2012-05-28 18:40:36 +00:00
Simon Michael
cb905a741c
new query by tag implementation
2012-05-28 00:27:55 +00:00
Simon Michael
2fb2aea056
rename metadata fields to tags
2012-05-27 22:59:06 +00:00
Simon Michael
3ee6a351f3
big query/tests/show refactoring
...
- use new query system for command line too, filterspec is no more
- move unit tests near the code they test, run them in bottom up order, add more
- more precise Show instances, used for debugging not ui
2012-05-27 18:14:20 +00:00
Simon Michael
56cf9b21cb
fix txn & posting comment parsing & printing; better unit tests
2012-05-15 01:49:05 +00:00
Simon Michael
a58a5f96ad
more robust comments & metadata, on postings too, and document as "tags"
2012-05-14 18:52:22 +00:00
Simon Michael
88212f26e8
simplify journal parser names
2012-05-09 15:34:05 +00:00
xiaoruoruo
ce83876700
metadata parse and show for transaction
2012-04-08 19:13:56 +00:00
Simon Michael
8492f6cae4
fix unicode handling on GHC >= 7.2, unify utf8 IO compatibility layer
...
tests pass again from GHC 6.12.3 to 7.4.1
2012-03-29 19:06:31 +00:00
Simon Michael
d4451ce5e3
read system cleanup, require conversion rules from a file to simplify API
2012-03-24 18:08:11 +00:00
Simon Michael
e396c0dc8d
push csv rule and format string types down
2012-03-24 01:58:34 +00:00
Simon Michael
6eb7ad28e1
refactor/beef up readJournal/readJournalFile
2012-03-23 16:21:41 +00:00
Simon Michael
4d7a809c4a
cleanups and early code for csv reader based on convert
2012-03-10 21:55:48 +00:00
Simon Michael
381ebea35c
show correct line number for posting parse errors ( #67 )
2011-10-04 23:39:53 +00:00
Simon Michael
8d62452260
parsing: historical price directives may contain a numeric time zone, like ledger; note that the time is ignored
2011-06-01 01:50:04 +00:00
Simon Michael
946e5ffcbc
parsing: parse time of day more carefully
2011-05-31 22:45:54 +00:00
Simon Michael
1f24e025da
parsing: make bad date parse error more reliable
2011-05-31 19:49:37 +00:00
Simon Michael
a44aa8d7d2
refactor: remove unnecessary LANGUAGE CPP pragmas
2011-07-17 23:29:57 +00:00
Simon Michael
1273f02a9a
more balance/amount clarifications and a test
2011-08-30 11:37:36 +00:00