On smartphones and on e-readers, installing Anki gives one the ability to quickly send the currently highlighted text to a new card. I prefer to use the desktop version of Anki, but it appears to be missing that functionality.
Currently, I have to copy the text to the clipboard, launch Anki Desktop, then manually create a new card. That distracts from reading and learning. Ideally, what I would like is to be able to do one of the following, instead:
- Hit a hot-key sequence, like CtrlAlt[, or
- Right click in the program I’m using to read (usually Calibre) and choose “New Anki Card”.
Either way, I’d want a new card to be created from the currently selected text without having to do a copy first.
I have looked through the available Add-ons and did not see anything relevant. I suspect this will require some small programming on my part, which I am willing to do.
I already know how to bind a hotkey to execute a program and pass in the currently highlighted text as an argument. I suspect a Calibre plugin would not be much harder. But, for either of those to work, I would need a way to run Anki desktop so that it will launch (if not already open) and create a new card, prefilled with information. I’m imagining using command-line arguments, like so:
anki --remote --addNewCard '{ deck: "default"; title: "Automatically added"; text: "This is the text that I highlighted with my mouse."; }'
How would one do such a thing using Anki Desktop?