diff --git a/cmd/gime-export/main.go b/cmd/gime-export/main.go index a0c6010..a93f46b 100644 --- a/cmd/gime-export/main.go +++ b/cmd/gime-export/main.go @@ -52,6 +52,20 @@ func loadRecentTimeEntries() { timeEntries = gdb.LoadTimeEntryCollection(gime.TypeRecent) } +func cmdPrintHelp(args []string) int { + //if len(args) == 0 { + fmt.Println("gime-export - An export utility for the gime application\n") + fmt.Println("Usage: gime-export [format] [[start date/time]-[end date/time]] [tags...]") + for _, v := range validOperations { + for vi := range v { + fmt.Println(" ", v[vi]) + } + fmt.Println("") + } + //} + return 0 +} + func cmdPrintFHGTimesheet(args []string) int { loadRecentTimeEntries() @@ -148,6 +162,11 @@ func initialize() { validOperations = make(map[string][]string) opFuncs = make(map[string]func([]string) int) + opFuncs["help"] = cmdPrintHelp + validOperations["help"] = []string{ + "help - Prints this", + } + opFuncs["fhgts"] = cmdPrintFHGTimesheet validOperations["fhgts"] = []string{ "fhgts [duration] [tags] - Output entries in Flint Hills Group timesheet format",