Giter VIP home page Giter VIP logo

obsidian-note-synchronizer's Introduction

Obsidian Anki Synchronizer

See Chinese README here.

Features

  • Support arbitrary Anki note type by importing Anki note types as Obsidian note templates
  • 1:1 correspondence between Anki notes and Obsidian notes, Anki decks and Obsidian folders, Anki tags and Obsidian tags
  • Converting Obsidian wikilinks to Markdown links (Obsidian URL)

The plugin works in two modes:

  • Markdown mode: importing markdown content into Anki as-is, without rendering into HTML. In order to view rendered content in Anki, you need Markdown and KaTeX Support or similar Anki plugins to get real-time rendering.
  • HTML mode: importing rendered HTML into Anki.

Installation

Install via the Obsidian community plugin marketplace by searching "Note Synchronizer".

Setup

Before running this plugin, make sure that the following requirements are met:

Enable Obsidian plugin "Templates"

This plugin depends on the core plugin "Templates". You need to enable it for this plugin to work. Go to the Obsidian settings "Core Plugins" tab and enable "Templates".

Install and configure Anki Connect

Install Anki Connect in the same way as other Anki plugins. After installation, navigate to Tools -> Addons -> AnkiConnect -> Config, paste the following text:

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

Restart Anki and navigate to the desired profile

Restart Anki and select the profile you want to sync with Obsidian. Right now, you can only select one Anki profile to sync with obsidian.

Usage

Import Note Types

Run command Import Note Types to import all available note types in Anki to the template folder in the current vault, generating a template markdown file for each of the note types. All template markdown files generated have some YAML front matter like this:

mid: 16xxxxxxxxxxx
nid: 0
tags: []
date: {{date}} {{time}}

Where mid is a number representing the note type ID in Anki. If this note type happen to have 3 or more fields, the third field and all other fields after that will appear as h1 title in the markdown file.

Edit Notes

When creating notes with generated template files, please write the content of the first field into the filename, and the second field right after the YAML front matter, and other fields below their corresponding h1 title.

The way that notes are organized in Obsidian will be mirrored in Anki using decks. For example, the file /learning/note.md will be synced to the learning deck in Anki, and the file /learning/project 1/note.md will be synced to learning::project 1 deck in Anki. Toplevel files will be synced to a special deck Obsidian. If the supposed deck doesn't exist in Anki, it will be created.

Synchronize notes

Run command Synchronize. If unexpected behavior happens, please toggle the developer console and report the output there.

Also there is the feature to set an Interval in witch the synchronize is performed.

Header

The default header of non Cloze card, is the file name of the card. If header propriety is defined then this would be the new header.

obsidian-note-synchronizer's People

Contributors

tansongchen avatar giospada avatar jyc333 avatar

Forkers

giuseppeiii

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.