diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -13,15 +13,12 @@ import ( _ "github.com/mattn/go-sqlite3" ) -const ( - apiURL = "http://localhost:8765" -) - func main() { rawDict := flag.String("rawDictionary", "raw-wiktextract-data.jsonl", "Path to the raw wiktionary data. You can get this by downloading and unzipping https://kaikki.org/frwiktionary/raw-wiktextract-data.jsonl.gz (for French).") dict := flag.String("dictionary", "dictionary.sqlite3", "Path to the parsed dictionary data. This will be generated from rawDictionary.") deckName := flag.String("deck", "", "Name of the deck where new Anki cards will be created.") modelName := flag.String("model", "", "Name of the card type ('model') for new Anki cards.") + apiURL := flag.String("apiURL", "http://localhost:8765", "Base URL to access the anki-connect plugin API.") flag.Parse() @@ -52,7 +49,7 @@ func main() { c := http.DefaultClient c.Timeout = 5 * time.Second - p := tea.NewProgram(initialModel(c, db, *deckName, *modelName)) + p := tea.NewProgram(initialModel(c, db, *apiURL, *deckName, *modelName)) if _, err := p.Run(); err != nil { log.Fatalf("Unexpected error encountered while running program: %s", err) } |
