Command-line options for the application.
- options :: [OptDescr Opt]
- data Opt
- = File { }
- | NoNewAccts
- | Begin { }
- | End { }
- | Period { }
- | Cleared
- | UnCleared
- | CostBasis
- | Depth { }
- | Display { }
- | Effective
- | Empty
- | Real
- | Flat
- | Drop { }
- | NoTotal
- | SubTotal
- | DailyOpt
- | WeeklyOpt
- | MonthlyOpt
- | QuarterlyOpt
- | YearlyOpt
- | BaseUrl { }
- | Port { }
- | 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
An option value from a command-line flag.
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.