diff options
| author | Grant Ammons <gammons@gmail.com> | 2016-05-03 14:34:30 -0400 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2016-05-03 14:34:30 -0400 |
| commit | ea7732efeba8fbb987117394055c11b574fc1649 (patch) | |
| tree | 4706dbf88b50033a34eae799448e1c26d70ecd8a /todo.go | |
| parent | e104abcb3f13a8d6ee1c071c6aaceb2fbfbef775 (diff) | |
Add a usage doc
Diffstat (limited to 'todo.go')
| -rw-r--r-- | todo.go | 74 |
1 files changed, 73 insertions, 1 deletions
@@ -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) { |
