summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorT <t@tjp.lol>2025-08-13 16:06:36 -0600
committerT <t@tjp.lol>2025-08-13 16:34:23 -0600
commit5c3554c7e49abe263faf54c61e435ba1d5202d27 (patch)
treeba4956af69205884cc1ff3fae211dad151adc194
parente9e6eb4e456ee53da5a6ef743251410d4d3d8381 (diff)
update TODO, and fix a crash
-rw-r--r--README.md22
-rw-r--r--TODO.md7
-rw-r--r--internal/tui/keys.go2
-rw-r--r--march.pdfbin35400 -> 0 bytes
-rw-r--r--report.pdfbin35418 -> 0 bytes
-rw-r--r--tui-screenshot.jpgbin0 -> 175192 bytes
6 files changed, 20 insertions, 11 deletions
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
--- a/march.pdf
+++ /dev/null
Binary files differ
diff --git a/report.pdf b/report.pdf
deleted file mode 100644
index 3eb33b8..0000000
--- a/report.pdf
+++ /dev/null
Binary files differ
diff --git a/tui-screenshot.jpg b/tui-screenshot.jpg
new file mode 100644
index 0000000..dfcec9b
--- /dev/null
+++ b/tui-screenshot.jpg
Binary files differ