aboutsummaryrefslogtreecommitdiffstats
path: root/todo.go
diff options
context:
space:
mode:
Diffstat (limited to 'todo.go')
-rw-r--r--todo.go74
1 files changed, 73 insertions, 1 deletions
diff --git a/todo.go b/todo.go
index 7c567a6..a0ba30e 100644
--- a/todo.go
+++ b/todo.go
@@ -5,9 +5,14 @@ import (
"os"
"strings"
+ "github.com/fatih/color"
"github.com/gammons/todolist/todolist"
)
+const (
+ Version = "0.1.0"
+)
+
func main() {
if len(os.Args) <= 1 {
usage()
@@ -18,7 +23,74 @@ func main() {
}
func usage() {
- fmt.Println("usage")
+ blue := color.New(color.FgBlue)
+ cyan := color.New(color.FgCyan)
+ yellow := color.New(color.FgYellow)
+
+ blueBold := blue.Add(color.Bold)
+
+ fmt.Printf("todo v%s, a simple, command line based, GTD-style todo manager\n", Version)
+
+ blueBold.Println("\nAdding todos")
+ fmt.Println(" the 'a' command adds todos.")
+ fmt.Println(" You can also optionally specify a due date.")
+ fmt.Println(" Specify a due date by putting 'due <date>' at the end, where <date> is in (tod|today|tom|tomorrow|mon|tue|wed|thu|fri|sat|sun)")
+ fmt.Println("\n Examples for adding a todo:")
+ yellow.Println("\ttodo a Meeting with @bob about +importantPrject due today")
+ yellow.Println("\ttodo a +work +verify did @john fix the build\\?")
+
+ blueBold.Println("\nListing todos")
+ fmt.Println(" When listing todos, you can filter and group the output.\n")
+
+ fmt.Println(" todo l due (tod|today|tom|tomorrow|overdue|this week|next week|mon|tue|wed|thu|fri|sat|sun)")
+ fmt.Println(" todo l overdue")
+
+ cyan.Println(" Filtering by date:\n")
+ yellow.Println("\ttodo l due tod")
+ fmt.Println("\tlists all todos due today\n")
+ yellow.Println("\ttodo l due tom")
+ fmt.Println("\tlists all todos due tomorrow\n")
+ yellow.Println("\ttodo l due mon")
+ fmt.Println("\tlists all todos due monday\n")
+ yellow.Println("\ttodo l overdue")
+ fmt.Println("\tlists all todos where the due date is in the past\n")
+
+ cyan.Println(" Grouping:")
+ fmt.Println(" You can group todos by context or project.")
+ yellow.Println("\ttodo l by c")
+ fmt.Println("\tlists all todos grouped by context\n")
+ yellow.Println("\ttodo l by p")
+ fmt.Println("\tlists all todos grouped by project\n")
+
+ cyan.Println(" Grouping and filtering:")
+ fmt.Println(" Of course, you can combine grouping and filtering to get a nice formatted list.\n")
+ yellow.Println("\ttodo l due today by c")
+ fmt.Println("\tlists all todos due today grouped by context\n")
+ yellow.Println("\ttodo l +project due this week by c")
+ fmt.Println("\tlists all todos due today for +project, grouped by context\n")
+ yellow.Println("\ttodo l @frank due tom by p")
+ fmt.Println("\tlists all todos due tomorrow concerining @frank for +project, grouped by project\n")
+
+ blueBold.Println("\nCompleting and uncompleting ")
+ fmt.Println("Complete and Uncomplete a todo by its Id:\n")
+ yellow.Println("\ttodo c 33")
+ fmt.Println("\tCompletes a todo with id 33\n")
+ yellow.Println("\ttodo uc 33")
+ fmt.Println("\tUncompletes a todo with id 33\n")
+
+ blueBold.Println("\nArchiving")
+ fmt.Println("You can archive todos once they are done, or if you might come back to them.")
+ fmt.Println("By default, todo will only show unarchived todos.\n")
+ yellow.Println("\ttodo ar 33")
+ fmt.Println("\tArchives a todo with id 33\n")
+ yellow.Println("\ttodo ac")
+ fmt.Println("\tArchives all completed todos\n")
+ yellow.Println("\ttodo l archived")
+ fmt.Println("\tlist all archived todos\n")
+
+ blueBold.Println("\nDeleting")
+ yellow.Println("\ttodo d 33")
+ fmt.Println("\tDeletes a todo with id 33\n")
}
func routeInput(command string, input string) {