Created
December 31, 2014 15:35
-
-
Save slava-sh/dc36155aeef7f1830f67 to your computer and use it in GitHub Desktop.
Anki add-on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import random | |
from anki.hooks import addHook | |
def fmod_random(txt, extra, context, tag, fullname): | |
return random.choice([x.strip() for x in txt.split(',')]) | |
addHook('fmod_random', fmod_random) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment