From 5c3554c7e49abe263faf54c61e435ba1d5202d27 Mon Sep 17 00:00:00 2001 From: T Date: Wed, 13 Aug 2025 16:06:36 -0600 Subject: update TODO, and fix a crash --- README.md | 22 +++++++++++++++++++--- TODO.md | 7 ------- internal/tui/keys.go | 2 +- march.pdf | Bin 35400 -> 0 bytes report.pdf | Bin 35418 -> 0 bytes tui-screenshot.jpg | Bin 0 -> 175192 bytes 6 files changed, 20 insertions(+), 11 deletions(-) delete mode 100644 TODO.md delete mode 100644 march.pdf delete mode 100644 report.pdf create mode 100644 tui-screenshot.jpg diff --git a/README.md b/README.md index 39f5586..ac54f5f 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,15 @@ Punchcard helps you track your work hours and generate professional invoices and ## Quick Start ```bash +# Set your own info +punch set name="John Doe" label="Web Design" email="john@doe.com" + +# Set up a client and a project +punch add client AcmeCorp bossman@acmecorp.com --hourly-rate 120 +punch add project -c AcmeCorp 'Website Redesign' + # Start tracking time -punch in +punch in -c AcmeCorp # Stop tracking time punch out @@ -19,8 +26,8 @@ punch out punch status # Generate reports -punch report invoice -punch report timesheet +punch report unified -c AcmeCorp -d 'last month' +punch report timesheet -c AcmeCorp -d 'this week' ``` ## Commands @@ -38,6 +45,15 @@ punch report timesheet ### Reports - `punch report invoice` - Generate a PDF invoice from tracked time - `punch report timesheet` - Generate a PDF timesheet report +- `punch report unified` - Generate a PDF containing an invoice followed by a timesheet + +## Full TUI + +```bash +punch tui # or just `punch` +``` + +![screenshot of the punch TUI](tui-screenshot.jpg) ## How it works diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 116a2cb..0000000 --- a/TODO.md +++ /dev/null @@ -1,7 +0,0 @@ -- [x] delete time entry -- [x] edit time entry -- [ ] new client -- [ ] edit client -- [ ] new project -- [ ] edit project -- [ ] brainstorm history filtering diff --git a/internal/tui/keys.go b/internal/tui/keys.go index 69ce223..05e1a05 100644 --- a/internal/tui/keys.go +++ b/internal/tui/keys.go @@ -259,7 +259,7 @@ var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map "ctrl+n": KeyBinding{ Key: "Ctrl+n", Description: func(m AppModel) string { - if m.modalBox.form.fields[m.modalBox.form.selIdx].suggestions == noSuggestions { + if m.modalBox.form.selIdx >= len(m.modalBox.form.fields) || m.modalBox.form.fields[m.modalBox.form.selIdx].suggestions == noSuggestions { return "" } else { return "Accept Suggestion" diff --git a/march.pdf b/march.pdf deleted file mode 100644 index 6de3987..0000000 Binary files a/march.pdf and /dev/null differ diff --git a/report.pdf b/report.pdf deleted file mode 100644 index 3eb33b8..0000000 Binary files a/report.pdf and /dev/null differ diff --git a/tui-screenshot.jpg b/tui-screenshot.jpg new file mode 100644 index 0000000..dfcec9b Binary files /dev/null and b/tui-screenshot.jpg differ -- cgit v1.2.3