FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 213 forks source link

Capturing Yomichan Conjugation Data For Anki? #983

Closed christopherball closed 3 years ago

christopherball commented 3 years ago

Recently set up the full Yomichan Anki integration through Chrome, but one thing I can't seem to find a flashcard "marker" for, as Yomichan refers to them, is for capturing the conjugation data.

Extreme Example: 食べさせられたくなかった In Yomichan, before the definitions kick in, it shows a very useful chunk of information as follows: causative << potential or passive << -tai << adv

While this conjugation flow doesn't capture all of the example, it helps a tremendous amount for learning / decrypting the presented form. Am I missing something obvious or is this data simply not available for persistence through to Anki? Can this be put on the list to expose for Anki?

toasted-nutbread commented 3 years ago

The data is available for the Handlebars templates, but there is no marker template included by default. I'll look into adding a default marker for this, and paste it here once it's set up so you can configure it yourself.

christopherball commented 3 years ago

Awesome - I'll wait for your guidance - cheers.

toasted-nutbread commented 3 years ago

If you add the following to the handlebars templates (under the Anki fields when the Show advanced options option is enabled), you should then be able to use the {conjugation} marker to get what you want.

{{#*inline "conjugation"}}
    {{~#if definition.reasons~}}
        {{~#each definition.reasons~}}
            {{~#if (op ">" @index 0)}} « {{/if~}}
            {{.}}
        {{~/each~}}
    {{~/if~}}
{{/inline}}
christopherball commented 3 years ago

Lookin' good with the changes. Thanks for the quick turnaround - the plugin is highly useful. Between this and Morphman, studies are golden.

image