anki-connect icon indicating copy to clipboard operation
anki-connect copied to clipboard

Deck and note type parameters for guiAddCards

Open Profpatsch opened this issue 8 years ago • 4 comments

It would be nice to be able to open the GUI entry window with the correct deck/note type already preselected, e.g. for creating a keyboard shortcut:

function addCard {
  local deck=$1
  local note=$2
  # from package `httpie`
  http --json POST localhost:8765 action=guiAddCards "params={\"deck\": \"$deck\", \"note_type=$note\"}"
}

# add these to your keybindings
addCard Japanese "Japanese (recall)"
addCard English Basic

something like that.

Profpatsch avatar Jun 05 '17 03:06 Profpatsch

It would be even nicer to prefill fields with content that you can send over the API. I wanna take a look into this in the coming weeks...

hgiesel avatar Jan 16 '19 07:01 hgiesel

I think this can also be closed.

hgiesel avatar Feb 17 '20 12:02 hgiesel

@hgiesel Oh cool, this can be done now I assume?

Profpatsch avatar Feb 17 '20 17:02 Profpatsch

Yes. Look at the documentation for guiAddCards.

hgiesel avatar Feb 17 '20 21:02 hgiesel