taskwarrior-0.1.2.0: Types and aeson instances for taskwarrior tasks

Safe HaskellNone
LanguageHaskell2010

Taskwarrior.IO

Description

This modules contains IO actions to interact with the taskwarrior application. The taskwarrior documentation very explicitly disallows accessing the files by itself. So all functions here work via calling the task binary which needs to be in the PATH.

Synopsis

Documentation

getTasks :: [Text] -> IO [Task] Source #

Uses `task export` with a given filter like `["description:Milk", "+PENDING"]`.

saveTasks :: [Task] -> IO () Source #

Uses task import to save the given tasks.

createTask :: Text -> IO Task Source #

This will create a Task. I runs in IO to create a UUID and get the currentTime. This will not save the Task to taskwarrior. If you want to create a task, with certain fields and save it, you could do that like this:

newTask <- createTask "Buy Milk"
saveTasks [newTask { tags = ["groceries"] }]

getUUIDs :: [Text] -> IO [UUID] Source #

Gives all uuids matching the given filter (e.g. `["description:Milk", "+PENDING"]`). This calls the task binary.