Commit Graph

4017 Commits

Author SHA1 Message Date
Simon Michael
77cf3a83da doc: lower-case hcar dir, part 2
in two parts to avoid any issues with git/osx
2015-10-19 08:56:21 -07:00
Simon Michael
2c170f63a6 doc: lower-case hcar dir, part 1
in two parts to avoid any issues with git/osx
2015-10-19 08:55:15 -07:00
Simon Michael
e2618210d2 doc: HCAR tweaks 2015-10-19 08:42:06 -07:00
Simon Michael
cbb076c224 doc: distinguish mockups from docs 2015-10-19 08:41:24 -07:00
Simon Michael
ef2dd9651d doc: a new HCAR entry 2015-10-18 16:09:23 -07:00
Simon Michael
bf532948f6 doc: clean up HCAR files 2015-10-18 14:50:14 -07:00
Simon Michael
d24b1b96f7 lib: parser cleanups 2015-10-17 12:09:03 -07:00
Simon Michael
bc43036117 lib: use consistent p suffix for parsers 2015-10-17 11:51:45 -07:00
Simon Michael
80ae8f5c50 latest dev script, testing parser performance 2015-10-17 11:23:55 -07:00
Simon Michael
78d5a0913e tools: dev-heap improvements 2015-10-17 11:23:39 -07:00
Simon Michael
b64f42c2d8 bal, ui: option help tweaks 2015-10-17 11:22:39 -07:00
Simon Michael
8214a6ccef dangit.. simplify combineJournalUpdates for real 2015-10-13 11:54:15 -07:00
Simon Michael
3be88ad6b5 simplify combineJournalUpdates
I really don't see why that extra x parameter is needed or works..
rewrite it in simpler form.

