anki.hooks#
Tools for extending Anki.
A hook takes a function that does not return a value.
A filter takes a function that returns its first argument, optionally modifying it.
Functions#
Module Contents#
- anki.hooks.runHook(hook: str, *args: Any) None#
Run all functions on hook.
- anki.hooks.runFilter(hook: str, arg: Any, *args: Any) Any#
- anki.hooks.addHook(hook: str, func: collections.abc.Callable) None#
Add a function to hook. Ignore if already on hook.
- anki.hooks.remHook(hook: Any, func: Any) None#
Remove a function if is on hook.
- anki.hooks.wrap(old: Any, new: Any, pos: str = 'after') collections.abc.Callable#
Override an existing function.