module Correctify (correctify) where

import DNBFormat
import YNABFormat

correctify :: String -> String
correctify text =
    unlines (dummyLine : result)
    where
        dummyLine = "Date,Payee,Category,Memo,Outflow,Inflow"
        result = map convert textlines
        textlines = tail $ lines text

convert = show . ynabFromDnb . readDnb

