- class RuntimeConfig c where
- getPredicate :: DateTime -> c -> TodoItem -> 𝔹
- toBaseConfig :: c -> BaseConfig
- data BaseConfig = BConfig {
- outOnlyFirst :: 𝔹
- outColors :: 𝔹
- outIds :: 𝔹
- outHighlight :: 𝔹
- sorting :: SortingType
- pruneL :: Limit
- minL :: Limit
- commandToRun :: TodoCommand
- prefix :: Maybe String
- outputFormat :: String
- indentString :: String
- skipStatus :: 𝔹
- groupByFile :: 𝔹
- groupByTag :: 𝔹
- groupByStatus :: 𝔹
- forcedStatus :: Maybe String
- topStatus :: Maybe String
- data PrintConfig c = PConfig {
- printConfig :: c
- printStatusColor :: String -> (ColorIntensity, Color)
- printItemColor :: TodoItem -> Maybe (ColorIntensity, Color)
- printHighlightColor :: (ColorIntensity, Color)
- doHighlight :: TodoItem -> 𝔹
- data TodosConfig c = Todos {
- parseCommandLine :: DateTime -> c -> [String] -> CmdLineParseResult c
- filterTodos :: DateTime -> c -> [Todo] -> [Todo]
- statusConsoleColor :: String -> (ColorIntensity, Color)
- itemConsoleColor :: TodoItem -> Maybe (ColorIntensity, Color)
- highlightColor :: (ColorIntensity, Color)
- itemColor :: TodoItem -> HSV
- itemShape :: TodoItem -> Shape
- printTodos :: PrintConfig c -> [Todo] -> IO ()
- nullConfig :: c
- data CmdLineParseResult c
- = Parsed c [FilePath]
- | ParseError String
- | CmdLineHelp
- askBase :: RuntimeConfig c => (BaseConfig -> a) -> Reader c a
Documentation
class RuntimeConfig c whereSource
Any user-specified runtime config type should belong to this class
getPredicate :: DateTime -> c -> TodoItem -> 𝔹Source
Does given TODO item match query?
toBaseConfig :: c -> BaseConfigSource
Get basic configuration
data BaseConfig Source
Any user-specified runtime config type should include at least this properties
BConfig | |
|
data PrintConfig c Source
Configuration for console output. Is generated in runtime from TodosConfig and Config.
PConfig | |
|
RuntimeConfig c => RuntimeConfig (PrintConfig c) |
data TodosConfig c Source
User Todos config. User can specify it in ~.configtodos/todos.hs
.
Todos | |
|
data CmdLineParseResult c Source
Result of parsing command line
Parsed c [FilePath] | Parsed successfully, got Config and list of source files |
ParseError String | Some error occured |
CmdLineHelp | User asked for help |
Eq c => Eq (CmdLineParseResult c) | |
Show c => Show (CmdLineParseResult c) |
askBase :: RuntimeConfig c => (BaseConfig -> a) -> Reader c aSource
ask field from BaseConfig