diff --git a/Makefile b/Makefile index 080f720..0b5fe68 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,12 @@ INSTALL_DIR ?= /usr/local/bin .PHONY: all clean install # Now all depends on generating words.txt, the output dir, the DB, and the Go builds -all: words.txt $(OUTPUT_DIR) $(DB) build-all +all: words.txt glosses.gob $(OUTPUT_DIR) $(DB) build-all + +# Rule to generate glosses.gob +glosses.gob: glosses.jsonl buildglossgob.go + @echo "Generating glosses.gob..." + go run buildglossgob.go # Generate words.txt from glosses.jsonl before building words.txt: glosses.jsonl @@ -55,5 +60,5 @@ install: all cp $(OUTPUT_DIR)/tsk_$(shell go env GOOS)_$(shell go env GOARCH)_$(VERSION) $(INSTALL_DIR)/tsk clean: - rm -rf $(OUTPUT_DIR) $(DB) + rm -rf $(OUTPUT_DIR) $(DB) glosses.gob diff --git a/tsk.go b/tsk.go index 261fda9..06aa6b2 100644 --- a/tsk.go +++ b/tsk.go @@ -51,7 +51,7 @@ const helpText = `[gray] [yellow]Control-S[gray] = [yellow]Mark[gray]/unmark words. All marked words will be saved upon Esc to a text file. [green]Control-L[gray] = [green]List[gray] marked words. [cyan]Control-F[gray] = [cyan]Reverse-find[gray] words by searching their English definitions. - [pink]Control-H[gray] = Show this [pink]help[gray] text again. + [pink]Control-A[gray] = Show this [pink]help[gray] text again. [red]Control-R[gray] = [red]Report a bug[gray] on GitHub.com. [red]Opens your web browser[gray] to @@ -1478,7 +1478,7 @@ func main() { textView.SetText(buf.String()) return nil - case tcell.KeyCtrlH: + case tcell.KeyCtrlA: textView.SetTitle("Word Details (Tab/Shift-Tab to scroll, Ctrl-S to mark)") textView.SetBorderColor(tcell.ColorWhite) textView.SetTitleColor(tcell.ColorWhite)