Skip to content

becknik/obsidian-anki-flashcards

 
 

Repository files navigation

Obsidian Flashcards

GitHub release (latest SemVer) GitHub All Releases

logo Anki integration for Obsidian.

Important

This plugin has been overhauled from the core up for improvements in code structure & performance. Some features of the unmaintained v1 version by reuseman aren't re-implemented yet. I'm hoping that the rework might have lowered the burden to contribute, so feel free to do so :)

The allowed content of the flashcards has changed. For more information take a look at the wiki page. The diff generation feature might help with the migration.

Here's the list of currently missing features:

  • Spaced Cards (#card-spaced or #card/spaced)
  • Cloze Cards
  • Deletion of cards from Obsidian

Re-implementing them is planned for the 2.0 release milestone

Features

  • 🗃️ Simple flashcards with #card
  • 🎴 Reversed flashcards with #card-reverse or #card/reverse
  • ✍️ Inline style with Question :: Answer
  • ✍️ Inline style reversed with Question ::: Answer
  • 🧠 Heading context inclusion
  • 🏷️ Global and local tags
  • 🔢 Support for all common Markdown elements
  • ⚙️ Per-note customization of settings in frontmatter
  • 🛣️ Deck path modification in Obsidian comments on a heading level
    • 🔗 Inspired by UNIX paths: / = ::, << = ../, :: at start extends the current deck's path, just like ./
  • 🔄 Anki card to note diff generation in <name>.diff.md files
  • 📁 Context menu entries to process all notes in a directory tree

Have a look at the plugin settings, the test vault or the wiki for further information.

How it works?

The following is a demo where the three main operations are shown:

  1. Insertion of cards;
  2. Update of cards;
  3. Deletion of cards.

Demo image

How to install

  1. Install this plugin in Obsidian:

    • Open Settings > Community plugins
    • Make sure Safe mode is off
    • Click Browse community plugins
    • Search for "Flashcards"
    • Click Install
    • Once installed, close the community plugins window and activate the newly installed plugin
  2. Install AnkiConnect on Anki

    • Tools > Add-ons -> Get Add-ons...
    • Paste the code 2055492159 > Ok
  3. Open the settings of this plugin and - while Anki is opened - press "Grant Permission"

Contributing

Contributions via bug reports, bug fixes, are welcome. If you have ideas about features to be implemented, please open an issue so we can discuss the best way to implement it. For more details check Contributing.md

Similar Projects

  • flashcards-obsidian: The now unmaintained source plugin
  • yanki: Features implicit processing of note contents to flashcards by detecting certain Markdown syntax instead of using tags or special separators. Seems to have really nice auxiliary integration!
  • blue-star: Processes whole notes into flashcards
  • simple-anki-sync: Uses tables for Anki card generation

Acknowledgements

Massive thanks to Alex Yatskov for creating & maintaining Anki-Connect.

Thanks to @reuseman for this plugin's foundation I've enjoyed using for many years now, since its approach imo fits the spot in between card granularity and ease of use/ general user experience.

Thanks to the devs of the marked project and the shiki maintainers for their hard work on this incredible projects.

Without the re-tamplate-tag library I'd probably have lost track of the all the regexp used, so thanks to Axel Rauschmayer for creating this neat abstraction!

Documentation References

About

A (revived) Anki Plugin for Obsidian.md

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 96.7%
  • JavaScript 2.1%
  • CSS 1.2%