Alex Chen
3aa72bdf16
lib: Clean up new code introduced for #655
2018-05-11 06:41:13 -07:00
Alex Chen
30ae991484
lib: Strip comment before parsing tags ( #655 )
2018-05-11 06:41:13 -07:00
Alex Chen
09ec6041bd
lib: Report source positions from internal comment parsers
2018-05-11 06:41:13 -07:00
Alex Chen
b06d22a418
lib: Refactor common comment parsers
2018-05-11 06:41:13 -07:00
Alex Chen
c2199b1125
lib: Add explicit export list to Common.hs
2018-05-11 06:41:13 -07:00
Alex Chen
a409d09435
lib: restrict backtracking when parsing postings ( #747 )
2018-05-09 22:09:15 -07:00
Stephen Morgan
129f6e6839
Adjust start date of DateSpan for periodic forecasting with Days interval.
2018-05-09 17:19:58 -07:00
Simon Michael
49c8c093ac
lib: clarify rawnumberp doc
...
[ci skip]
2018-05-09 10:22:39 -07:00
Simon Michael
cfee04215f
bal: always ignore --drop when not in flat mode ( fix #754 )
2018-05-05 16:12:27 -07:00
Simon Michael
3586be2473
doc: csv: fix how-to link
2018-05-04 09:03:00 -07:00
Simon Michael
cfdde062eb
clarify directive semantics
2018-05-03 21:20:29 -07:00
Simon Michael
18e5c9d5c9
doc: move market price docs under directives
2018-05-03 13:11:17 -07:00
Simon Michael
3ef11037b2
doc: journal: directives
...
[ci skip]
2018-05-01 10:50:38 -07:00
Simon Michael
9d0d47f09d
changelog note
...
[ci skip]
2018-04-30 07:58:12 -07:00
Simon Michael
290ea1891a
regen manuals
2018-04-29 18:04:59 -07:00
Simon Michael
59c804dac4
doc: journal: directives & periodic/automated cleanups
2018-04-29 18:02:16 -07:00
Simon Michael
53706bae66
doc: journal: fix heading level
2018-04-29 16:59:37 -07:00
Simon Michael
0aef51d725
changelogs
2018-04-29 12:45:07 -07:00
Simon Michael
d7f6ff0e18
doc: regenerate embedded manuals
2018-04-25 17:43:34 -07:00
Simon Michael
9151f5004e
budget: show a budget report even with no interval (for whole journal period)
2018-04-24 23:12:42 -07:00
Simon Michael
568a442307
budget: tweak hiding/grouping of unbudgeted accounts
...
It now works slightly differently. Eg:
- <unbudgeted>'s subaccounts are hidden by default
- --show-unbudgeted shows all unbudgeted accounts, including subaccounts of budgeted parents
- --show-unbudgeted doesn't affect the grouping under <unbudgeted>
IMHO it's a nice simplification and increase in consistency, while still meeting the original intent.
2018-04-24 13:42:12 -07:00
Simon Michael
8b650d8e4f
budget: fix inconsistent hiding of unbudgeted accounts
...
Accounts which have no budget goals within the report period are now
grouped under <unbudgeted> - not just accounts with no budget goals ever.
Haddocks have been clarified, especially for budgetRollup. In some
ways things are much clearer without this feature, but it remains
enabled by default for now.
2018-04-23 18:52:28 -07:00
Simon Michael
8759f12b63
budget: more consistent display of percentage
2018-04-23 18:52:28 -07:00
Simon Michael
41665d07b0
regenerate cabal files, fix tabular compilation error
2018-04-23 18:52:28 -07:00
Simon Michael
0c140d7238
budget: allow multi-interval budgets again
...
Budgets were restricted to a single interval in 1.9, but this was
a mistake. This restores the 1.5 behaviour, where a budget can be built
up from multiple periodic transactions with different intervals.
2018-04-23 18:52:28 -07:00
Simon Michael
e2c55aafa9
budget: --drop preserves the <unbudgeted> top-level account
2018-04-23 18:52:28 -07:00
Simon Michael
43287a3e26
budget: use a new first-class BudgetReport for --budget
2018-04-23 18:52:28 -07:00
Simon Michael
4b3c6afe75
lib: new generic PeriodicReport, and some report-related type aliases
2018-04-23 18:52:28 -07:00
Simon Michael
0b380971f7
journal: require a decimal point in commodity/format/D directives
...
A commodity directive that doesn't specify the decimal point character
increases ambiguity and the chance of misparsing numbers, especially
as it overrides all style information inferred from the journal amounts.
In some cases it caused amounts with a decimal point to be parsed as if
with a digit group separator so 1.234 became 1234.
We could augment it with extra info from the journal amounts, when available,
but it would still be possible to be ambiguous, and that won't be obvious.
A commodity directive is what we recommend to nail down the style.
It seems the simple and really only way to do this reliably is to require
an explicit decimal point character. Most folks probably do this already.
Unfortunately, it makes another potential incompatiblity with ledger and
beancount journals. But the error message will be clear and easy to
work around.
2018-04-20 21:56:06 -07:00
Simon Michael
3f2827424c
refactor: number parsing docs
2018-04-20 21:39:06 -07:00
Simon Michael
3d4f5600ae
journal: infer and balance amounts with standard amount styles ( fix #737 )
...
Inferred amounts now have the appropriate standard amount style applied.
And when checking for balanced transactions, amount styles declared with
commodity directives are also used (previously only inferred amount styles were).
2018-04-20 13:40:05 -07:00
Simon Michael
3a3829ac0f
doc: regen embedded manuals
2018-04-20 06:48:26 -07:00
Simon Michael
d53557b09d
regen cabal files with stack 1.7's hpack (0.28.2)
2018-04-20 06:47:52 -07:00
Simon Michael
30186e35ea
cabal: update tested-with
2018-04-20 05:24:09 -07:00
Simon Michael
91e3ddd4fb
lib: refactor
2018-04-20 05:24:09 -07:00
Dmitry Astapov
0c835acd18
lib, app: better descriptions for forecast transactions
2018-04-18 16:05:08 -07:00
Simon Michael
f2d3b3e1d4
csv: handle the other double negation cases: -(N), ((N)) ( fix #736 )
2018-04-18 07:39:33 -07:00
Dmitry Astapov
d82370d10b
lib, app, web: remove differences between command line and journal file aliases
2018-04-17 16:09:11 -07:00
Dmitry Astapov
f6ec26e321
lib, app, web, ui: rename readJournalFile[s]WithOpts to readJournalFile, same for tryReader[s]WithOpts
2018-04-17 15:25:02 -07:00
Simon Michael
ae8046d47b
lib: restore/update haddocks on readJournalFile[s]WithOpts
...
[ci skip]
2018-04-17 14:34:43 -07:00
Dmitry Astapov
5579af9a04
lib: remove readJournalFile(s) - supeceded by readJournalFile(s)WithOpts
2018-04-17 14:33:32 -07:00
Dmitry Astapov
37607beaea
lib, app, web: use readJournalFileWithOpts instead of readJournalFile whenever possible
2018-04-17 14:33:32 -07:00
Dmitry Astapov
c7d86f3572
doc: mention that auto postings affect balances/amount inference ( #729 )
2018-04-17 14:33:32 -07:00
Dmitry Astapov
93814652f8
lib: auto postings are generated right after posting that triggered them ( #729 )
2018-04-17 14:33:32 -07:00
Dmitry Astapov
ecf49b1e4b
lib: auto postings generated before amount inference and balance checks ( #729 )
2018-04-17 14:33:32 -07:00
Everett Hildenbrandt
c69fbff6d9
CsvReader: print more information about amount-in/out errors
2018-04-15 16:52:52 -07:00
Pavlo Kerestey
63d4c51dc4
Use quoteIfNeeded in quoteIfSpaced. Fix escapeDoubleQuotes to escape
2018-04-12 12:04:20 -07:00
Pavlo Kerestey
980210070a
Explicit exports of Hledger.Utils.Text
2018-04-12 12:04:20 -07:00
Wad
3a7f50b5c5
Update hledger_journal.m4.md
...
Update the location of the vim ledger support.
2018-04-07 00:24:04 +01:00
Simon Michael
7129577f34
update cabal files
2018-04-04 17:56:22 +01:00
Simon Michael
4ea02bf1cb
bump version to 1.9.99
2018-04-04 17:53:38 +01:00
Simon Michael
0b5ddcebee
cli: clarify smart dates with more examples; add support for YYYYMM
2018-04-04 17:45:23 +01:00
Simon Michael
027abcabe6
update embedded manuals
2018-03-31 19:15:24 +01:00
Simon Michael
6ebb1fb061
update cabal files
2018-03-31 19:15:24 +01:00
Simon Michael
2db2010e40
bump version to 1.9, bump manual date
2018-03-31 19:15:24 +01:00
Simon Michael
0a1e46e018
doc: update changelogs, release notes
...
[ci skip]
2018-03-31 19:15:24 +01:00
Martin Michlmayr
633ad4455f
doc: update references to the faq
...
Update references to the FAQ in the documentation and on the web site.
2018-03-31 17:58:29 +01:00
Simon Michael
1c26a5b8b5
doc: layout fix ( #704 , #706 )
...
[ci skip]
2018-03-31 03:38:58 +01:00
Simon Michael
0979dbc01f
regenerate cabal files with stack 1.6.3 to silence hpack warnings
...
[ci skip]
2018-03-31 03:24:01 +01:00
Simon Michael
61a16870ab
doc: warn about digit group separators in scientific notation ( #704 , #706 )
...
[ci skip]
2018-03-31 03:06:55 +01:00
Simon Michael
4ff3a749c6
lib: note an oddity with runJournalParser
2018-03-31 02:44:31 +01:00
Simon Michael
571ea1540b
document scientific notation ( #704 , #706 )
2018-03-31 02:41:31 +01:00
Mykola Orliuk
b377bff90a
lib: support scientific number notation ( #704 , #706 )
...
closes simonmichael/hledger#704
2018-03-31 01:49:46 +01:00
Simon Michael
2b34ff1184
lib: reportSpan debug output
2018-03-30 02:41:03 +01:00
Simon Michael
ebaac2866b
lib: fix reportStartEndDates, rename to reportSpan
2018-03-30 00:16:35 +01:00
Simon Michael
dc4def835c
lib: refactor runPeriodicTransaction, add a test
2018-03-29 18:11:34 +01:00
Simon Michael
d060398484
lib: splitSpan: return no spans for an empty datespan
...
Fixes an issue where a bounded budget could wrongly appear in a
disjoint report period.
2018-03-29 18:10:51 +01:00
Simon Michael
4d562ef068
lib: don't count periodic/modifier txns in Journal debug output
2018-03-29 16:45:34 +01:00
Simon Michael
083d9190fd
budget: only periodic txns with the selected interval are used
2018-03-29 15:51:52 +01:00
Simon Michael
64e06750eb
doc: draft changelogs & release notes
2018-03-28 18:25:01 +01:00
Simon Michael
d403b003c1
lib: disable doctests when building with ghc 8.4 on mac
...
[ci skip]
2018-03-26 18:23:46 +01:00
Moritz Kiefer
d7b68fbd7d
Use skipMany/skipSome for parsing spacenonewline
...
This avoids allocating the list of space characters only to then
discard it.
2018-03-25 22:59:05 +01:00
Simon Michael
84579bb1b4
silence redundant import warnings with ghc 8.4
2018-03-24 22:51:56 +00:00
Simon Michael
21db75f1a6
update cabal files
2018-03-24 16:06:20 +00:00
Simon Michael
d1a55e5f76
tighten base upper bound, avoid breakage with next major GHC
2018-03-22 16:43:40 +00:00
Simon Michael
1e738e6ee5
lib: regenerate cabal file with older hpack to silence warning
2018-03-22 16:42:02 +00:00
Peter Simons
b3e4abe46d
hledger-lib: re-generate the hledger-lib.cabal file
2018-03-22 16:08:17 +00:00
Peter Simons
a1ddecd8f5
hledger-lib: remove redundant dependency declaration on semigroups
...
This dependency is already expressed conditionally for GHC versions older than
8.0.x, which is the proper way to do it since newer versions have that code in
base already.
2018-03-22 16:08:17 +00:00
Simon Michael
7635f56a5c
lib: add conditional dep to package.yaml and rest of cabal file
2018-03-12 23:27:23 +00:00
Peter Simons
4c5a58ec1e
hledger-lib: add missing Semigroup instance for Journal
...
GHC 8.4.1 makes Semigroup a superclass of Monoid. See
https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid
for details.
2018-03-12 23:17:14 +00:00
Simon Michael
6aa35b5cb8
lib: move easytest tests to lib, depend on released version
2018-03-05 17:27:13 -08:00
Simon Michael
3390972cab
update generated manuals
2018-02-16 11:09:37 -08:00
Simon Michael
968ae13035
lib: redo buggy Amount refactoring
2018-02-16 02:26:39 -08:00
Simon Michael
b6a089b8a3
lib: Amount: hlint
2018-02-15 17:28:23 -08:00
Simon Michael
b231d99e38
lib: Account, AccountName: hlint
2018-02-15 11:38:34 -08:00
Simon Michael
6d94eed6fd
lib: Types: fix/silence hlint warnings
2018-02-15 07:35:51 -08:00
Simon Michael
298651fa02
doc: periodic txns, automated postings edits
...
[ci skip]
2018-02-11 20:09:19 -08:00
Simon Michael
13855d6b53
csv: no csv records is no longer an error
2018-02-01 09:41:03 -08:00
Simon Michael
d3fde29b36
bal: --invert flag to flip all signs
2018-01-29 14:53:23 -08:00
Simon Michael
92d48ed0a2
lib/ui/web/api: move manuals to extra-source-files in these pkgs too
...
[ci skip]
2018-01-26 11:49:26 -08:00
Simon Michael
37555617b7
journal, bal: document account codes
2018-01-23 16:51:12 -08:00
Simon Michael
9b88fc2ed0
bal/bs/cf/is: sort accounts by account code, if any, then account name
...
If any accounts have numeric codes assigned via account directives,
those accounts will be listed first, lowest account codes first.
2018-01-23 11:33:24 -08:00
Simon Michael
d420a8b534
journal: account directive: parse and store a numeric account code also
2018-01-23 11:33:23 -08:00
Simon Michael
88ef586480
lib: rename, clarify purpose of balanceReportFromMultiBalanceReport
2018-01-23 11:32:24 -08:00
Simon Michael
5b1883fcdf
bs/bse/cf/is: fix display of abbreviated name for December
2018-01-19 12:45:51 -08:00
Simon Michael
e9624486b6
bs/bse/cf/is: show local abbreviated month names on monthly columns
2018-01-18 11:46:12 -08:00
Simon Michael
46d7893446
updated generated manuals
2018-01-18 11:01:15 -08:00
Simon Michael
6b349e3123
bs/bse/cf/is: show all balances as normally-positive (experimental)
...
Income, liability and equity balances, which until now we have
always displayed as negative numbers, are now shown as normally positive
by these reports.
Negative numbers now indicate a contra-balance (eg an overdrawn
checking account), a net loss, a negative net worth, etc.
This makes these reports more like conventional financial statements,
and easier to read and share with normal people.
2018-01-18 11:01:07 -08:00
Simon Michael
3b2a9eaba4
lib: refactor
2018-01-15 14:15:52 -08:00
Simon Michael
79812f974a
rename NormalBalance -> NormalSign
2018-01-15 14:12:38 -08:00
Christoph Nicolai
c409afc90b
Update Editor Table
...
Reformat markdown table and update Sublime Text URL.
2018-01-10 07:58:14 -08:00
Simon Michael
fedf36e823
lib: when the text encoding is UTF-8, ignore any UTF-8 BOM prefix
...
Paypal's new CSV has this BOM prefix (at the time of writing),
which was causing a confusing parse error.
2018-01-04 16:29:23 -08:00
Simon Michael
81e964502b
lib: refactor low-level text file reading
2018-01-04 16:17:25 -08:00
Simon Michael
a0d765edb5
update embedded manuals
2018-01-04 10:19:27 -08:00
Simon Michael
bc3f5c476c
bump version to 1.5.99
2018-01-04 10:15:03 -08:00
Simon Michael
82283d75d7
doc: changelog updates
2017-12-31 10:30:28 -08:00
Simon Michael
956dee9682
update cabal files
2017-12-31 10:24:15 -08:00
Simon Michael
6ccabe3b48
update embedded manuals
2017-12-31 10:22:09 -08:00
Simon Michael
52c3884ab7
bump version strings & bounds to 1.5
2017-12-31 10:20:48 -08:00
Simon Michael
7921f0cf44
update embedded manuals
2017-12-31 10:08:44 -08:00
Simon Michael
0d8ac2cd6f
update cabal files
2017-12-31 10:03:50 -08:00
Simon Michael
e927e587e6
lib,cli: auto/forecast/budget option/docs cleanup, consistency
2017-12-31 10:01:18 -08:00
Simon Michael
667a1d7e59
remove upper bounds on all but hledger* and base
...
It's rare that my deps break their api or that newer versions must be avoided,
and very common that they release new versions which I must tediously
and promptly test and release hackage revisions for or risk falling out
of stackage. Trying it this way for a bit.
2017-12-31 09:13:50 -08:00
Simon Michael
26d1f10ef1
consistent spacing in bounds
2017-12-31 09:05:39 -08:00
Simon Michael
d3363d09d8
allow megaparsec 6.4.0
2017-12-31 08:47:59 -08:00
Simon Michael
99cde10e98
doc: draft changelogs
2017-12-30 18:20:41 -08:00
Simon Michael
ecdbc05703
Merge branch 'feature/space-as-digits-sep' of https://github.com/ony/hledger into ony-feature/space-as-digits-sep
2017-12-30 09:29:22 -08:00
Simon Michael
2a0e12122c
tools: regen cabal files with latest stack's hpack to avoid warnings
2017-12-30 08:47:47 -08:00
Simon Michael
8f55b6137d
uses today's prices, not those of last txn date, for -V (fix #683,#648)
2017-12-29 21:42:59 -08:00
Simon Michael
69e255cead
lib: deduplicate, refactor valuation code
2017-12-29 16:52:08 -08:00
Simon Michael
aa06d0f9bd
lib, cli, ui: allow ansi-terminal 0.8
2017-12-29 12:41:22 -08:00
Simon Michael
d15a2dc4c0
lib: fix journalAccountNames doc
...
[ci skip]
2017-12-29 12:34:51 -08:00
Simon Michael
ddef7d722d
lib: update journal account names api
...
Now we have:
-- | Sorted unique account names posted to by this journal's transactions.
journalAccountNamesUsed :: Journal -> [AccountName]
-- | Sorted unique account names implied by this journal's transactions -
-- accounts posted to and all their implied parent accounts.
journalAccountNamesImplied :: Journal -> [AccountName]
-- | Sorted unique account names declared by account directives in this journal.
journalAccountNamesDeclared :: Journal -> [AccountName]
-- | Sorted unique account names declared by account directives or posted to
-- by transactions in this journal.
journalAccountNamesDeclaredOrUsed :: Journal -> [AccountName]
-- | Sorted unique account names declared by account directives, or posted to
-- or implied as parents by transactions in this journal.
journalAccountNamesDeclaredOrImplied :: Journal -> [AccountName]
-- | Convenience/compatibility alias for journalAccountNamesImpliedOrUsed.
journalAccountNames :: Journal -> [AccountName]
2017-12-29 12:18:04 -08:00
Simon Michael
d7d75c50fe
lib: expandAccountNames, accountNamesFromPostings should sort here
2017-12-29 12:16:46 -08:00
Simon Michael
07596b1c54
update embedded manuals
2017-12-22 10:13:38 -08:00
Simon Michael
0621a27833
update cabal files
2017-12-22 10:13:37 -08:00
Simon Michael
efdee17aae
bump version strings & lower bounds to 1.4.99
2017-12-22 10:13:37 -08:00
Simon Michael
761fc31eb8
lib,cli,ui,web: allow megaparsec 6.3.0
2017-12-15 12:32:11 -08:00
Nadrieril
9e6e06033f
lib: Allow balance-only entries in csv reader
2017-12-14 18:26:29 -08:00
Simon Michael
cd5c74625e
update embedded manuals
2017-12-14 18:20:07 -08:00
Dmitry Astapov
040b9aef91
doc: add Periodic transactions, Automated posting rules
2017-12-14 17:20:07 -08:00
Simon Michael
302ee50bfe
update embedded manuals
2017-12-07 12:04:11 -08:00
Simon Michael
9013694d89
cabal: regenerate with stack 1.6/hpack 0.20
2017-12-07 11:46:33 -08:00
Simon Michael
c18a75ecfe
fix data-files paths in yaml/cabal files
2017-12-06 18:45:01 -08:00
Simon Michael
968cff7a4a
remove numbers from all but nroff filenames
2017-12-06 18:35:18 -08:00
Simon Michael
61a2fa4d53
move package manual files out of doc/
2017-12-06 18:26:20 -08:00
Simon Michael
1d26845525
remove */doc/README
2017-12-06 18:18:03 -08:00
Mykola Orliuk
95db5062d6
journal: inherit commodities in included files
...
Followup on some comments for simonmichael/hledger#487
2017-12-04 12:26:26 -08:00
Mykola Orliuk
9cdd02e0b0
journal: pretty errors for included files
...
Fixes simonmichael/hledger#660
2017-12-04 12:26:26 -08:00
Mykola Orliuk
fa2e680b2e
lib: fix styles after cost application
...
Fixes simonmichael/hledger#509
2017-12-04 12:26:26 -08:00
Mykola Orliuk
47766ea9d4
journal: support space as digits sep
...
Resolves simonmichael/hledger#330
2017-11-29 17:20:18 +01:00
Dmitry Astapov
6f92e70575
lib: remove needless numeric comparisons in bal/bs
...
accountsFromPostings is currently doing excessive work when adding up
postings in each account. It sorts (accountName, amount) tuples which
cause amounts in them to be compared. There is no need to look at amount
here at all since subsequent summing up and counting does not depend on
order. It is enough to sort by accountname only.
Went through similar pieces of code, made them all look uniform.
2017-11-29 07:08:18 -08:00
Dmitry Astapov
cf0dfa9f58
lib: add dependecy on 'extra' package
...
It has a collection of useful list processing functions.
2017-11-29 07:08:18 -08:00
Simon Michael
4228203740
doc: regenerate embedded manuals
...
[ci skip]
2017-11-28 17:37:27 -08:00
Mykola Orliuk
9df985f8c6
doc: resolving of amount decimal/group ambiguity
2017-11-27 15:47:56 -08:00
Mykola Orliuk
e58272f28f
journal: use groups sep and prec for decimal hint
...
Use whole AmountStyle in process of resolving decimal/groups separator
ambiguity.
Resolve simonmichael/hledger#399
2017-11-27 15:47:56 -08:00
Mykola Orliuk
7cbdeb40a4
journal: get decimal hint from default commodity
...
If appropriate commodity directive is missing fallback to default
commodity directive to get number representation style.
2017-11-27 15:47:56 -08:00
Mykola Orliuk
b7dbe044b0
journal: use decimal sep hint for amount parser
...
Make use of commodity format directive as a hint for parsing amount.
Kinda resolves simonmichael/hledger#487
2017-11-27 15:47:56 -08:00
Mykola Orliuk
dafdaec1ca
journal: factor out rawnumberp
2017-11-27 15:47:56 -08:00
Mykola Orliuk
bcf7a1add5
journal: make numbers parsing more strict
...
- Hunt down adjacent punctuations with altering char.
- Add some tests dedicated to parsing amounts.
2017-11-27 15:47:56 -08:00