From 8be5f93f5b2d4b6f438ca84094937a0f7101c59b Mon Sep 17 00:00:00 2001 From: T Date: Sat, 2 Aug 2025 17:25:59 -0600 Subject: Initial commit of punchcard. Contains working time tracking commands, and the stub of a command to generate reports. --- internal/commands/report.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 internal/commands/report.go (limited to 'internal/commands/report.go') diff --git a/internal/commands/report.go b/internal/commands/report.go new file mode 100644 index 0000000..eaa1b49 --- /dev/null +++ b/internal/commands/report.go @@ -0,0 +1,44 @@ +package commands + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +func NewReportCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "report", + Short: "Generate reports from tracked time", + Long: "Generate various types of reports (invoices, timesheets, etc.) from tracked time data.", + } + + cmd.AddCommand(NewReportInvoiceCmd()) + cmd.AddCommand(NewReportTimesheetCmd()) + + return cmd +} + +func NewReportInvoiceCmd() *cobra.Command { + return &cobra.Command{ + Use: "invoice", + Short: "Generate a PDF invoice", + Long: "Generate a PDF invoice from tracked time.", + RunE: func(cmd *cobra.Command, args []string) error { + fmt.Println("Invoice generation (placeholder)") + return nil + }, + } +} + +func NewReportTimesheetCmd() *cobra.Command { + return &cobra.Command{ + Use: "timesheet", + Short: "Generate a PDF timesheet", + Long: "Generate a PDF timesheet report from tracked time.", + RunE: func(cmd *cobra.Command, args []string) error { + fmt.Println("Timesheet generation (placeholder)") + return nil + }, + } +} -- cgit v1.2.3