Add empty card placeholder#135
Conversation
If you have vocab cards and your first field is the vocab or its translation, you aren't able to create cards, only modify existing ones. With this change you can add a placeholder text to the first field of a card, e.g. "TODO", that you can later search for and edit.
|
This is actually mentioned in the README.
So you just need to get a note type where the sentence field is set as the first field. Like this. Most of the time it's a bad idea to have vocab cards. An example sentence should be placed on the front. If you're mining cards from anime, for example, it makes no sense to omit the sentence. If you have a custom note type where for some reason you can't change the order of the fields then it is worth considering this PR, but it would be great if you provided more info about why that is the case. |
I don't disagree, but I don't think people shouldn't be allowed to create them.
If you have the vocab field as your first field this lets you use Anki's built in duplicate detection to see if you have a card for that word already. At least in the past this was was Rikaitan or one of its predecessors used for duplicate detection, not sure if it has changed. |
|
I removed the config option and updated the README. Feel free to change the wording. Also let me know if you want me to squash the commits or anything. |
|
Since |
|
It won't be called if you haven't enabled Honestly though I can see the argument for just calling it every time. I figured if you want to reload the config there is a greater chance that you've changed the order of the fields (not that this is something that happens often at all). In actuality there's no reason to assume those events are actually correlated though, so the safest thing would be to accept the tiny overhead and just check every time. |
|
If we somehow could get rid of the global variable |
|
A config option would work, but I think that adds unnecessary friction for new users. It's also strictly speaking not really a configuration option, it's just an chore to make sure the setting matches your note structure. |
If you have vocab cards and your first field is the vocab or its translation, you aren't able to create cards, only modify existing ones.
After this PR you can add a placeholder text to the first field of a card, e.g. "TODO", that you can later search for and edit.
Sorry for the README edits, they snuck in without me noticing, but I figure there's no harm in including them.