Add help
This commit is contained in:
parent
a267d301d4
commit
6292a3a2bd
@ -52,6 +52,20 @@ func loadRecentTimeEntries() {
|
|||||||
timeEntries = gdb.LoadTimeEntryCollection(gime.TypeRecent)
|
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 {
|
func cmdPrintFHGTimesheet(args []string) int {
|
||||||
loadRecentTimeEntries()
|
loadRecentTimeEntries()
|
||||||
|
|
||||||
@ -148,6 +162,11 @@ func initialize() {
|
|||||||
validOperations = make(map[string][]string)
|
validOperations = make(map[string][]string)
|
||||||
opFuncs = make(map[string]func([]string) int)
|
opFuncs = make(map[string]func([]string) int)
|
||||||
|
|
||||||
|
opFuncs["help"] = cmdPrintHelp
|
||||||
|
validOperations["help"] = []string{
|
||||||
|
"help - Prints this",
|
||||||
|
}
|
||||||
|
|
||||||
opFuncs["fhgts"] = cmdPrintFHGTimesheet
|
opFuncs["fhgts"] = cmdPrintFHGTimesheet
|
||||||
validOperations["fhgts"] = []string{
|
validOperations["fhgts"] = []string{
|
||||||
"fhgts [duration] [tags] - Output entries in Flint Hills Group timesheet format",
|
"fhgts [duration] [tags] - Output entries in Flint Hills Group timesheet format",
|
||||||
|
Loading…
Reference in New Issue
Block a user