piazzatron/anki-smart-notes

[Feature Request] Setting to provide the option to run only on cards where the target field is blank

Closed this issue · 2 comments

Context

For context, I am currently using this add on to automate my German learning in two ways:

  1. To generate example sentences based on the a new word (Prompt: Create a simple, commonly spoken sentence in German using the word {{German Word}}. Reply with only the sentence.).
  2. To generate a command-like statement based on a new phrase (Prompt: Generate a contextual command of the phrase "{{German Phrase}}" that is intended to test a German language learner on how to use this phrase in specific conversation situations. For example, if the card has "Ich bin ledig" in {{German Phrase}}, the command could be "Tell someone in an informal setting that you are single". Reply with just the interpretation.).

I am mostly using the shortcut ctrl+shift+g to do perform these automations when I create the cards, but there are also situations where I am bulk importing the cards into Anki (because I have them stored in an excel file) and when I am bulk updating existing cards which I have made (or imported).

The add-on works perfectly when I am doing it on a card-by card basis, but I noticed that when I am generating the smart fields in bulk it will run on all cards, even the ones which already have content in the target field. Whilst there are situations where I would choose for the override to occur, there are also situations where I would prefer it not too. For example, if I have manually altered the content of the target smart field because my prompt didn't work perfectly, I want to retain my manual alteration.

Feature Request

Following the above, would it be possible to add a setting which allows the user to choose whether the smart field generation applies to (a) all selected cards; vs. (b) only selected cards in which the target field is blank?

Hey Seth - appreciate you writing this up. This one has been bothering me too. Annoying when you want to add an additional smart field to a deck without regenerating the existing cards, etc.

I'll add an option for regenerating notes from scratch vs only generating empty fields in the next version. Default should be to only generate empty fields.

Implemented in v1.3.0