Documentation
¶
Index ¶
- Variables
- func AddRun(r *cmd.Root, s *cmd.Sub)
- func AllRun(r *cmd.Root, s *cmd.Sub)
- func BacklogRun(r *cmd.Root, s *cmd.Sub)
- func ClaimRun(r *cmd.Root, s *cmd.Sub)
- func ColorRun(r *cmd.Root, s *cmd.Sub)
- func ColorsRun(r *cmd.Root, s *cmd.Sub)
- func CompletedRun(r *cmd.Root, s *cmd.Sub)
- func DoneRun(r *cmd.Root, s *cmd.Sub)
- func InitRun(r *cmd.Root, s *cmd.Sub)
- func ListRun(r *cmd.Root, s *cmd.Sub)
- func ModifyRun(r *cmd.Root, s *cmd.Sub)
- func RemoveRun(r *cmd.Root, s *cmd.Sub)
- func ReportRun(r *cmd.Root, s *cmd.Sub)
- func ResetCompletedRun(r *cmd.Root, s *cmd.Sub)
- func ReturnRun(r *cmd.Root, s *cmd.Sub)
- func UndoRun(r *cmd.Root, s *cmd.Sub)
- type AddArgs
- type AllFlags
- type BacklogFlags
- type ClaimArgs
- type ColorArgs
- type CompletedFlags
- type DoneArgs
- type ListFlags
- type ModifyArgs
- type RemoveArgs
- type ReturnArgs
- type UndoArgs
Constants ¶
This section is empty.
Variables ¶
var Add = cmd.Sub{ Name: "add", Alias: "+", Short: "Add new task", Args: &AddArgs{}, Run: AddRun, }
Add a new task
var All = cmd.Sub{ Name: "all", Short: "Print all tasks", Flags: &AllFlags{}, Run: AllRun, }
All prints a list of every task, regardless of status
var Backlog = cmd.Sub{ Name: "backlog", Alias: "log", Short: "Print current Backlog list", Flags: &BacklogFlags{}, Run: BacklogRun, }
Backlog prints the tasks in the backlog
var Claim = cmd.Sub{ Name: "claim", Alias: "^", Short: "Move a task from the Backlog to TODO", Args: &ClaimArgs{}, Run: ClaimRun, }
Claim moves a task from the Backlog to the TODO list
var Color = cmd.Sub{ Name: "color", Short: "Set color for project or label", Args: &ColorArgs{}, Run: ColorRun, }
Color a new task
var Colors = cmd.Sub{ Name: "colors", Short: "List available colors", Run: ColorsRun, }
Colors prints the supported color codes
var Completed = cmd.Sub{ Name: "completed", Short: "Print current Completed list", Flags: &CompletedFlags{}, Run: CompletedRun, }
Completed prints the completed tasks
var Done = cmd.Sub{ Name: "done", Alias: "!", Short: "Mark task done", Args: &DoneArgs{}, Run: DoneRun, }
Done marks a task as completed
var Init = cmd.Sub{ Name: "init", Short: "Create todo list in the current directory", Run: InitRun, }
Init a new task
var List = cmd.Sub{ Name: "list", Alias: "ls", Short: "Print current TODO list", Flags: &ListFlags{}, Run: ListRun, }
List prints the TODO list
var Modify = cmd.Sub{ Name: "modify", Alias: "mod", Short: "Modify an existing task", Args: &ModifyArgs{}, Run: ModifyRun, }
Modify deletes a task permanently
var Remove = cmd.Sub{ Name: "remove", Short: "Remove a task entirely", Args: &RemoveArgs{}, Run: RemoveRun, }
Remove deletes a task permanently
var Report = cmd.Sub{ Name: "report", Short: "Generate TODO.md summary of all tasks", Run: ReportRun, }
Report prints a list of every task, regardless of status
var ResetCompleted = cmd.Sub{ Name: "reset-completed", Short: "Remove all Completed tasks", Run: ResetCompletedRun, }
ResetCompleted permanently removes all completed tasks
var Return = cmd.Sub{ Name: "return", Alias: ".", Short: "Return a task to the Backlog from TODO", Args: &ReturnArgs{}, Run: ReturnRun, }
Return moves a task from the TODO list to the backlog
var Root = cmd.Root{
Name: "todo",
Short: "A simple text-based task manager, writter in Go",
}
Root forms the basis of this application
var Undo = cmd.Sub{ Name: "undo", Short: "Move a task from Completed to Backlog", Args: &UndoArgs{}, Run: UndoRun, }
Undo moves a task from the TODO list to the backlog
Functions ¶
func BacklogRun ¶
BacklogRun carries out the "backlog" sub-command
func CompletedRun ¶
CompletedRun carries out the "completed" sub-command
func ResetCompletedRun ¶
ResetCompletedRun carries out the "reset-completed" sub-command
Types ¶
type AddArgs ¶
type AddArgs struct {
Spec []string `desc:"Specification for a new task (e.g. @project :label \"New Task\")"`
}
AddArgs accepts a new task specification
type AllFlags ¶
type AllFlags struct {
Project string `short:"p" long:"project" desc:"Name of project to filter on"`
Label string `short:"l" long:"label" desc:"Name of label to fiter on"`
FullTime bool `short:"T" long:"full-time" desc:"Print both date and time for all tasks"`
}
AllFlags contains the flags for the "all" sub-command
type BacklogFlags ¶
type BacklogFlags struct {
Project string `short:"p" long:"project" desc:"Name of project to filter on"`
Label string `short:"l" long:"label" desc:"Name of label to fiter on"`
FullTime bool `short:"T" long:"full-time" desc:"Print both date and time for all tasks"`
}
BacklogFlags contains the flags for the "backlog" sub-command
type ClaimArgs ¶
type ClaimArgs struct {
IDs []uint `desc:"ID(s) of Task(s) to claim as TODO"`
}
ClaimArgs specifies the ID of the task to claim
type ColorArgs ¶
type ColorArgs struct {
Spec string `desc:"specification for a project or label (e.g. @project or :label "`
Name string `desc:"name of color"`
}
ColorArgs accepts a color specification
type CompletedFlags ¶
type CompletedFlags struct {
Project string `short:"p" long:"project" desc:"Name of project to filter on"`
Label string `short:"l" long:"label" desc:"Name of label to fiter on"`
FullTime bool `short:"T" long:"full-time" desc:"Print both date and time for all tasks"`
}
CompletedFlags contains the flags for the "completed" sub-command
type DoneArgs ¶
type DoneArgs struct {
IDs []uint `desc:"ID(s) of Task(s) to mark as done"`
}
DoneArgs specifies the ID of the task to mark done
type ListFlags ¶
type ListFlags struct {
Project string `short:"p" long:"project" desc:"Name of project to filter on"`
Label string `short:"l" long:"label" desc:"Name of label to fiter on"`
FullTime bool `short:"T" long:"full-time" desc:"Print both date and time for all tasks"`
}
ListFlags contains the flags for the "list" sub-command
type ModifyArgs ¶
type ModifyArgs struct {
ID uint `desc:"ID of Task to modify"`
Spec []string `desc:"Specification for modifying the task (e.g. @new_project :new_label \"New Name\")"`
}
ModifyArgs specifies the ID of the task to modify
type RemoveArgs ¶
type RemoveArgs struct {
IDs []uint `desc:"ID(s) of Task(s) to remove"`
}
RemoveArgs specifies the ID of the task to remove
type ReturnArgs ¶
type ReturnArgs struct {
IDs []uint `desc:"ID(s) of Task(s) to return"`
}
ReturnArgs specifies the ID of the task to return