hledger-lib-0.15: Core data types, parsers and utilities for the hledger accounting tool.

Hledger.Read.Utils

Description

Utilities common to hledger journal readers.

Synopsis

Documentation

parseJournalWith :: GenParser Char JournalContext (JournalUpdate, JournalContext) -> FilePath -> String -> ErrorT String IO JournalSource

Given a JournalUpdate-generating parsec parser, file path and data string, parse and post-process a Journal so that it's ready to use, or give an error.

expandPath :: MonadIO m => SourcePos -> FilePath -> m FilePathSource

Convert a possibly relative, possibly tilde-containing file path to an absolute one. using the current directory from a parsec source position. ~username is not supported.