Source codeContentsIndex
Hledger.Read
Description
Read hledger data from various data formats, and related utilities.
Synopsis
readers :: [Reader]
readerForFormat :: String -> Maybe Reader
journalFromPathAndString :: Maybe String -> FilePath -> String -> IO (Either String Journal)
readJournalFile :: Maybe String -> FilePath -> IO (Either String Journal)
ensureJournalFile :: FilePath -> IO ()
emptyJournal :: IO String
readJournal :: Maybe String -> String -> IO (Either String Journal)
myJournalPath :: IO String
myTimelogPath :: IO String
myJournal :: IO Journal
myTimelog :: IO Journal
Documentation
readers :: [Reader]Source
readerForFormat :: String -> Maybe ReaderSource
journalFromPathAndString :: Maybe String -> FilePath -> String -> IO (Either String Journal)Source
Read a Journal from this string (and file path), auto-detecting the data format, or give a useful error string. Tries to parse each known data format in turn. If none succeed, gives the error message specific to the intended data format, which if not specified is guessed from the file suffix and possibly the data.
readJournalFile :: Maybe String -> FilePath -> IO (Either String Journal)Source
Read a journal from this file, using the specified data format or trying all known formats, or give an error string; also create the file if it doesn't exist.
ensureJournalFile :: FilePath -> IO ()Source
Ensure there is a journal at the given file path, creating an empty one if needed.
emptyJournal :: IO StringSource
Give the content for a new auto-created journal file.
readJournal :: Maybe String -> String -> IO (Either String Journal)Source
Read a Journal from this string, using the specified data format or trying all known formats, or give an error string.
myJournalPath :: IO StringSource
Get the user's default journal file path.
myTimelogPath :: IO StringSource
Get the user's default timelog file path.
myJournal :: IO JournalSource
Read the user's default journal file, or give an error.
myTimelog :: IO JournalSource
Read the user's default timelog file, or give an error.
Produced by Haddock version 2.6.1