Commit Graph

1419 Commits

Author SHA1 Message Date
Simon Michael
bb36693155 lib: refactor, txnTieKnot automatically 2018-08-02 08:25:49 +01:00
Simon Michael
572f5a4b31 lib: drop parseAndFinaliseJournal', seems unused (api change) 2018-08-02 08:25:49 +01:00
Simon Michael
a49b1cd3bb lib: AutoTransaction.hs -> TransactionModifier.hs, PeriodicTransaction.hs 2018-07-30 20:22:39 +01:00
Simon Michael
efc54c4c25 lib: ModifierTransaction -> TransactionModifier; try to clarify a bit 2018-07-30 19:38:21 +01:00
Simon Michael
007b9f8caa lib: capitalised month names broke some period expressions (fix #852)
This was a regression in hledger 1.10.
mon[th]Index are now case insensitive.
2018-07-30 11:08:23 +01:00
Simon Michael
daa37a9993 lib: nthdayof(month|year)containing now validate input a bit (#852) 2018-07-30 11:08:14 +01:00
Simon Michael
0f3a030a40 lib: whitespace 2018-07-30 11:05:02 +01:00
Simon Michael
eb6baac6e7 lib: make applyN more robust (#852) 2018-07-30 11:04:33 +01:00
Simon Michael
d9d94e2cf6 journal: fix breakage in auto posting rule parser (#745)
I was negligent and did not test enough. This should ignore
transaction comments in auto posting rules more safely.
It also adds support for trailing comments on the first line of auto
posting rules, which previously were misparsed as part of the query.
2018-07-26 15:54:21 +01:00
Simon Michael
e2f5e98926 lib: clarify account name parsing rules 2018-07-26 08:30:32 +01:00
Simon Michael
41c985b5fb journal: ignore transaction comments in auto posting rules (#745)
Previously they were misparsed as account names.
2018-07-26 08:29:02 +01:00
Joseph Weston
e23160059e lib: add generated man files 2018-07-26 06:12:31 +01:00
Joseph Weston
1fca47cf18 lib: update documentation for globs in 'include' directive 2018-07-26 06:12:31 +01:00
Joseph Weston
f2c1586238 lib: sort the matched include files lexicographically
Now the files are included in the same order as they would be
listed by 'ls'.
2018-07-26 06:12:31 +01:00
Joseph Weston
1ec16c2dc0 lib: explicitly specify that the 'Glob' package should be used
Without this there are conflicts with the 'filemanip' package,
which itself exports a module 'System.FilePath.Glob'.
2018-07-26 06:12:31 +01:00
Joseph Weston
c69b16d826 lib: prefer use of 'parseErrorAt' to generic 'fail'
'fail' will just terminate the current parse branch, whereas here
we have encountered a definite error. Also bring the code to
get the current working directory inside 'getFilePaths', as it
logically belongs there.
2018-07-26 06:12:31 +01:00
Joseph Weston
5077443a84 lib: add tests and code for nonexistant files and malformed globs 2018-07-26 06:12:31 +01:00
Joseph Weston
2c4d0c0acd lib: factor out logic for obtaining a list of files to include 2018-07-26 06:12:31 +01:00
Joseph Weston
2d420a33a4 lib: update cabal file with 'Glob' library depdendency 2018-07-26 06:12:31 +01:00
Joseph Weston
0ade323d2a lib: use glob matching if filename in 'include' directive is a glob pattern 2018-07-26 06:12:31 +01:00
Joseph Weston
96f7a03487 lib: factor out parsing child journal into separate function 2018-07-26 06:12:31 +01:00
Joseph Weston
52da073828 lib: expand current directory separately from filepath
We will need the current directory as an absolute path when
adding glob patterns in a few commits time.
2018-07-26 06:12:31 +01:00
Joseph Weston
9e56ad24e2 lib: reorder code for reading include files
This should be before all journal and parser state manipulations,
so that those can be readily factored in a few commits time.
2018-07-26 06:12:31 +01:00
Simon Michael
aab7d2d964 lib: fix error triggered by upper-case day in period expression (#847) 2018-07-24 14:36:45 +01:00
Simon Michael
da8047d286 lib: type signatures 2018-07-24 14:24:45 +01:00
Simon Michael
fe73f2a6b5 csv: interpolated field names in values are now case insensitive
Field names are supposed to be case insensitive, but a field assignment like

fields  ...,Transaction_Date,...
date %Transaction_Date

was failing, because of the capitalised letters. Fixed now.
2018-07-22 22:26:24 +01:00
Simon Michael
aebd6c50d6 smooth: smoothes out irregular transactions (experimental addon) 2018-07-16 23:36:06 +01:00
Simon Michael
d5430e7ddf clean up debug helpers (api change) 2018-07-16 15:28:58 +01:00
Simon Michael
9d2e80aa2c lib: Debug: simplify pprint, export ppShow as pshow (api change) 2018-07-16 12:51:50 +01:00
Simon Michael
92404bb847 prices: allow filtering by query, clarify docs
Query arguments are allowed, prices can be filtered by date, and
postings providing transaction prices can be filtered by anything.
2018-07-15 09:21:10 +01:00
Simon Michael
91e5baf617 lib: clean up queryDateSpan, queryDateSpan' (api change)
These now intersect date AND'ed date spans, instead of unioning them,
and docs are clearer.
2018-07-15 08:35:39 +01:00
Simon Michael
d461e96c34 doc: update manuals harder, they should say 1.10.99
[ci skip]
2018-07-04 15:09:57 +01:00
Simon Michael
4f40467d86 update embedded manuals 2018-07-04 13:33:27 +01:00
Simon Michael
d62f082bce bump version to 1.10.99 (dev) 2018-07-04 13:32:42 +01:00
Simon Michael
91c487d4c2 doc: manuals: update version strings 2018-07-04 12:52:29 +01:00
Simon Michael
8d6667f698 lib: doc: forecast transaction dates tweak (#835)
[ci skip]
2018-07-04 09:48:32 +01:00
Simon Michael
0322638cf5 lib: doc: clarify how forecast transaction dates work (#835)
[ci skip]
2018-07-04 09:41:12 +01:00
Simon Michael
22f2e90a4b update embedded manuals 2018-06-30 22:08:48 +01:00
Simon Michael
6242b1d784 bump version to 1.10 2018-06-30 22:08:02 +01:00
Simon Michael
6b8fcd7205 changelogs 2018-06-30 21:57:06 +01:00
Simon Michael
937333c2c1 doc: journal: more account codes limitations
[ci skip]
2018-06-27 12:42:05 +01:00
Simon Michael
2959356bd9 doc: journal: note another account codes limitation, in flat mode
[ci skip]
2018-06-27 12:19:25 +01:00
Simon Michael
35e68e23c5 doc: journal: clarify account aliases doc
[ci skip]
2018-06-27 11:44:26 +01:00
Simon Michael
6d215945b6 doc: journal: clarify account aliases doc
[ci skip]
2018-06-27 11:41:11 +01:00
Simon Michael
6924e8390c lib: journal: let alias/apply account affect account directives (#825) 2018-06-27 11:33:12 +01:00
Simon Michael
422f1084c9 doc: journal: note that non-regex alias directive is case sensitive
[ci skip]
2018-06-27 11:15:46 +01:00
Alex Chen
e82b01bcf8 lib: refine parse errors and parser labels 2018-06-20 23:24:39 -06:00
Alex Chen
9674f2a8cc lib: tweak whitespace parsing for better parse errors
- expands the set of expected tokens when e.g. parsing the invalid
  posting `account  $1 a`
- whitespace can affect parse errors because of the longest match rule
  where errors that occur later take precedence over those that occur
  earlier
2018-06-20 23:24:39 -06:00
Alex Chen
ed0106b209 lib: reduce backtracking of various parsers 2018-06-20 23:24:39 -06:00
Alex Chen
e3a755b5b1 lib: refactor amount parsers to minimize backtracking
- inline `spaceamountormissingp` into `postingp`
- combine `rightsymbolamountp` and `nosymbolamountp`
- the multiplier symbol '*' for an amount must now always preceed a sign '-'
  [breaking change]
- make amount parser labels more generic to simplify error messages
2018-06-20 23:24:39 -06:00