I also might be introducing breakage for older GHC's by using
unconditionally <$>, but I'm not seeing that for some reason
(tested back to ghc 7.6).
2015-10-13 11:49:51 -07:00
Simon Michael
7817cf9688 tools: functest now builds hledger if needed 2015-10-13 11:43:30 -07:00
Simon Michael
b3f5b7e7ca tools: rename dev-profile, add dev-heap rule 2015-10-13 10:31:43 -07:00
Simon Michael
56a79c479f cleanup 2015-10-12 07:02:36 -07:00
Simon Michael
2e38aec410 doc: link to dev sprint #2 2015-10-11 17:47:04 -07:00
Simon Michael
71921135f6 include P amounts in canonicalisation (fixes #131)
Since market price amounts didn't contribute to the canonical commodity
styles, they were being reset to the null style. And this propagated to
the reported amounts when -V was in effect, causing much confusion.
Now, market prices contribute to canonicalisation and the expected
styles are preserved even with -V.

cf https://github.com/simonmichael/hledger/issues/131#issuecomment-133545140
2015-10-11 16:07:31 -07:00
Simon Michael
7b8c992f5a register: auto-size amount columns, like hledger-ui 2015-10-10 18:20:40 -07:00
Simon Michael
eb75946e64 print: always right-align amounts
print now always right-aligns the amounts in an entry, even when they
are wider than 12 characters.

If there is a price, it's considered part of the amount for
right-alignment. Maybe it would be nicer to put amounts and prices in
separate columns ? That will get a little complicated, needs more
discussion/design.

Also some cleanup of postingAsLines.
2015-10-10 15:09:42 -07:00
Simon Michael
155722d7ee make strWidth aware of multi-line strings (#242) 2015-10-10 15:08:28 -07:00
Simon Michael
1d944ac1a9 doc: balance --format does not support - any more 2015-10-10 15:07:49 -07:00
Simon Michael
cbbe07e3c4 tests/nonascii -> tests/i18n 2015-10-10 13:11:31 -07:00
Simon Michael
bcc22a0367 ui: register: wide-char-aware layout 2015-10-10 12:26:17 -07:00
Simon Michael
3b40edba9c print: fix wide char support, add tests (#242)
The print command wasn't lining up amounts with wide chars in account
names, fixed it properly this time. Transaction and Posting's Show instances
should also be wide-char-aware now.
2015-10-10 11:53:28 -07:00
Simon Michael
e6d8a9d1bc tools: add sample journals with wide characters
generatejournal now has --chinese and --mixed options, which are used to
generate some additional small sample journals.
2015-10-10 11:51:07 -07:00
Simon Michael
939f7184c9 journal: make "end comment" optional, like ledger
The "comment" directive longer requires an "end comment", and will
extend to the end of the file(s) without it.
2015-10-07 16:41:49 -07:00
Simon Michael
a2f344f6d9 journal: require dates to begin with a digit 2015-10-04 08:41:01 -10:00
Simon Michael
aee8d2144b add file to package, really fix build error (#286) 2015-10-01 08:46:55 -10:00
Simon Michael
7808c502ad ui: accounts: wide-char-aware layout 2015-09-29 21:17:24 -10:00
Simon Michael
deea422dc1 fix build error (#242) 2015-09-29 21:16:51 -10:00
Simon Michael
58b98faf36 balance: wide-char-aware multicolumn reports (#242) 2015-09-29 20:54:05 -10:00
Simon Michael
ef27e5c427 string utils cleanup 2015-09-28 18:47:05 -10:00
Simon Michael
42e2da4bb6 balance, print; more wide char support (#242)
Simple (non-multicolumn) balance reports containing wide characters
should now align correctly (in apps and fonts that show wide chars as
double width). Likewise, the print command.
2015-09-28 18:33:18 -10:00
Simon Michael
5b5e5eeaf4 register: wide-character-aware layout (#242)
Wide characters, eg chinese/japanese/korean characters, are typically
rendered wider than latin characters. In some applications (eg gnome
terminal or osx terminal) and fonts (eg monaco) they are exactly double
width. This is a start at making hledger aware of this. A register
report containing wide characters (in descriptions, account names, or
commodity symbols) should now align its columns correctly, when viewed
with a suitable font and application.
2015-09-28 16:12:20 -10:00
Simon Michael
09430f09da web: fix --file-url option (#285)
Finish the rename begun by 3fb5e25.
2015-09-28 10:06:36 -10:00
Simon Michael
5404eab6c0 add: write all amounts, don't lose price info (#283) 2015-09-27 10:24:21 -10:00
Simon Michael
df4b43a2b3 web: fix journal/register links with --base-url (#235) 2015-09-27 10:05:20 -10:00
Simon Michael
2c3f1b672e web: disallow -f- which doesn't work (fixes #202)
hledger-web -f- gives

[Error#yesod-core] <stdin>: hGetContents: illegal operation (handle is closed)

and I can't see why. Just disallow it.
2015-09-27 08:17:12 -10:00
Simon Michael
3fa3926ee9 web: clarify which libs we are calling to start up 2015-09-27 08:16:30 -10:00
Simon Michael
dafa8efada note possible combineJournalUpdates inefficiency 2015-09-26 16:01:27 -10:00
Simon Michael
1d84acc334 tools: drop functestdef and obsolete PATH munging 2015-09-26 16:01:00 -10:00
Simon Michael
1f839f6739 tools: dev script build/profiling updates 2015-09-26 16:00:16 -10:00
Simon Michael
7a7b26d93c tools: include benchmark script in tags 2015-09-26 15:59:11 -10:00
Simon Michael
2d4dc81999 latest benchmarking experiments 2015-09-26 15:58:46 -10:00
Simon Michael
5048d3bf06 lib: memoise accountNameApplyAliases too ?
This adds a accountNameApplyAliasesMemo, which memoises the result of
applying a set of aliases (simple and regex) to an account name. In
theory this should reduce more repetitive work, but in practice it
doesn't seem to make a difference, so it's unused for now.
2015-09-26 15:58:12 -10:00
Simon Michael
4326f88c26 lib: memoise aliasReplace for fast regex aliases (#244)
Roughly speaking, the time to apply regular expression account aliases
was O(aliases x transactions), and should now be O(aliases x accounts).
Also, the constant factor was reduced a lot by the recent commit
memoising toRegex. So now, regex aliases should be "free" like simple
aliases - use as many as you want, the slowdown shouldn't be noticeable.
2015-09-26 15:45:44 -10:00
Simon Michael
041541e466 lib: memoised versions of regexReplace[CI] (#244) 2015-09-26 15:45:17 -10:00
Simon Michael
f8f2d457b9 lib: memoize toRegex[CI] (#244)
The regex helpers were converting strings to regex-tdfa regular
expressions on the fly every time, but this appears to be quite
expensive. The simplest memoisation lib seems to solve it nicely.
2015-09-26 15:39:21 -10:00
Simon Michael
591abefe9e clarify modifiedaccountnamep 2015-09-24 14:23:52 -10:00