Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hledger.Read.InputOptions
Description
Various options to use when reading journal files. Similar to CliOptions.inputflags, simplifies the journal-reading functions.
Synopsis
- data InputOpts = InputOpts {
- mformat_ :: Maybe StorageFormat
- mrules_file_ :: Maybe FilePath
- aliases_ :: [String]
- anon_ :: Bool
- new_ :: Bool
- new_save_ :: Bool
- pivot_ :: String
- forecast_ :: Maybe DateSpan
- verbose_tags_ :: Bool
- reportspan_ :: DateSpan
- auto_ :: Bool
- infer_equity_ :: Bool
- infer_costs_ :: Bool
- balancingopts_ :: BalancingOpts
- strict_ :: Bool
- _ioDay :: Day
- class HasInputOpts c where
- inputOpts :: Lens' c InputOpts
- aliases :: Lens' c [String]
- anon__ :: Lens' c Bool
- auto__ :: Lens' c Bool
- balancingopts :: Lens' c BalancingOpts
- forecast :: Lens' c (Maybe DateSpan)
- infer_costs :: Lens' c Bool
- infer_equity :: Lens' c Bool
- ioDay :: Lens' c Day
- mformat :: Lens' c (Maybe StorageFormat)
- mrules_file :: Lens' c (Maybe FilePath)
- new__ :: Lens' c Bool
- new_save :: Lens' c Bool
- pivot :: Lens' c String
- reportspan :: Lens' c DateSpan
- strict :: Lens' c Bool
- verbose_tags :: Lens' c Bool
- definputopts :: InputOpts
- forecastPeriod :: InputOpts -> Journal -> Maybe DateSpan
Types and helpers for input options
Constructors
InputOpts | |
Fields
|
Instances
Show InputOpts # | |
HasBalancingOpts InputOpts # | |
Defined in Hledger.Read.InputOptions | |
HasInputOpts InputOpts # | |
Defined in Hledger.Read.InputOptions Methods inputOpts :: Lens' InputOpts InputOpts # aliases :: Lens' InputOpts [String] # anon__ :: Lens' InputOpts Bool # auto__ :: Lens' InputOpts Bool # balancingopts :: Lens' InputOpts BalancingOpts # forecast :: Lens' InputOpts (Maybe DateSpan) # infer_costs :: Lens' InputOpts Bool # infer_equity :: Lens' InputOpts Bool # ioDay :: Lens' InputOpts Day # mformat :: Lens' InputOpts (Maybe StorageFormat) # mrules_file :: Lens' InputOpts (Maybe FilePath) # new__ :: Lens' InputOpts Bool # new_save :: Lens' InputOpts Bool # pivot :: Lens' InputOpts String # reportspan :: Lens' InputOpts DateSpan # |
class HasInputOpts c where #
Minimal complete definition
Methods
inputOpts :: Lens' c InputOpts #
balancingopts :: Lens' c BalancingOpts #
forecast :: Lens' c (Maybe DateSpan) #
infer_costs :: Lens' c Bool #
infer_equity :: Lens' c Bool #
mformat :: Lens' c (Maybe StorageFormat) #
mrules_file :: Lens' c (Maybe FilePath) #
reportspan :: Lens' c DateSpan #
verbose_tags :: Lens' c Bool #
Instances
HasInputOpts InputOpts # | |
Defined in Hledger.Read.InputOptions Methods inputOpts :: Lens' InputOpts InputOpts # aliases :: Lens' InputOpts [String] # anon__ :: Lens' InputOpts Bool # auto__ :: Lens' InputOpts Bool # balancingopts :: Lens' InputOpts BalancingOpts # forecast :: Lens' InputOpts (Maybe DateSpan) # infer_costs :: Lens' InputOpts Bool # infer_equity :: Lens' InputOpts Bool # ioDay :: Lens' InputOpts Day # mformat :: Lens' InputOpts (Maybe StorageFormat) # mrules_file :: Lens' InputOpts (Maybe FilePath) # new__ :: Lens' InputOpts Bool # new_save :: Lens' InputOpts Bool # pivot :: Lens' InputOpts String # reportspan :: Lens' InputOpts DateSpan # |
forecastPeriod :: InputOpts -> Journal -> Maybe DateSpan #
Get the Maybe the DateSpan to generate forecast options from. This begins on: - the start date supplied to the `--forecast` argument, if present - otherwise, the later of - the report start date if specified with -b-pdate: - the day after the latest normal (non-periodic) transaction in the journal, if any - otherwise today. It ends on: - the end date supplied to the `--forecast` argument, if present - otherwise the report end date if specified with -e-pdate: - otherwise 180 days (6 months) from today.