I’m creating an add-on that would allow the card to be marked as “easy” when you click enter or the spacebar 2x. However, I would like that if the card is new or still being learned, when I click enter or the 2x spacebar, the card is marked as “good” instead of “easy”. Could you help me? That’s what I’ve got so far:
from aqt.reviewer import Reviewer
def my_defaultEase(self):
if self.card and self.card.type == 0: # Check that the card is new
return 3 # Set the default facility to 3 for new cards
return 4 # Keeps the default facility as 4 for other cases
Reviewer._defaultEase = my_defaultEase
note: i know absolutely nothing about programming and all i’ve found out is by searching this forum and chatgpt
Maybe using Qtimer to measure the time and see if it is pressed twice within a second(0.5~1).
ChatGPT is quite useful, but does not generate much proper code. So if you want to create Anki add-ons with ChatGPT, you need to have a basic knowledge of Python(If not, you can’t correct ChatGPT lies or combine codes properly).
How to create Anki add-ons can be found in the AnkiManual.
I’d like anki’s response to be independent of the speed at which the key is pressed. I would like the only criterion for marking the card as “good” to be if the card is new or still being learned. If it’s neither, I’d like anki to mark it as “easy”. Unfortunately, I don’t have much time to learn how to program and I haven’t found an add-on that does this. If it’s not too difficult, could you edit the code for me? Thank you so much!
The code has a flaw: use a new card as a test and press enter, the card will be marked as “good”. So far so good. However, the moment that card appears again, even though the card is still being learned, if you press enter the card will be marked as “easy” instead of “good”