Yet another Anki Emacs Client.
Anki Search Mode:
Anki Mode:
Current status:
- Anki Mode: Card Study Mode
- Anki Search Mode: Anki Cards Browser
- List and switch decks
- Preview Card
- Preview Card’s Front
- Preview Card’s Back
- (Re)Play audio
- Support shrface
git clone git@github.com:chenyanming/anki.el.git ~/.emacs.d/lisp/anki/
(add-to-list 'load-path "~/.emacs.d/lisp/anki/")
(require 'anki)
(setq sql-sqlite-program "/usr/bin/sqlite3")
(setq anki-collection-dir "/Users/damonchan/Library/Application Support/Anki2/Android & Mac")
(setq anki-audio-player (or (executable-find "aplay") (executable-find "afplay")))
;; (require 'shrface) ; If you use shrface, require it here
(setq anki-shr-rendering-functions (append anki-shr-rendering-functions shr-external-rendering-functions))
(use-package anki
:defer t
:load-path "~/.emacs.d/lisp/anki/"
:init
(add-hook 'anki-mode-hook #'shrface-mode)
(add-hook 'anki-card-mode-hook #'shrface-mode)
(autoload 'anki "anki")
(autoload 'anki-browser "anki")
(autoload 'anki-list-decks "anki")
:config
;; (require 'shrface) ; If you use shrface, require it here
(setq anki-shr-rendering-functions (append anki-shr-rendering-functions shr-external-rendering-functions))
(setq sql-sqlite-program "/usr/bin/sqlite3")
;; Set up the collection directory, which should contain a file - collection.anki2 and a folder - collection.media
(setq anki-collection-dir "/Users/chandamon/Library/Application Support/Anki2/User 1"))
Enter anki mode:
M-x anki
Start from deck lists:
M-x anki-list-decks
Enter anki search mode:
M-x anki-browser
f
Flip Card (Toggle between Question and Answer)r
(Re)play audiol
List and switch deckn/p
Next Card (Only works if the current card is Blue Card. For Red or Green cards, you have to answer Red or Green Cards before studying Blue cards.)q
Quit1
Answer with “Again” (Review again after 1 minute: Hard coded)2
Answer with “Hard” (Review again after 10 minutes:anki-learn-sm2-steps
, default 10 minutes)3
Answer with “Good” (Graduating interval in days:anki-learn-sm2-graduating-interval
, default 1 day)4
Answer with “Easy” (More Easy interval in days:anki-learn-sm2-more-easy-interval
, default 4 days)
Notice:
anki.el
does not modify the original anki database (at this moment), therefore, the review feature uses its own database:anki-core-database-file
.- If you modify the anki database through the official anki app, you have to close the official app(Important), then
M-x anki-search-update
to re-read the anki database. - If you want to insert/update/delete cards, please use official anki app (at this moment).
M-x anki-db-current-deck-reschedule
to reschedule the current deck (Delete all review logs of current deck).
The header in anki-mode
shows the current card status:
- Blue: New Cards
- Red: Due Cards to be reviewed again (< 1 day)
- Green: Due Cards to be reviewed (>= 1 day)
- shrface: Enable org features on shr-rendered buffers, without the heaviness of org.
Version 0.3.0:
- Add Review Feature using SM2 algorithm.
Version 0.2.0:
- New Features:
anki
Version 0.1.0:
- New Features:
anki-browser
,anki-list-decks