hledger-interest 1.5.2 → 1.5.3
raw patch · 2 files changed
+7/−7 lines, 2 files
Files
- Main.hs +5/−5
- hledger-interest.cabal +2/−2
Main.hs view
@@ -22,7 +22,7 @@ { optVerbose :: Bool , optShowVersion :: Bool , optShowHelp :: Bool- , optInput :: FilePath+ , optInput :: [FilePath] , optSourceAcc :: String , optTargetAcc :: String , optDCC :: Maybe DayCountConvention@@ -36,7 +36,7 @@ { optVerbose = True , optShowVersion = False , optShowHelp = False- , optInput = "-"+ , optInput = [] , optSourceAcc = "" , optTargetAcc = "" , optDCC = Nothing@@ -52,7 +52,7 @@ , Option ['v'] ["verbose"] (NoArg (\o -> o { optVerbose = True })) "echo input ledger to stdout (default)" , Option ['q'] ["quiet"] (NoArg (\o -> o { optVerbose = False })) "don't echo input ledger to stdout" , Option [] ["today"] (NoArg (\o -> o { optBalanceToday = True })) "compute interest up until today"- , Option ['f'] ["file"] (ReqArg (\f o -> o { optInput = f }) "FILE") "input ledger file (pass '-' for stdin)"+ , Option ['f'] ["file"] (ReqArg (\f o -> o { optInput = f : (optInput o) }) "FILE") "input ledger file (pass '-' for stdin)" , Option ['s'] ["source"] (ReqArg (\a o -> o { optSourceAcc = a }) "ACCOUNT") "interest source account" , Option ['t'] ["target"] (ReqArg (\a o -> o { optTargetAcc = a }) "ACCOUNT") "interest target account" , Option ['I'] ["ignore-assertions"] (NoArg (\o -> o { optIgnoreAssertions = True })) "ignore any failing balance assertions"@@ -93,7 +93,7 @@ when (length args < 1) (commandLineError "required argument ACCOUNT is missing\n") when (length args > 1) (commandLineError "only one interest ACCOUNT may be specified\n") let ledgerInputOptions = definputopts { ignore_assertions_ = optIgnoreAssertions opts }- jnl' <- readJournalFile ledgerInputOptions (optInput opts) >>= either fail return+ jnl' <- readJournalFiles ledgerInputOptions (reverse (optInput opts)) >>= either fail return let [interestAcc] = args jnl = filterJournalTransactions (Acct interestAcc) jnl' ts = sortBy (comparing tdate) (jtxns jnl)@@ -112,4 +112,4 @@ result | optVerbose opts = ts' ++ ts | otherwise = ts'- mapM_ (putStr . show) (sortBy (comparing tdate) result)+ mapM_ (putStr . showTransaction) (sortBy (comparing tdate) result)
hledger-interest.cabal view
@@ -1,5 +1,5 @@ Name: hledger-interest-Version: 1.5.2+Version: 1.5.3 Synopsis: computes interest for a given account License: BSD3 License-file: LICENSE@@ -11,7 +11,7 @@ Cabal-version: >= 1.6 Extra-source-files: README.md Stability: stable-tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.2+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1 Description: hledger-interest is a small command-line utility based on Simon