hledger-0.11: A command-line (or curses or web-based) double-entry accounting tool.Source codeContentsIndex
Hledger.Cli.Options
Description
Command-line options for the application.
Synopsis
options :: [OptDescr Opt]
data Opt
= File {
value :: String
}
| NoNewAccts
| Begin {
value :: String
}
| End {
value :: String
}
| Period {
value :: String
}
| Cleared
| UnCleared
| CostBasis
| Depth {
value :: String
}
| Display {
value :: String
}
| Effective
| Empty
| Real
| Flat
| Drop {
value :: String
}
| NoTotal
| SubTotal
| WeeklyOpt
| MonthlyOpt
| QuarterlyOpt
| YearlyOpt
| BaseUrl {
value :: String
}
| Port {
value :: String
}
| Help
| HelpOptions
| HelpAll
| Verbose
| Version
| BinaryFilename
| Debug
| DebugVty
parseArguments :: IO ([Opt], String, [String])
fixOptDates :: [Opt] -> IO [Opt]
dateSpanFromOpts :: Day -> [Opt] -> DateSpan
intervalFromOpts :: [Opt] -> Interval
depthFromOpts :: [Opt] -> Maybe Int
dropFromOpts :: [Opt] -> Int
displayExprFromOpts :: [Opt] -> Maybe String
baseUrlFromOpts :: [Opt] -> Maybe String
portFromOpts :: [Opt] -> Maybe Int
usingTimeProgramName :: IO Bool
journalFilePathFromOpts :: [Opt] -> IO String
parsePatternArgs :: [String] -> ([String], [String])
optsToFilterSpec :: [Opt] -> [String] -> LocalTime -> FilterSpec
Documentation
options :: [OptDescr Opt]Source
Command-line options we accept.
data Opt Source
An option value from a command-line flag.
Constructors
File
value :: String
NoNewAccts
Begin
value :: String
End
value :: String
Period
value :: String
Cleared
UnCleared
CostBasis
Depth
value :: String
Display
value :: String
Effective
Empty
Real
Flat
Drop
value :: String
NoTotal
SubTotal
WeeklyOpt
MonthlyOpt
QuarterlyOpt
YearlyOpt
BaseUrl
value :: String
Port
value :: String
Help
HelpOptions
HelpAll
Verbose
Version
BinaryFilename
Debug
DebugVty
show/hide Instances
parseArguments :: IO ([Opt], String, [String])Source
Parse the command-line arguments into options, command name, and command arguments. Any dates in the options are converted to explicit YYYYMMDD format based on the current time.
fixOptDates :: [Opt] -> IO [Opt]Source
Convert any fuzzy dates within these option values to explicit ones, based on today's date.
dateSpanFromOpts :: Day -> [Opt] -> DateSpanSource
Figure out the overall date span we should report on, based on any beginendperiod options provided. If there is a period option, the others are ignored.
intervalFromOpts :: [Opt] -> IntervalSource
Figure out the reporting interval, if any, specified by the options. If there is a period option, the others are ignored.
depthFromOpts :: [Opt] -> Maybe IntSource
Get the value of the (last) depth option, if any.
dropFromOpts :: [Opt] -> IntSource
Get the value of the (last) drop option, if any, otherwise 0.
displayExprFromOpts :: [Opt] -> Maybe StringSource
Get the value of the (last) display option, if any.
baseUrlFromOpts :: [Opt] -> Maybe StringSource
Get the value of the (last) baseurl option, if any.
portFromOpts :: [Opt] -> Maybe IntSource
Get the value of the (last) port option, if any.
usingTimeProgramName :: IO BoolSource

Get a maybe boolean representing the last cleared/uncleared option if any.

Were we invoked as "hours" ?

journalFilePathFromOpts :: [Opt] -> IO StringSource
Get the journal file path from options, an environment variable, or a default
parsePatternArgs :: [String] -> ([String], [String])Source
Gather filter pattern arguments into a list of account patterns and a list of description patterns. We interpret pattern arguments as follows: those prefixed with desc: are description patterns, all others are account patterns; also patterns prefixed with not: are negated. not: should come after desc: if both are used.
optsToFilterSpec :: [Opt] -> [String] -> LocalTime -> FilterSpecSource
Convert application options to the library's generic filter specification.
Produced by Haddock version 2.6.1