Automatic Basic to Cloze (Updated)
0.01MB. Updated 2022-11-15.
The author has shared 6 other
item(s).
Description
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:
- 2.1.28-2.1.54+ (Updated 2022-11-15)
To download this add-on, please copy and paste the following code into Anki 2.1:
800723229
If you were linked to this page from the internet, please open Anki on your computer, go to the Tools->Add-ons menu item, then click on Get Add-ons and paste in the code.
All Anki 2.1.x Add-Ons Contact Author
Reviews

Works like a charm

Great addon, but I've been having this issue where the addon impairs the proper use of the "Browse" function.
Been disabling it and enabling it in oder to have it both ways, but it'd be great if the author could fix it.
Thanks for the great work and effort!
Been disabling it and enabling it in oder to have it both ways, but it'd be great if the author could fix it.
Thanks for the great work and effort!

exactly what i needed

essential

love this addon!! very useful in time saving

loved it! works great

Thank you very much!

Really saves time, thank you for making this

EDIT (12/08/21): This has been fixed! Strongly recommend this addon!
For the most part, this addon has been working amazingly well but I have been running into this one bug preventing me from adding Clozes into cards. When I have an existing card that I want to change into a Cloze or add to an existing Cloze, I highlight a part of it and enter Ctrl + Shift + C like I would normally do. As soon as I enter that shortcut, I get the following error:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-11-18 21:08:50
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 493, in handler
File "aqt\editor.py", line 483, in <lambda>
File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-72>", line 2, in _onCloze
File "anki\hooks.py", line 638, in decorator_wrapper
File "anki\hooks.py", line 635, in repl
File "C:\Users\darks\AppData\Roaming\Anki2\addons21\800723229\basic2cloze.py", line 121, in _onClozeNew
return result
UnboundLocalError: local variable 'result' referenced before assignment
Any help would be appreciated since this is preventing me from turning several cards into Clozes. Thank you!
For the most part, this addon has been working amazingly well but I have been running into this one bug preventing me from adding Clozes into cards. When I have an existing card that I want to change into a Cloze or add to an existing Cloze, I highlight a part of it and enter Ctrl + Shift + C like I would normally do. As soon as I enter that shortcut, I get the following error:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-11-18 21:08:50
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 493, in handler
File "aqt\editor.py", line 483, in <lambda>
File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-72>", line 2, in _onCloze
File "anki\hooks.py", line 638, in decorator_wrapper
File "anki\hooks.py", line 635, in repl
File "C:\Users\darks\AppData\Roaming\Anki2\addons21\800723229\basic2cloze.py", line 121, in _onClozeNew
return result
UnboundLocalError: local variable 'result' referenced before assignment
Any help would be appreciated since this is preventing me from turning several cards into Clozes. Thank you!
Comment from author before post was edited
The problem should be fixed now!

Hey ! Thanks for the update on the add-on !
I've got a quick message on the left side of my Anki when it just opens saying :
" [Automatic Basic to Cloze] Cannot find target 'cloze' model "
What does it mean and how could I fix the issue ?
Thank you in advance !
EDIT 1 :
Thanks for answering ! Issue solved thanks to you !
I changed PC and used to have a french Anki wich had "Basique" and "Texte à Trou" for "Basic" and "Cloze".
I just added their english spelled counterparts in this english Anki version.
I'll now use them in my french system.
Again, many thanks !
Have a great day !
I've got a quick message on the left side of my Anki when it just opens saying :
" [Automatic Basic to Cloze] Cannot find target 'cloze' model "
What does it mean and how could I fix the issue ?
Thank you in advance !
EDIT 1 :
Thanks for answering ! Issue solved thanks to you !
I changed PC and used to have a french Anki wich had "Basique" and "Texte à Trou" for "Basic" and "Cloze".
I just added their english spelled counterparts in this english Anki version.
I'll now use them in my french system.
Again, many thanks !
Have a great day !
Comment from author before post was edited
It means that the add-on couldn't find the Basic note type among your note types.
When you go to Tools -> Manage note types, is there an entry for "Basic"? Sometimes there are entries for Basic- and then some random characters (e.g. Basic-b44c). If this is the case and the normal one is missing you can rename it to just "Basic". Or create a new note type named "Basic" with two fields.
Let me know if you have more questions. (You can edit your comment or create an issue here: https://github.com/RisingOrange/basic2cloze/issues)
When you go to Tools -> Manage note types, is there an entry for "Basic"? Sometimes there are entries for Basic- and then some random characters (e.g. Basic-b44c). If this is the case and the normal one is missing you can rename it to just "Basic". Or create a new note type named "Basic" with two fields.
Let me know if you have more questions. (You can edit your comment or create an issue here: https://github.com/RisingOrange/basic2cloze/issues)

Does what it needs to do.