66 lines
2.7 KiB
Org Mode
66 lines
2.7 KiB
Org Mode
anki-editor -- an Emacs package that helps you create Anki cards in Org-mode
|
|
|
|
* Installation
|
|
|
|
*Requirements*
|
|
- [[https://github.com/FooSoft/anki-connect#installation][anki-connect]],
|
|
an Anki add-on required by this package to interact with Anki.
|
|
- curl
|
|
|
|
If you have [[http://melpa.org/][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][examples.org]] for reference.
|
|
|
|
#+BEGIN_EXAMPLE
|
|
* 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
|
|
#+END_EXAMPLE
|
|
|
|
- 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 | Brief Description |
|
|
|-----------------------------------------------+---------------------------------------------------------------|
|
|
| =anki-editor-submit= | Send notes in current buffer to Anki. |
|
|
| =anki-editor-insert-deck= | Insert a deck heading with the same level as current heading. |
|
|
| =anki-editor-insert-note= | Insert the skeleton of a note. |
|
|
| =anki-editor-insert-tags= | Insert a tag at point with autocompletion. |
|
|
| =anki-editor-export-heading-contents-to-html= | Export the contents of the heading at point to HTML. |
|
|
| =anki-editor-convert-region-to-html= | 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
|
|
|
|
[[./demo.gif]]
|