Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogCmd ¶ added in v0.3.0
type LogCmd struct {
Category string `arg:"" required:"" help:"Category to log the new entry under. (Use '-' to use the last category logged)"`
Note []string `arg:"" optional:"" help:"Description for the entry"`
Date time.Time `short:"d" optional:"" format:"2006-01-02" help:"Date to log (default: today)"`
Time time.Time `short:"t" optional:"" format:"15:04" help:"Time to log entry at (default: now)"`
}
func (*LogCmd) AfterApply ¶ added in v0.6.0
type ReportCmd ¶ added in v0.3.0
type ReportCmd struct {
// TODO: Times are tricky... Make sure this is the same timezone as time.Now()
Start time.Time `short:"s" optional:"" format:"2006-01-02" help:"Date to start report from (default: today)"`
End time.Time `short:"e" optional:"" format:"2006-01-02" help:"Date to end report from (default: time.Now)"`
UseRootCategory bool `` /* 145-byte string literal not displayed */
DurationFormat string `` /* 129-byte string literal not displayed */
// TODO: Make this a cleaner API?
Output report.OutputFormat `short:"o" enum:"default,markdown,html,json" default:"default" help:"Premade formats (default,markdown,html,json)"`
Template string `type:"existingfile" help:"File text/template to use in making report (Overrides --output)"`
// TODO: This gets tricky since it could also be time...
// TODO: Also probably should be an ENV?
Until time.Duration `short:"u" help:"Desired duration of work to log"`
// contains filtered or unexported fields
}
func (*ReportCmd) AfterApply ¶ added in v0.6.0
type RootCmd ¶ added in v0.3.1
type RootCmd struct {
Report ReportCmd `cmd:"" help:"Print summary report"`
Serve ServeCmd `cmd:"" help:"Run gotime as a HTTP server via localhost."`
Log LogCmd `default:"withargs" cmd:"" help:"Log using a custom category and note."`
LogFile string `default:"~/.config/gotime.csv" help:"Path to log file." env:"GOTIME_LOG"`
}
Click to show internal directories.
Click to hide internal directories.