anki-capture

Like org-capture for Anki notes
git clone git://git.wrycode.com/wrycode/anki-capture.git
Log | Files | Refs | README

README (2974B)


      1 Description
      2 ═══════════
      3 
      4   Anki-capture is an interface for adding notes to [Anki] from Emacs
      5   that is analogous to [org-capture]. It uses Org mode syntax to author
      6   notes so you can easily insert LaTeX formulas, images, and
      7   miscellaneous formatting. [Anki-editor] provides the layout for notes
      8   and the elisp backend connection to [AnkiConnect]. This package
      9   includes some helpful commands from [Cheong Yiufung] for quickly
     10   inserting cloze deletions.
     11 
     12 
     13 [Anki] <https://apps.ankiweb.net/>
     14 
     15 [org-capture] <https://orgmode.org/manual/Capture.html>
     16 
     17 [Anki-editor] <https://github.com/louietan/anki-editor>
     18 
     19 [AnkiConnect] <https://ankiweb.net/shared/info/2055492159>
     20 
     21 [Cheong Yiufung] <https://yiufung.net/post/anki-org/>
     22 
     23 
     24 Installation
     25 ════════════
     26 
     27   Using [straight.el] (recommended):
     28 
     29   ┌────
     30   │ (straight-use-package `(anki-capture :type git :repo "git://git.wrycode.com/wrycode/anki-capture.git"))
     31   └────
     32 
     33   I haven’t bothered with MELPA yet, but `anki-capture.el' is a standard
     34   elisp package (a single file with autoloads), so you can install it by
     35   visiting the buffer and running `package-install-from-buffer'.
     36 
     37 
     38 [straight.el] <https://github.com/raxod502/straight.el>
     39 
     40 
     41 Configuration
     42 ═════════════
     43 
     44   Here are some recommended (optional) settings. Substitute your own
     45   preferred keybindings:
     46 
     47   ┌────
     48   │ ;; cloze region using the next cloze number
     49   │ (define-key org-mode-map (kbd "M-n") 'anki-editor-cloze-region-auto-incr)
     50   │ ;; cloze region using the current cloze number
     51   │ (define-key org-mode-map (kbd "M-N") 'anki-editor-cloze-region-dont-incr)
     52     53   │ (define-key org-mode-map (kbd "<f10>") 'anki-editor-reset-cloze-number)
     54     55     56   │ (setq anki-editor-create-decks t ;; Allow anki-editor to create a new deck if it doesn't exist
     57   │       anki-editor-org-tags-as-anki-tags t) ;; use Org mode tags as Anki note tags
     58     59   │ (define-key global-map (kbd "C-c e") 'anki-capture) ;; capture a new note into Anki
     60   └────
     61 
     62   If you would like to automatically insert text from the kill
     63   ring/clipboard into your notes, set the variable
     64   `anki-capture-auto-yank' to non-nil.
     65 
     66 
     67 Usage
     68 ═════
     69 
     70   The idea is that you can use `anki-editor'’s note format to add new
     71   notes to Anki as quickly as possible. Often you will want to add a
     72   series of similar notes. `anki-capture' will assume that you want the
     73   same note settings (Anki deck, tags, and Anki note type) each time you
     74   invoke it unless you use a prefix argument (C-u). See `anki-capture'’s
     75   docstring for more info: `C-h f anki-capture'.
     76 
     77   If you do not set `anki-capture-file', notes will be stored in a
     78   buffer called `*anki-capture-storage-buffer*'. This will NOT be saved
     79   if you restart Emacs.
     80 
     81   I recommend using underscores “`_'” to emulate spaces in your tags
     82   because this will work well in both Org mode and Anki.