6 0
Contact Author Sign in to rate

Field Modifier: Random Item (Fork for 2.1)

<10kB. Updated 2019-04-12.
The author has shared 74 other item(s).

Description

temporary upload of Field Modifier: Random Item for 2.1 until the original add-on is updated. I just renamed the file. I don't maintain this add-on. Future Anki updates will most likely break this add-on and then I can't and won't help. Add-ons don't work in Ankimobile (ios) or Ankidroid(Android). If you plan to review with these apps you might want to look for a different solution (that uses javascript - maybe "Closet For Anki" or this(I didn't test it))?. original description: Picks a random item from the field. Useful for images. Usage: {{random:Field Name}} Items are separated by commas. all credit goes to the original unknown author

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

1940275457

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1644844604
Thanks! ^_^

So cool it’s basically a one-liner. If you want to change it so you don’t have only one item but all items in a random order, put the following instead

','.join(random.sample(txt.split(','), len(txt.split(','))))

If you want to change the splitting string change it in the two `text.split()`s and if you want to change the joining string change it before `.join`.
on 1624177056
Extremely useful
on 1614366620
This addon is what I've spent years looking for, but is it possible to change the Item Separator from a comma to a less used key (maybe a pipe | or really anything else)

Edit: Figured out how to change it myself. For anyone else wondering, you'll have to download python from online.
Next, open Anki and go to tools->addons-> select this add on and hit view files.

Now, on your pc, start python. Hit file->open and copy and paste the file destination that Anki pulled up from the previous step.

From there its self explanatory, youll just replace the comma in the code with whatever symbol youd rather it be. File/save it and close python. Exit out of Anki and reopen anki and itll be good to go!
on 1573851205
Great addon
on 1573851130
very usefull
on 1558958457
Awesome