french-wiktionary-flashcards

Easily create Anki flashcards from Wiktionary data.
Log | Files | Refs | README

commit d30e386491024e3740ac27039cd6b0dd5bb15334
parent 1cd785a492d968f870e605d079ca5c9310cfcea0
Author: David Schlachter <t480-debian-git@schlachter.ca>
Date:   Thu,  8 Jan 2026 13:17:21 -0500

Fix argument validation

Diffstat:
Mmain.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/main.go b/main.go @@ -22,16 +22,16 @@ func main() { flag.Parse() - if dict == nil { + if *dict == "" { log.Fatal("The -dictionary flag cannot be an empty string. (If not provided, it defaults to dictionary.sqlite3.)") } - if rawDict == nil { + if *rawDict == "" { log.Fatal("The -rawDictionary flag cannot be an empty string. (If not provided, it defaults to aw-wiktextract-data.jsonl.)") } - if deckName == nil { + if *deckName == "" { log.Fatal("The -deck flag must be provided (name of the deck where Anki cards will be created).") } - if modelName == nil { + if *modelName == "" { log.Fatal("The -model flag must be provided. This is the name of the card type ('model') for any Anki cards created by this program. This appears under 'Type' on the dialog for creating new cards in Anki.") }