hledger 0.23.2 → 0.23.3
raw patch · 4 files changed
+28/−19 lines, 4 filesdep ~hledger-libdep ~textPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hledger-lib, text
API changes (from Hackage documentation)
Files
- CHANGES +4/−0
- Hledger/Cli.hs +11/−8
- Hledger/Cli/Histogram.hs +5/−3
- hledger.cabal +8/−8
CHANGES view
@@ -1,3 +1,7 @@+0.23.3 (2014/9/12)++- allow text 1.2+ (fixes #207)+ 0.23.2 (2014/5/8) - register: also fix date sorting of postings (#184)
Hledger/Cli.hs view
@@ -97,8 +97,8 @@ ,"account directive should preserve \"virtual\" posting type" ~: do j <- readJournal Nothing Nothing Nothing "!account test\n2008/12/07 One\n (from) $-1\n (to) $1\n" >>= either error' return let p = head $ tpostings $ head $ jtxns j- assertBool "" $ (paccount p) == "test:from"- assertBool "" $ (ptype p) == VirtualPosting+ assertBool "" $ paccount p == "test:from"+ assertBool "" $ ptype p == VirtualPosting ] @@ -188,6 +188,7 @@ ] -} +defaultyear_journal_str :: String defaultyear_journal_str = unlines ["Y2009" ,""@@ -337,9 +338,10 @@ -- ,"" -- ] +journal7 :: Journal journal7 = nulljournal {jtxns = [- txnTieKnot $ Transaction {+ txnTieKnot Transaction { tdate=parsedate "2007/01/01", tdate2=Nothing, tstatus=False,@@ -354,7 +356,7 @@ tpreceding_comment_lines="" } ,- txnTieKnot $ Transaction {+ txnTieKnot Transaction { tdate=parsedate "2007/02/01", tdate2=Nothing, tstatus=False,@@ -369,7 +371,7 @@ tpreceding_comment_lines="" } ,- txnTieKnot $ Transaction {+ txnTieKnot Transaction { tdate=parsedate "2007/01/02", tdate2=Nothing, tstatus=False,@@ -384,7 +386,7 @@ tpreceding_comment_lines="" } ,- txnTieKnot $ Transaction {+ txnTieKnot Transaction { tdate=parsedate "2007/01/03", tdate2=Nothing, tstatus=False,@@ -399,7 +401,7 @@ tpreceding_comment_lines="" } ,- txnTieKnot $ Transaction {+ txnTieKnot Transaction { tdate=parsedate "2007/01/03", tdate2=Nothing, tstatus=False,@@ -414,7 +416,7 @@ tpreceding_comment_lines="" } ,- txnTieKnot $ Transaction {+ txnTieKnot Transaction { tdate=parsedate "2007/01/03", tdate2=Nothing, tstatus=False,@@ -431,4 +433,5 @@ ] } +ledger7 :: Ledger ledger7 = ledgerFromJournal Any journal7
Hledger/Cli/Histogram.hs view
@@ -6,6 +6,7 @@ module Hledger.Cli.Histogram where+ import Data.List import Data.Maybe import Data.Ord@@ -19,7 +20,7 @@ import Prelude hiding (putStr) import Hledger.Utils.UTF8IOCompat (putStr) -+activitymode :: Mode RawOpts activitymode = (defCommandMode $ ["activity"] ++ aliases) { modeHelp = "show an ascii barchart of posting counts per interval (default: daily)" `withAliases` aliases ,modeHelpSuffix = []@@ -31,6 +32,7 @@ } where aliases = [] +barchar :: Char barchar = '*' -- | Print a histogram of some statistic per reporting interval, such as@@ -46,8 +48,8 @@ i = intervalFromOpts opts interval | i == NoInterval = Days 1 | otherwise = i- span = queryDateSpan (date2_ opts) q `spanDefaultsFrom` journalDateSpan (date2_ opts) j- spans = filter (DateSpan Nothing Nothing /=) $ splitSpan interval span+ span' = queryDateSpan (date2_ opts) q `spanDefaultsFrom` journalDateSpan (date2_ opts) j+ spans = filter (DateSpan Nothing Nothing /=) $ splitSpan interval span' spanps = [(s, filter (isPostingInDateSpan s) ps) | s <- spans] -- same as Register -- should count transactions, not postings ?
hledger.cabal view
@@ -1,5 +1,5 @@ name: hledger-version: 0.23.2+version: 0.23.3 stability: stable category: Finance, Console synopsis: The main command-line interface for the hledger accounting tool.@@ -23,7 +23,7 @@ -- data-dir: data -- data-files: extra-tmp-files:-extra-source-files: +extra-source-files: tests/suite.hs CHANGES @@ -42,7 +42,7 @@ Default: True library- cpp-options: -DVERSION="0.23.2"+ cpp-options: -DVERSION="0.23.3" ghc-options: -W default-language: Haskell2010 -- should be the same as below@@ -65,7 +65,7 @@ Hledger.Cli.Stats -- should be the same as below build-depends:- hledger-lib == 0.23.2+ hledger-lib == 0.23.3 ,base >= 4.3 && < 5 -- ,cabal-file-th ,containers@@ -93,7 +93,7 @@ ,shakespeare-text >= 1.0 && < 1.2 ,shakespeare >= 1.0 && < 2.1 ,split >= 0.1 && < 0.3- ,text >= 0.11 && < 1.2+ ,text >= 0.11 ,tabular >= 0.2 && < 0.3 ,time ,utf8-string >= 0.3.5 && < 0.4@@ -128,14 +128,14 @@ Hledger.Cli.Print Hledger.Cli.Register Hledger.Cli.Stats- cpp-options: -DVERSION="0.23.2"+ cpp-options: -DVERSION="0.23.3" ghc-options: -W if flag(threaded) ghc-options: -threaded -- should be the same as above default-language: Haskell2010 build-depends:- hledger-lib == 0.23.2+ hledger-lib == 0.23.3 ,base >= 4.3 && < 5 ,containers ,cmdargs >= 0.10 && < 0.11@@ -155,7 +155,7 @@ ,shakespeare >= 1.0 && < 2.1 ,split >= 0.1 && < 0.3 ,tabular >= 0.2 && < 0.3- ,text >= 0.11 && < 1.2+ ,text >= 0.11 ,time ,utf8-string >= 0.3.5 && < 0.4 ,wizards == 1.0.*