todos- Easy-to-use TODOs manager.

Safe HaskellNone




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




outOnlyFirst :: 𝔹

Output only first matching entry

outColors :: 𝔹

Show colored output

outIds :: 𝔹

Show IDs

outHighlight :: 𝔹

Highlight matching items

sorting :: SortingType

How to sort items

pruneL :: Limit
minL :: Limit
commandToRun :: TodoCommand
prefix :: Maybe String

Nothing — use default parser, Just p — use alternate parser with prefix «p»

outputFormat :: String
indentString :: String

String to use for output tree indenting (two spaces by default)

skipStatus :: 𝔹

Skip status field in input

groupByFile :: 𝔹
groupByTag :: 𝔹
groupByStatus :: 𝔹
forcedStatus :: Maybe String
topStatus :: Maybe String

data PrintConfig c Source

Configuration for console output. Is generated in runtime from TodosConfig and Config.




printConfig :: c
printStatusColor :: String -> (ColorIntensity, Color)

Color of status field from status

printItemColor :: TodoItem -> Maybe (ColorIntensity, Color)

Color of item name

printHighlightColor :: (ColorIntensity, Color)

Color to use for highlighting

doHighlight :: TodoItem -> 𝔹

Whether to highlight given item

data TodosConfig c Source

User Todos config. User can specify it in ~.configtodos/todos.hs.




parseCommandLine :: DateTime -> c -> [String] -> CmdLineParseResult c

Function to parse command line

filterTodos :: DateTime -> c -> [Todo] -> [Todo]

Any function to be run to transform read TODOs tree

statusConsoleColor :: String -> (ColorIntensity, Color)

Function to select a color of item's status field in console output

itemConsoleColor :: TodoItem -> Maybe (ColorIntensity, Color)

Function to select a color of item's name in console output

highlightColor :: (ColorIntensity, Color)

Color to use for highlighting

itemColor :: TodoItem -> HSV

Function to select color for item's node in DOT output

itemShape :: TodoItem -> Shape

Function to select shape for item's node in DOT output

printTodos :: PrintConfig c -> [Todo] -> IO ()

Any function to output TODOs list

nullConfig :: c

Default Config (to be used without any options in command line and configs)

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


User asked for help


askBase :: RuntimeConfig c => (BaseConfig -> a) -> Reader c aSource

ask field from BaseConfig