dae/anki — pull request #13 by valgaav (2013-02-16 13:02:29+00:00)
Title: Add hook for custom search commands.

Created a hook for add-ons to add custom search commands to the browser. An add-on creates a new command (e.g. kanji-grade) with the following code:
def onSearch(cmds):
cmds['kanji-grade'] = findKanjiByGrade

def findKanjiByGrade((val, args):

addHook("search", onSearch)