anki-editor/README.org

86 lines
3.6 KiB
Org Mode
Raw Normal View History

2018-02-04 07:43:11 +01:00
[[http://melpa.org/#/anki-editor][file:http://melpa.org/packages/anki-editor-badge.svg]]
anki-editor -- Make Anki Cards in Org-mode
2017-12-27 17:20:01 +01:00
2018-01-22 10:46:08 +01:00
* Installation
2018-01-15 15:11:02 +01:00
2018-01-22 10:46:08 +01:00
*Requirements*
2018-01-15 15:11:02 +01:00
- [[https://github.com/FooSoft/anki-connect#installation][anki-connect]],
an Anki add-on required by this package to interact with Anki.
2018-01-07 10:24:57 +01:00
- curl
2017-12-27 17:20:01 +01:00
2018-01-22 10:46:08 +01:00
If you have [[http://melpa.org/][MELPA]] in your =package-archives=,
2018-04-15 09:52:26 +02:00
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=.
2018-01-15 15:11:02 +01:00
2018-01-22 10:46:08 +01:00
* Usage
2018-01-15 15:11:02 +01:00
** 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
2018-02-10 15:15:06 +01:00
| Command | Brief Description |
|--------------------------------------+---------------------------------------------------------------------|
| =anki-editor-submit= | Send notes in current buffer to Anki. |
| =anki-editor-insert-deck= | Insert a deck heading. |
| =anki-editor-insert-note= | Insert the skeleton of a note. |
| =anki-editor-add-tags= | Add tags to property drawer of current heading with autocompletion. |
| =anki-editor-cloze-region= | Cloze region. |
| =anki-editor-export-subtree-to-html= | Export subtree of the element at point to HTML. |
| =anki-editor-convert-region-to-html= | Convert and replace region to HTML. |
2018-02-10 14:28:57 +01:00
2018-04-15 09:52:26 +02:00
*Since I'm not a native English speaker, let me know if there's any ambiguity or grammatical mistakes.*
2018-01-15 15:11:02 +01:00
* Demo
[[./demo.gif]]
* Change Log
2018-02-10 15:32:12 +01:00
*v0.2.1*
- Automatically store media files for links to file when submitting.
2018-02-11 07:04:04 +01:00
- =anki-editor-insert-tags= renamed to =anki-editor-add-tags=, with behavior slightly changed.
- =anki-editor-export-heading-contents-to-html= renamed to =anki-editor-export-subtree-to-html=.
2018-02-10 15:32:12 +01:00
2018-02-04 04:27:58 +01:00
*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.