-
Notifications
You must be signed in to change notification settings - Fork 65
Add simple logic to anki export field mappings, if/else
#586
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
Comments
Some initial hacking:
This prints out:
This is still going to be tough to integrate into the field mapping code, b/c the various conditions would need to be evaluated, e.g. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes during exports it would be useful to put one field or another in the anki note.
For example, I have two practically identical exports for German pluralization: one that puts the "parent" in the singular field, and another that puts the "term" in the singular field, because for some German words the sing and plural forms are the same.
Possible grammar options:
Like Anki:
{#myfield}{ myfield }{/myfield} {^myfield}{ otherfield }{/myfield}
Like Jinja:
{% if myfield %}{ myfield }{% else %}{ otherfield }{% endif %}
Like Python:
{ parents or term }
(No idea how difficult this is going to be, but the request makes sense).
The text was updated successfully, but these errors were encountered: