This commit is contained in:
Brian Buller 2018-01-25 10:20:30 -06:00
parent a267d301d4
commit 6292a3a2bd

View File

@ -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",