hledger-web-0.21.3: A web interface for the hledger accounting tool.

Safe HaskellNone



Web handler utilities.



data ViewData Source

A bundle of data useful for hledger-web request handlers and templates.




opts :: WebOpts

the command-line options at startup

here :: AppRoute

the current route

msg :: Maybe Html

the current UI message if any, possibly from the current request

today :: Day

today's date (for queries containing relative dates)

j :: Journal

the up-to-date parsed unfiltered journal

q :: String

the current q parameter, the main query expression

m :: Query

a query parsed from the q parameter

qopts :: [QueryOpt]

query options parsed from the q parameter

am :: Query

a query parsed from the accounts sidebar query expr (a parameter)

aopts :: [QueryOpt]

query options parsed from the accounts sidebar query expr

showpostings :: Bool

current p parameter, 1 or 0 shows/hides all postings where applicable

nullviewdata :: ViewDataSource

Make a default ViewData, using day 0 as today's date.

viewdataWithDateAndParams :: Day -> String -> String -> String -> ViewDataSource

Make a ViewData using the given date and request parameters, and defaults elsewhere.

getViewData :: Handler ViewDataSource

Gather data used by handlers and templates in the current request.

getMessageOr :: Maybe String -> Handler (Maybe Html)Source

Get the message set by the last request, or the newer message provided, if any.

numbered :: [a] -> [(Int, a)]Source