Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TASKRC = PathExpandTilda("~/.taskrc")
TASKRC is the default configuration path.
Functions ¶
func GetAvailableKeys ¶
func GetAvailableKeys() []string
GetAvailableKeys returns list of available configuration options represented by TaskRC structure fields.
func PathExpandTilda ¶
PathExpandTilda expands tilda in filepath as $HOME of current user.
func StripComments ¶
StripComments remove commented part of input string.
Types ¶
type Task ¶
type Task struct {
Description string `json:"description"`
Project string `json:"project,omitempty"`
Status string `json:"status"`
Uuid string `json:"uuid"`
Urgency float32 `json:"urgency,omitempty"`
Priority string `json:"priority,omitempty"`
Due string `json:"due,omitempty"`
End string `json:"end,omitempty"`
Entry string `json:"entry,omitempty"`
Modified string `json:"modified,omitempty"`
Annotations []TaskAnnotation `json:"annotations,omitempty"`
}
Task representation.
type TaskAnnotation ¶
TaskAnnotation representation of an annotation
type TaskRC ¶
type TaskRC struct {
ConfigPath string // Location of this .taskrc
DataLocation string `taskwarrior:"data.location"`
}
TaskRC describes configuration file entries that currently supported by this library.
func ParseTaskRC ¶
ParseTaskRC returns new TaskRC struct instance that contains fields with given configuration file values.
type TaskWarrior ¶
type TaskWarrior struct {
Config *TaskRC // Configuration options
Tasks []Task // Task JSON entries
}
TaskWarrior rpresents a single taskwarrior instance
func NewTaskWarrior ¶
func NewTaskWarrior(configPath string) (*TaskWarrior, error)
NewTaskWarrior create new empty TaskWarrior instance.
func (*TaskWarrior) AddTask ¶
func (tw *TaskWarrior) AddTask(task *Task)
AddTask adds new Task entry to given TaskWarrior.
func (*TaskWarrior) Commit ¶
func (tw *TaskWarrior) Commit() error
Commit save current changes of given TaskWarrior instance.
func (*TaskWarrior) FetchAllTasks ¶
func (tw *TaskWarrior) FetchAllTasks() error
FetchAllTasks fetchs all tasks for given TaskWarrior with system `taskwarrior` command call.
func (*TaskWarrior) PrintTasks ¶
func (tw *TaskWarrior) PrintTasks()
PrintTasks pretty print for all tasks represented in given TaskWarrior.