summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-08 13:29:44 -0500
committerDavid Schlachter <t480-debian-git@schlachter.ca>2026-01-08 13:29:44 -0500
commit882c41c7df91a8851e904caa85f9a8259ac44570 (patch)
treeae506b70ee47a51cebd299b25d79f9c904d1d84b /README.md
parentd30e386491024e3740ac27039cd6b0dd5bb15334 (diff)
Allow invoking with a word to look up
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index ace4e96..91cc9d2 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,28 @@ command like this to start the app:
go run . -rawDictionary=raw-wiktextract-data.jsonl -deck="Français" -model="Basic-830ae"
```
+In addition to starting the program and then looking up a word interactively,
+it's also possible to provide the first word to look up as a command-line
+argument. Then, for example, you could add a shell function to invoke the
+program and immediatelly go to a definition by running something like this.
+
+For example, if you've compiled the program and placed it in your path, you
+could add a shell function to your `.zshrc` or `.bashrc` with all the argument
+you need, like this:
+
+```
+wk() {
+ french-wiktionary-flashcards dictionary=/path/to/dictionary.sqlite3 -deck="Français" -model="Basic-830ae" -initialWord="$*"
+}
+```
+
+and then, to start the program and go immediately to a definition (e.g.
+"poisson"), you could invoke it like this:
+
+```
+$ wk poisson
+```
+
## Usage
```
@@ -50,6 +72,8 @@ Usage of french-wiktionary-flashcards:
from rawDictionary. (default "dictionary.sqlite3")
-model string
Name of the card type ('model') for new Anki cards.
+ -initialWord string
+ Optional: first word to look up on program launch.
-rawDictionary string
Path to the raw wiktionary data. You can get this by
downloading and unzipping