Coder Social home page Coder Social logo

anki-editor's Introduction

http://melpa.org/packages/anki-editor-badge.svg

anki-editor – Make Anki Cards in Org-mode

Installation

Requirements

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

If you have MELPA in your package-archives, just M-x package-install RET anki-editor RET, or install it manually by downloading and visiting anki-editor.el in your emacs buffer, and M-x package-install-from-buffer RET.

Usage

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

CommandBrief Description
anki-editor-submitSend notes in current buffer to Anki.
anki-editor-insert-deckInsert a deck heading.
anki-editor-insert-noteInsert the skeleton of a note.
anki-editor-insert-tagsInsert tags at point with autocompletion.
anki-editor-cloze-regionCloze region.
anki-editor-export-heading-contents-to-htmlExport the contents of the heading at point to HTML.
anki-editor-convert-region-to-htmlConvert and replace region to HTML.

Note that anki-editor-submit will fail if the deck does not exist yet. New decks must be created in Anki first.

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

Demo

./demo.gif

Change Log

v0.2.0

  • Fix org-element not functioning correctly in temp buffer.
  • Add a command to cloze region.
  • Refactor the code to do the translation with Org’s exporting framework.
  • Add a customization variable to break consecutive braces in latex.

v0.1.2

  • Make deck/note insertion commands smarter on choosing insertion point.
  • Fix latex environments being joined with the elements following it.

anki-editor's People

Contributors

louietan avatar matthew-piziak avatar

Watchers

 avatar  avatar  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.