8000 GitHub - Charlie-Gordon/org-anki: Sync org sections to Anki via the AnkiConnect plugin
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Sync org sections to Anki via the AnkiConnect plugin

License

Notifications You must be signed in to change notification settings

Charlie-Gordon/org-anki

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-anki

Minor mode to synchronize your org-mode entries to Anki.

Works via AnkiConnect add-on to Anki.[fn:via]

How

  • creates “Basic” type of cards
  • heading of org entry is set as card front
  • text content until next heading is set as card back[fn:how]

See example.org and the resulting screenshots for how the cards look after being synced to Anki.

Both front and back are converted to html.[fn:html-export]

Exposes these commands:

org-anki-sync-entry
adds or updates the current org-entry under cursor
org-anki-delete-entry
deletes entry from Anki. Entry must have ANKI_NOTE_ID property

Setup

  • Start Anki with AnkiConnect installed
  • Set destination deck name, either as:
    • (customize-set-variable 'org-anki-default-deck "my-target-deck") in your .emacs
    • #+ANKI_DECK: my-target-deck on top of an .org file
    • :ANKI_DECK: my-target-deck in the properties’ drawer of the item
    • Note that this deck has to be present (created separately in the Anki app)
  • Run anki-sync-entry on some org item you want to sync

Note: the card browser must be closed while synchronizing, as it won’t update the note otherwise (issue).

You probably want to bind org-anki-sync-entry to a key sequence, but not org-anki-delete-entry – as accidentally deleting notes will become too easy.

In any case, don’t forget to create backups, as deleting notes will lose their scheduling information.

Why

.. as there are anki-editor, pamparam, org-drill, org-fc?

Anki-editor requires subheadings for card front and card back, thus existing .org notes need to be modified to be ankified. This package takes the heading as card front and content as card back.

The other three are emacs or org-mode only[fn:others], so no spaced repetition from your phone or web.

Todo

See issues.

Footnotes

[fn:via] AnkiConnect starts a HTTP server on localhost:8765 which the current package talks to.

[fn:how] It does this even if the next heading is a sub-heading (you probably don’t want subheadings in card contents 5439 anyway).

[fn:html-export] Plain org-mode can export to html too but there didn’t appear to be a plain string-to-basic-html function.

[fn:others] I mean, do you really want to use this just to use Anki?? :p

About

Sync org sections to Anki via the AnkiConnect plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 96.6%
  • Shell 3.4%
0