Plugin to sync flashcards in your Obsidian notes to Anki.
In your Obsidian note:
---
A simple flashcard: Question in the front #flashcard
Answer in the back
---
will generate an Anki flashcard like this:
| A simple flashcard: Question in the front |
|---|
| Answer in the back |
see more examples in sample.md
These steps only need to be done once.
After that ensuring Anki running would suffice to scan vault with the plugin.
Tools->Addons->AnkiConnect->Config, and change it to look like this, then restart Anki to
apply the changes:{
"apiKey": null,
"apiLogPath": null,
"webBindAddress": "127.0.0.1",
"webBindPort": 8765,
"webCorsOrigin": "http://localhost",
"webCorsOriginList": [
"http://localhost",
"app://obsidian.md"
]
}
Make sure Anki is running, on left sidebar's Ribbon there is an Anki icon like this:
Click it and the plugin will do the rest for you. Progress is shown in Obsidian notices.
To fulfill these goals:
The synchronization is designed as follows:
Install the dependencies and build the plugin bundle:
npm install
npm run build
Run npm run check before submitting changes to execute linting, tests, and type checking together.
To deploy the built plugin directly into an Obsidian vault, pass the vault path to the deploy command:
npm run deploy -- "/path/to/vault"
The command copies main.js, manifest.json, and styles.css to
.obsidian/plugins/obsidian-awesome-flashcard. You can also set the
OBSIDIAN_VAULT environment variable and omit the path. After deployment,
enable Awesome Flashcard under Obsidian's community plugins. Restart
Obsidian after changing manifest.json; for source-only changes, rebuild and
reload the plugin.
Use npm's version command to update package.json, package-lock.json,
manifest.json, and versions.json, then push the generated commit and tag
(tags intentionally have no v prefix):
npm version patch
git push origin main --follow-tags
Pushing the tag starts the release workflow. It checks the version, builds the
plugin, and creates a draft GitHub release containing main.js,
manifest.json, and styles.css for review and publication.