rabocsv2qif 1.1.3 → 1.1.4
raw patch · 2 files changed
+4/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Rabobank.hs +3/−3
- rabocsv2qif.cabal +1/−1
Rabobank.hs view
@@ -64,7 +64,7 @@ toQif file = qifHeader ++ unlines (map transactionToQif (fileToTransactions records)) where rows = lines $ filter (/= '"') file rawRecords = map (splitOn ",") rows- records = map (takeWhileIndex [2,3,4,5,6,10]) + records = map (takeWhileIndex [2,3,4,5,6,10,11,12,13,14,15]) (filter (\x -> length x == 19) rawRecords) -- |Turns a list of a list of list of a list of 'String's into a list of@@ -86,11 +86,11 @@ -- into a correct 'Transaction' for use with 'transactionToQif'. rowToTransaction :: [String] -> Maybe Transaction rowToTransaction- [date, debitcredit, amount, accountNumber, description, acctDesc] =+ (date:debitcredit:amount:accountNumber:descriptionfields) = Just (Transaction correctDate correctAmount correctDescription accountNumber) where correctDate = intercalate "/" $ splitPlaces [4,2,2] date correctAmount = creditDebit (read amount :: Double) (toTransactionType debitcredit)- correctDescription = description ++ ", " ++ acctDesc+ correctDescription = intercalate ", " descriptionfields rowToTransaction _ = Nothing -- |Helper function to turn a 'String' containing "D" or something else into a
rabocsv2qif.cabal view
@@ -1,5 +1,5 @@ Name: rabocsv2qif-Version: 1.1.3+Version: 1.1.4 Synopsis : A library and program to create QIF files from Rabobank CSV exports. License: GPL License-file: LICENSE