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

Safe HaskellNone
LanguageHaskell98

Foundation

Contents

Synopsis

Documentation

data App Source

The site argument for your application. This can be a good place to keep settings and values requiring initialization before your application starts running, such as database connections. Every handler will have access to the data present here.

Constructors

App 

Fields

settings :: AppConfig DefaultEnv Extra
 
getStatic :: Static

Settings for static file serving.

httpManager :: Manager
 
appOpts :: WebOpts
 
appJournal :: IORef Journal
 

Creates the route datatype AppRoute. Every valid URL in your

Creates the associated type:

Creates the value resourcesApp which contains information on the

type AppRoute = Route App Source

A convenience alias.

getExtra :: Handler Extra Source

Get the Extra value, used to hold data from the settings.yml file.

data ViewData Source

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

Constructors

VD 

Fields

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

showsidebar :: Bool

current showsidebar cookie value

nullviewdata :: ViewData Source

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

viewdataWithDateAndParams :: Day -> String -> String -> String -> ViewData Source

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

getViewData :: Handler ViewData Source

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.

addform :: Text -> ViewData -> HtmlUrl AppRoute Source

Add transaction form.