Skip to content

Add-on for Anki SRS that allows to create cards with rich code-editor and code-differ

License

Notifications You must be signed in to change notification settings

AZaviruha/anki-codediffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anki CodeDiffer

Add-on for Anki SRC. It allows you to create cards with interactive input. Also it uses differ to visualize how your input is different from correct answer.

When to use?

This addon should be helpful to learn some new APIs. With it you can learn API not by drilling, but by trying to solve some simple tasks.

How to use?

For example, you can copy/paste some code samples from MDN:

editor

Then you try to input the correct solution on the Question side:

frontside

... and then you can check how close your solution is to the right answer:

backside

Tags [diff][/diff] and [diff-answ][/diff-answ] can be added manually or by editor's buttons.

  • [diff lang='sql' theme='solarized_dark'][/diff] is used to to let add-on figure where to insert code editor, and with which settings;
  • [diff-answ][/diff-answ] is used to to let add-on figure which part of the answer should be used as "correct answer" in code differ.

Supported languages and themes

SUPPORTED_LANGUAGES = [
    'javascript',
    'python',
    'sql',
    'typescript'
]

SUPPORTED_THEMES = [
    'chrome',
    'monokai',
    'solarized_dark',
    'solarized_light'
]

TODO

  1. Research how to add any of Ace's languages/themes on the fly.

Used libraries and resources

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

About

Add-on for Anki SRS that allows to create cards with rich code-editor and code-differ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published