Safe Haskell | None |
---|---|
Language | GHC2021 |
Cli
Synopsis
- type String = [Char]
- data Command
- = AddTask [Text]
- | AddWrite [Text]
- | AddRead [Text]
- | AddIdea [Text]
- | AddWatch [Text]
- | AddListen [Text]
- | AddBuy [Text]
- | AddSell [Text]
- | AddPay [Text]
- | AddShip [Text]
- | LogTask [Text]
- | EnterTask
- | ReadyOn DateTime [IdText]
- | WaitTasks [IdText]
- | WaitFor Duration [IdText]
- | ReviewTasks [IdText]
- | ReviewTasksIn Duration [IdText]
- | DoTasks [IdText]
- | DoOneTask IdText (Maybe [Text])
- | EndTasks [IdText]
- | EndOneTask IdText (Maybe [Text])
- | TrashTasks [IdText]
- | DeleteTasks [IdText]
- | RepeatTasks Duration [IdText]
- | RecurTasks Duration [IdText]
- | BoostTasks [IdText]
- | HushTasks [IdText]
- | Prioritize Float [IdText]
- | AddTag TagText [IdText]
- | DeleteTag TagText [IdText]
- | AddNote Text [IdText]
- | DeleteNote IdText
- | SetDueUtc DateTime [IdText]
- | Start [IdText]
- | Stop [IdText]
- | Duplicate [IdText]
- | EditTask IdText
- | InfoTask IdText
- | NextTask
- | RandomTask (Maybe [Text])
- | FindTask Text
- | ImportFile FilePath
- | ImportDir FilePath
- | ImportJson
- | ImportYaml
- | ImportMarkdown
- | ImportEml
- | IngestFile FilePath
- | IngestDir FilePath
- | Csv
- | Json
- | Ndjson
- | Sql
- | Backup
- | ListAll
- | ListHead
- | ListNewFiltered (Maybe [Text])
- | ListOld
- | ListOpen (Maybe [Text])
- | ListModified
- | ListModifiedOnly
- | ListDone
- | ListObsolete
- | ListDeletable
- | ListReady
- | ListWaiting
- | ListOverdue
- | ListRepeating
- | ListRecurring
- | ListNoTag
- | ListWithTag [Text]
- | CountFiltered (Maybe [Text])
- | QueryTasks Text
- | RunSql Text
- | RunFilter [Text]
- | Tags
- | Projects
- | Notes
- | Stats
- | UnCloseTasks [IdText]
- | UnDueTasks [IdText]
- | UnWaitTasks [IdText]
- | UnWakeTasks [IdText]
- | UnReadyTasks [IdText]
- | UnReviewTasks [IdText]
- | UnRepeatTasks [IdText]
- | UnRecurTasks [IdText]
- | UnTagTasks [IdText]
- | UnNoteTasks [IdText]
- | UnPrioTasks [IdText]
- | UnMetaTasks [IdText]
- | Version
- | Alias Text (Maybe [Text])
- | Help
- | PrintConfig
- | StartServer
- | UlidToUtc Text
- | ExternalCommand Text (Maybe [Text])
- data CliOptions = CliOptions {
- noColorFlag :: Bool
- cliCommand :: Command
- nameToAliasList :: [(Text, Text)]
- versionSlug :: Text
- aliasWarning :: Text -> Doc AnsiStyle
- getCommand :: (Text, Text) -> Mod CommandFields Command
- toParserInfo :: Parser a -> Text -> ParserInfo a
- idVar :: Mod ArgumentFields a
- idsVar :: Mod ArgumentFields a
- basic_sec :: (Text, Text)
- shortcut_sec :: (Text, Text)
- list_sec :: (Text, Text)
- vis_sec :: (Text, Text)
- i_o_sec :: (Text, Text)
- advanced_sec :: (Text, Text)
- alias_sec :: (Text, Text)
- unset_sec :: (Text, Text)
- utils_sec :: (Text, Text)
- parseDurationString :: String -> Either String Duration
- cliOptionsParser :: Config -> Parser CliOptions
- commandParser :: Config -> Parser Command
- commandParserInfo :: Config -> ParserInfo CliOptions
- groupBySpace :: Text -> [Doc ann]
- replaceDoc :: Doc ann -> Doc ann -> [Doc ann] -> [Doc ann]
- spliceDocsIntoText :: [(Text, Doc AnsiStyle)] -> Text -> [Doc AnsiStyle]
- helpReplacements :: Config -> [(Text, Doc AnsiStyle)]
- getHelpText :: String -> Config -> Doc AnsiStyle
- handleExternalCommand :: Config -> Text -> Maybe [Text] -> IO (Doc AnsiStyle)
- executeCLiCommand :: Config -> DateTime -> Connection -> String -> [String] -> Maybe Int -> IO (Doc AnsiStyle)
- printOutput :: String -> Maybe [String] -> Config -> IO ()
- exampleConfig :: Text
Documentation
Constructors
data CliOptions Source #
Constructors
CliOptions | |
Fields
|
Instances
Show CliOptions Source # | |
Defined in Cli Methods showsPrec :: Int -> CliOptions -> ShowS # show :: CliOptions -> String # showList :: [CliOptions] -> ShowS # | |
Eq CliOptions Source # | |
Defined in Cli |
nameToAliasList :: [(Text, Text)] Source #
versionSlug :: Text Source #
getCommand :: (Text, Text) -> Mod CommandFields Command Source #
toParserInfo :: Parser a -> Text -> ParserInfo a Source #
idVar :: Mod ArgumentFields a Source #
idsVar :: Mod ArgumentFields a Source #
shortcut_sec :: (Text, Text) Source #
Help Sections
advanced_sec :: (Text, Text) Source #
Help Sections
groupBySpace :: Text -> [Doc ann] Source #
spliceDocsIntoText :: [(Text, Doc AnsiStyle)] -> Text -> [Doc AnsiStyle] Source #
Because optparse-applicative does not support styling group headers, this function is necessary to splice new Docs into the old Docs TODO: Remove after https://github.com/pcapriotti/optparse-applicative/issues/485
executeCLiCommand :: Config -> DateTime -> Connection -> String -> [String] -> Maybe Int -> IO (Doc AnsiStyle) Source #
exampleConfig :: Text Source #