hledger-web-1.26.1: Web-based user interface for the hledger accounting system
Safe HaskellNone
LanguageHaskell2010

Hledger.Web.Widget.Common

Synopsis

Documentation

balanceReportAsHtml :: Eq r => (r, r) -> r -> Bool -> Journal -> Text -> [QueryOpt] -> BalanceReport -> HtmlUrl r Source #

Render a BalanceReport as html.

helplink :: Text -> Text -> HtmlUrl r Source #

Link to a topic in the manual.

writeJournalTextIfValidAndChanged :: MonadHandler m => FilePath -> Text -> ExceptT String m () Source #

A helper for postEditR/postUploadR: check that the given text parses as a Journal, and if so, write it to the given file, if the text has changed. Or, return any error message encountered.

As a convenience for data received from web forms, which does not have normalised line endings, line endings will be normalised (to n) before parsing.

The file will be written (if changed) with the current system's native line endings (see writeFileWithBackupIfChanged).