Documentation
¶
Overview ¶
Package commands implements the CLI subcommands for the tt tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edit ¶
type List ¶
type Report ¶
type Report struct {
// Specify the range positionally
Start *types.Date `arg:"positional" help:"specify the start of the reporting range (defaults to the beginning of last month)"`
End *types.Date `arg:"positional" help:"specify the end of the reporting range (defaults to the end of last month)"`
// Specify the range using shorthand
Month types.Month `` /* 146-byte string literal not displayed */
Year int `arg:"-y,--year" help:"shorthand for reporting over an entire year (can be combined with --month)"`
Today bool `arg:"--today" help:"shorthand for reporting on today"`
Yesterday bool `arg:"--yesterday" help:"shorthand for reporting on yesterday"`
ThisWeek bool `arg:"--thisweek" help:"shorthand for reporting on the current week (Sunday-today)"`
LastWeek bool `arg:"--lastweek" help:"shorthand for reporting on last week (Sunday-Saturday)"`
ThisMonth bool `arg:"--thismonth" help:"shorthand for reporting on the current month"`
LastMonth bool `arg:"--lastmonth" help:"shorthand for reporting on last month"`
ThisYear bool `arg:"--thisyear" help:"shorthand for reporting on the current year"`
LastYear bool `arg:"--lastyear" help:"shorthand for reporting on last year"`
// Specify the grains to show
TaskGrain bool `arg:"--taskgrain" help:"report on the task grain"`
NoTaskGrain bool `arg:"--no-taskgrain" help:"do not report on the task grain"`
DescriptionGrain bool `arg:"--descriptiongrain" help:"report on the task grain"`
NoDescriptionGrain bool `arg:"--no-descriptiongrain" help:"do not report on the task grain"`
// Narrow the set of time entries to report on
Customer timeentry.Customer `arg:"-c,--customer" help:"customer ID to generate a report for"`
Project timeentry.Project `arg:"-p,--project" help:"project name to generate a report for"`
// How to sort the report
Sort Sort `arg:"-s,--sort" help:"the grain to sort the report by (alphabetical,alpha,a or time-spent,time,t)" default:"time-spent"`
Desc bool `arg:"--desc" help:"sort descending"`
Asc bool `arg:"--asc" help:"sort ascending"`
// Output file
OutputFile types.Filename `` /* 174-byte string literal not displayed */
}
type Resume ¶
type Resume struct {
Entry int `arg:"-n,--entry" help:"entry number to resume (negative counts from end: -1=last, -2=second-to-last)" default:"-1"`
Description *string `` /* 127-byte string literal not displayed */
Start *types.Time `arg:"-s,--start" help:"the start time of the resumed time entry" default:"now"`
}
type Start ¶
type Start struct {
Description string `arg:"positional" placeholder:"DESC" help:"the descripiton of the time entry"`
Start *types.Time `arg:"-s,--start" help:"the start time of the time entry" default:"now"`
Type timeentry.TimeEntryType `arg:"-t,--type" help:"the type of the time entry"`
Project timeentry.Project `arg:"-p,--project" help:"the project of the time entry"`
Customer timeentry.Customer `arg:"-c,--customer" help:"the customer of the time entry"`
TaskID timeentry.TaskID `arg:"-i,--taskid" help:"the task ID of the time entry"`
}
Click to show internal directories.
Click to hide internal directories.