Emacs minor mode for making Anki cards with Org Mode
Find a file
2018-01-22 12:40:15 +08:00
anki-editor.el Remove minor mode and default keybindings 2018-01-22 12:40:15 +08:00
demo.gif Rework demo 2018-01-07 16:54:58 +08:00
examples.org Better support for latex 2018-01-08 18:20:11 +08:00
README.org Updates for melpa 2018-01-21 19:22:42 +08:00

anki-editor an Emacs package that helps you create Anki cards in Org-mode

Requirements

  • anki-connect, an Anki add-on required by this package to interact with Anki.
  • curl

Usage

Installation

  • Clone this repo and add the directory to your Emacs' load-path, then (require 'anki-editor).
  • Or if you use package.el, just download anki-editor.el and visit it in Emacs, then M-x package-install-file.

The Syntax

Now you can compose Anki notes in Org syntax, e.g. lists, code blocks, tables, latex fragments / environments, when being submitted to Anki, they will be converted to HTML by Org-mode's HTML backend with specific markers (e.g. latex) translated to the Anki style.

The structure of contents is as follow, which is inspired by org-drill. See examples.org for reference.

* English                                           :deck:
** Vocabulary
*** Item                                            :note:
    :PROPERTIES:
    :ANKI_NOTE_TYPE: Basic (and reversed card)
    :ANKI_TAGS: vocab idioms
    :END:
**** Front
     (it's) raining cats and dogs
**** Back
     it's raining very hard
  • Headings of deck are tagged with deck
  • Headings of note are tagged with note
  • Levels are not significant, but note headings must be descendents of their deck headings
  • Custom properties of a note heading can be used to specify note type and tags
  • Subheadings of a note heading are fields of its note type

Command Cheatsheet

Command Keybinding Brief Description
anki-editor-mode N/A The minor mode. Your don't have to turn it on in order to use this package, but it sets the default keybindings for you.
anki-editor-submit C-c a s Send notes in current buffer to Anki.
anki-editor-insert-deck C-c a i d Insert a deck heading with the same level as current heading.
anki-editor-insert-note C-c a i n Insert the skeleton of a note.
anki-editor-insert-tags C-c a i t Insert a tag at point with autocompletion.
anki-editor-export-heading-contents-to-html C-c a e Export the contents of the heading at point to HTML.
anki-editor-convert-region-to-html N/A Convert and replace region to HTML.

Since I'm not a native English speaker, let me know if there's any ambiguity or grammatical mistakes.

Demo

/elisp/anki-editor/media/commit/473c0821a445f5cc865ff38d98cf4b2899439237/demo.gif