-
Notifications
You must be signed in to change notification settings - Fork 12
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
Is it possible to reveal one by one? #6
Comments
Hey thanks for the suggestion! This is a good idea. I think this should be pretty straightforward to add. I will take a look at the code example you linked. Since this is JavaScript it should be pretty doable. |
Glad it can be useful :) Don't hesitate to ask me if you need anything. I linked to your addon and to this thread in my repo as your addon will probably interest people that stumble upon my repo. |
I have something basically working if you'd like to test out a preview. Let me know what you think! To use this, your card type must end in Add this button somewhere in your card. This is what will cycle through the clozes on the question side.
Use the following script instead. Basically what this does is hook into that button and cycle through each of the cloze cards on the question side. For a "reveal" card I've updated the default setting for
|
I'm sorry, I tried a few things but I fail to understand how I should test this. I have to add the script you quoted into the back of a new cloze type that ends in reveal ? I tried various other combinations of things to test it but always have this error in the preview template :
edit : it's really too bad for the licensing. I am quite ignorant about this so if you want to tell me more I'm all hears :) |
Sorry I realize I should have given you more than the script because I made small changes to the front template, like adding a button. The button reveals the next cloze. When you get to the last one it starts over. I haven't added a keyboard shortcut. I've created a branch with the changes. It's probably easiest to refer to the updated instructions in that branch: https://github.com/matthayes/anki_cloze_anything/blob/click_to_reveal/docs/INSTRUCTIONS.md These instructions include the above script as well as the other modifications needed to front template. Also if you want to test it out without messing with Anki you can also download the HTML file here and open it in a browser. https://github.com/matthayes/anki_cloze_anything/blob/click_to_reveal/examples/front.html |
I also have a question about how you typically use a "reveal one by one" style card or cards. With the way I've implemented it, all the c1, c2, etc. clozes are revealed on the question side of the card and there is only one card. First you see the content with everything hidden, then you click and see the c1 content filled in, then you click and see the c2 content filled in, etc. I realize that an alternative possible implementation is to have a card for c1, a card for c2, etc. and reveal each of the c1 parts one by one on the first card, the c2 parts one by one on the second card, etc. So this would basically be very similar to traditional cloze cards except that if you have multiple parts clozed with c1 on the first card you can reveal the parts one by one. I could see both approaches being useful depending on what you are doing. |
The version I use (that is mostly in my repo) does the second thing you talk about. The gif example in my repo contains only c1 cards for exampe.
I think this way is better and more flexible : if I forget a subpart I can just turn the 1 into a 2 and it will create a new card with only the missing part. |
I'll have to think about this some more and how to accommodate both approaches in a generic way. The first approach was easy to implement because it is so similar to the way cloze normally works. Instead of having a card for |
You can just split cloze where you want the reveal to end, like adding }}{{c1:: I use Symbol as you type addon to do this quickly, it's now very fast and intuitive to me I think the second approach is easier to grasp for someone who was using regular clozes previously. It also has an enormous benefit : people can convert all their old cloze in a batch way, whereas switching from regular cloze to the first approach requires rethinking how you cloze and reshaping each card IMO |
I think it depends on how you're using the normal cloze. Usually for my cards I don't reuse |
That right and renders my argument moot. But I still think my way is more flexible as it allows to create multiple cards or just one. Which is very handy when forgetting a subquestion |
Hi,
I was desperate to find a way to make cloze deletions that coul be revealed one by one, so I found a script and worked a bit on it in my repo. So now I have something that suits my need quite well.
But I just found out about your ambitious project that is far more mature. Your knowledge of js is incomparably better than mine. I played around with it but I can't figure out if there is a way to reveal the cloze one by one. Is it possible? An example of such behavior can be seen in the demo_gif of my repo.
I didn't post this to promote my thing or anything but you might be interested in taking a look anyway.
Have a nice day! And congrats on this addon.
The text was updated successfully, but these errors were encountered: