Generates Anki flashcards from the information on the clipboard using OpenAI API and AnkiConnector addon.
- Anki (Desktop application)
- AnkiConnector (Anki Addon)
- pipx (to install
flashcard-gen) xclipinstalled- Linux OS (untested on Windows)
- Ability to use OpenAI API
- Install dependencies
- Install `flashcard-gen:
pipx install "git+https://github.com/jorkle/flashcard_gen"- Configure a keyboard shortcut in your desktop environments settings to execute the following:
~/.local/bin/flashcard-gen --api-key '<OPENAI-API-KEY' --anki-deck Bash --purpose '<PURPOSE>'- Replace
<PURPOSE>with the purpose for the flashcards. This is used in the prompt so that the AI creates flashcards that focus on the purpose that you specified. - Replace
<OPENAI-API-KEYwith your OpenAI API Key.
- Open Anki (desktop app)
- Find some text information that you want to create flashcards for.
- Copy the text information to your clipboard
- Press the hotkey that you binded the flashcard-gen command to in your desktop environment.
- Wait a few seconds while it generates flashcards. It will open the "Add flashcard" dialog within a few seconds.
- Either accept the flash card as is or tweak it to your liking. Once you add the flash card. Click the "Continue" button in the dialog popup box.
- Repeat.. until all of the flashcards were either added or skipped.

