lib: update readJournalFromCsv doc

This commit is contained in:
Simon Michael 2017-02-06 01:45:32 -08:00
parent 7dd34d71b5
commit 9cfb7bf6af

View File

@ -83,13 +83,13 @@ parse rulesfile _ f t = do
-- | Read a Journal from the given CSV data (and filename, used for error -- | Read a Journal from the given CSV data (and filename, used for error
-- messages), or return an error. Proceed as follows: -- messages), or return an error. Proceed as follows:
-- @ -- @
-- 1. parse the CSV data -- 1. parse CSV conversion rules from the specified rules file, or from
-- 2. identify the name of a file specifying conversion rules: either use -- the default rules file for the specified CSV file, if it exists,
-- the name provided, derive it from the CSV filename, or raise an error -- or throw a parse error; if it doesn't exist, use built-in default rules
-- if the CSV filename is -. -- 2. parse the CSV data, or throw a parse error
-- 3. auto-create the rules file with default rules if it doesn't exist -- 3. convert the CSV records to transactions using the rules
-- 4. parse the rules file -- 4. if the rules file didn't exist, create it with the default rules and filename
-- 5. convert the CSV records to a journal using the rules -- 5. return the transactions as a Journal
-- @ -- @
readJournalFromCsv :: Maybe FilePath -> FilePath -> Text -> IO (Either String Journal) readJournalFromCsv :: Maybe FilePath -> FilePath -> Text -> IO (Either String Journal)
readJournalFromCsv Nothing "-" _ = return $ Left "please use --rules-file when reading CSV from stdin" readJournalFromCsv Nothing "-" _ = return $ Left "please use --rules-file when reading CSV from stdin"