Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert existing built-in cloze cards to Cloze Anything #19

Open
rwmpelstilzchen opened this issue May 1, 2021 · 4 comments
Open

Convert existing built-in cloze cards to Cloze Anything #19

rwmpelstilzchen opened this issue May 1, 2021 · 4 comments

Comments

@rwmpelstilzchen
Copy link
Contributor

Say one has many cloze deletion cards that use Anki’s built-in mechanism. How can they convert them to Cloze Anything while saving the state, interval, review history, etc. of the original cards? Naïve ‘Change Note Type’ (ctrl+shift+M) doesn’t seem to help.

@rwmpelstilzchen rwmpelstilzchen changed the title Convert existing built-in cloze card to Cloze Anything Convert existing built-in cloze cards to Cloze Anything May 1, 2021
@matthayes
Copy link
Owner

I did a quick test and it does seem this is possible.

If you change the note type from Cloze to another note type, it seems to map Cloze 1, Cloze 2, etc. to the card types of the target note type in the order of those card types. So if you have a note type based on Cloze Anything with card type ExpressionCloze1, ExpressionCloze2, etc., the cards will map as you'd hope. Note that it seems to disregard the card type mapping you choose in the menu and just uses the card types of the target note type in order.

Then you can use Anki's Find and Replace feature under Edit to replace all {{ with (( and all }} with )). Finally, select all the cards, then under Edit choose Cloze Anything, then Create Missing Cards. This will in the 1` values within each of the fields based on the cloze content. However given the cards already exist from the conversion this step isn't really necessary.

The caveat here is that I don't know if this behavior with how the Cloze cards get mapped is an intended feature of Anki or accidental. It's probably worth following up in the Anki forum to confirm this is the way it's supposed to work and not just a happy accident, to make sure it's not something that will change in the future. I recommend doing your own testing in some test decks and backing up before attempting conversion of your real cards. I'll document this when I have better clarity on the conversion process.

@rwmpelstilzchen
Copy link
Contributor Author

I supposed that if only one mapping is listed in the interface (‘Change Cloze to:’), only one card will remain. It’s good to hear I’m wrong.

I guess that if one’s Cloze Anything note type has cards before the one with the cloze deletions (say reading and listening comprehension cards for language learning), they can first convert the old cards to an intermediate note type, and then convert it to the target note type, mapping the cards accordingly. It is a bit of a hassle, but this process should be done only once, so it is not a big deal. The manual process can be described in the documentation, or automated using the add-on.

@matthayes
Copy link
Owner

Anki lets you reorder the card types for a note type. It may be that if you move your other card types like recall to the end that it will map successfully without the intermediate note type.

@rwmpelstilzchen
Copy link
Contributor Author

Yeah, that would be a simpler solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants