Giter Club home page Giter Club logo

obsidian-anki-sync's Introduction

Obsidian Anki Sync - Yet another anki plugin

This plugin allow you to make flashcards in Obsidian and sync them to Anki.

This is similar to Obsidian_to_Anki except this plugin uses a different and more powerful markup based syntax for making flashcards.

Installation

  1. Download the plugin from Obsidian's Comunity Plugin section which can be accessed from the Settings pane under Third Party Plugins.

  2. Download Anki if not installed.

  3. Install AnkiConnect on Anki.

    • Open Anki.

    • Select Tools > Add-ons . Now a Anki addon's dialog will open.

    • Now click Get Add-ons... in addon's dialog and enter 2055492159 into the text box labeled Code and press the OK button to proceed.

    • Select Tools > Add-ons to re-open addon's dialog. Select Anki-Connect plugin and click Config. Now enter the configuration bellow and click ok.

      {
          "apiKey": null,
          "apiLogPath": null,
          "webBindAddress": "127.0.0.1",
          "webBindPort": 8765,
          "webCorsOrigin": "http://localhost",
          "webCorsOriginList": [
              "http://localhost",
              "app://obsidian.md"
          ]
      }
    • Restart Anki.

  4. Now, you can use the plugin by clicking Sync to Anki button. NB: Make sure the anki is running before clicking the Sync to Anki button in obsidian.

Examples

<!-- replaceblock-start -->
<!-- replace id="1" text="Opposite" -->
$$\sin \theta = \frac{Opposite}{Hypotenuse}$$
<!-- replaceblock-end -->

Cards

See Tutorial for more examples and explanation on usage.

Features

  • Rendering of Markdown Math, Code Blocks, Images, Tables etc...
  • Cloze within Latex Math and Code Blocks by using replaceblock.
  • Breadcrumbs in Anki that links to file that generated the flashcard.
  • Adding cards to user-specified deck on a per-file or per-block basis.
  • Can handle creating, updating, deleting of Anki cards perfectly.
  • Auto Backup Anki Decks before every sync.
  • Many other features like extra field, tags etc...

Documentation

See Tutorial for basics.

For detailed documentation on blocks see:

basicblock replaceblock clozeblock

FAQ

Why yet another plugin for obsidian to anki sync? The existing two plugins have a major limitation to implement my workflow: No clozes inside math and code blocks โ˜น
This is why I made this.
How does auto deletation work? First, each anki card is marked as "created by plugin from this vault" and "not created by plugin from this vault". A card is marked as "created by plugin" if it contains the name of vault as tag, as well as ObsidianAnkiSync tag, as well as the type of note of the card must be of type ObsidianAnkiSyncModel. Now, if a card is marked "created by plugin from this vault" but it is not available in the vault, then the card is deleted.
Can i delete or modify the auto-generated oid attribute? No! Please dont do that.
The plugin uses the oid to track the cards in anki. Deleting it will cause the plugin to delete the old card and create a new one in Anki. This means that the scheduling information for the card gets deleted if you remove or modify oid.
Where is the auto anki backup taken before every sync stored? In Windows 10, it is stored at:
C:\Users\{WindowsUserName}\AppData\Roaming\Anki2\{AnkiProfileName}

NB: It is stored in a per-deck basis with name ObsidianAnkiSync-Backup-${timestamp}_${deck}.apkg
Do the auto anki backup also store scheduling information? Yes.
I found a bug. What to do? Please create a issue here

obsidian-anki-sync's People

Contributors

debanjandhar12 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.