hledger-lib-1.12: Core data types, parsers and functionality for the hledger accounting tools

Safe HaskellNone
LanguageHaskell2010

Hledger.Read.CsvReader

Contents

Description

A reader for CSV data, using an extra rules file to help interpret the data.

Synopsis

Reader

Misc.

type CSV = [Record] Source #

type Record = [Field] Source #

parseRulesFile :: FilePath -> ExceptT String IO CsvRules Source #

An error-throwing action that parses this file's content as CSV conversion rules, interpolating any included files first, and runs some extra validation checks.

parseAndValidateCsvRules :: FilePath -> Text -> ExceptT String IO CsvRules Source #

An error-throwing action that parses this text as CSV conversion rules and runs some extra validation checks. The file path is for error messages.

expandIncludes :: FilePath -> Text -> IO Text Source #

Inline all files referenced by include directives in this hledger CSV rules text, recursively. Included file paths may be relative to the directory of the provided file path. This is a cheap hack to avoid rewriting the CSV rules parser.

Tests

Orphan instances