Plugin for Obsidian.md that uses OpenAI's GPT LLM to automatically generate Flashcards for Anki.
The plugin only works for desktop.
The plugin introduces two new "commands" into obsidian:
- Export Current File to Anki
- Export Highlighted Text to Anki (only available in an active
Editable
window open - i.e. you need to have a document open, and it needs to be inedit
mode)
The command palette can be accessed on Obsidian through the following hotkey (default): CMD
+ SHIFT
+ P
If desired, you can set your own hotkeys for the new commands.
The two new commands look like the following:
The following are required for the Plugin to work:
- An OpenAI Account and an OpenAI API Key
- The Anki program, installed locally
- Anki Connect, to expose an Anki API for Obsidian to make calls to
- Download and install the plugin (Options > Community Plugins)
- Ensure that you have all the requirements in the Plugin Requirements
- Go to the Plugin Settings (Settings > Community Plugins > Auto Anki) and make sure to set the following fields appropriately:
- Anki Port (by default, this is
8765
) - OpenAI API Key
- Anki Port (by default, this is
- Enjoy!
This command allows you to use the contents of the currently-opened file to send to GPT and generate a list of questions and answers.
Alternatively, you can also specify the number of alternatives to generate for each question. This allows you more variety in the "questions and answers" generated by GPT and it allows you to choose among a larger number of alternative "questions and answers". Choosing a number of alternatives work best with smaller notes.
From the generated list of "questions and answers", you have the option to pick and choose the ones you want.
After picking and choosing, your selected "questions and answers" automatically imports the chosen questions to Anki, based on the details in your Plugin settings.
It may take a while if you are generating a large number of questions, or a large number of question alternatives. An indicator will show whether
auto-anki
is currently generating your flash cards. This is shown in the status bar at the bottom of the screen, like below:
This command is similar to "Exporting an Entire File to Anki", but this allows you to use the currently-highlighted text (instead of the whole file) to send to GPT and generate a list of questions and questions. (Important Note: file needs to be in edit
mode for the command to be available).
With the kajillion things I read and watch on a daily basis, I've recently found myself struggling to retain knowledge of the things I've consumed. Hence, I've found myself trying to find new ways to enhance my self-education. I came upon Spaced Repetition, and wanted to try to use Anki to supplement my daily learnings. Being a long-time user and lover of Obsidian.md as my PKM (Personal Knowledge Management), I wanted to see if there was a way to automate my learning using spaced repetition with my current Obsidian vaults.
I looked at other similar plugins that attempt to connect Obsidian to Anki, but a lot of require you to change how you write your notes in Obsidian, or just don't seem automated enough. What this plugin does is automate the creation of "flashcard-style" questions and answers but without needing to format your notes for this purpose.
I consider myself a complete beginner when it comes to Spaced Repetition, Anki, or the general world of learning techniques, so I am always very open to suggestions, discussions, or any comments about the topic!
I keep track of all things related to this plugin mostly in issues. Feel free to report bugs and/or requests there!