Closed psychodelicwasabi closed 3 years ago
Is this not on the kanji info page? A KANJIDIC dictionary file is able to be installed by Yomichan.
Sorry, I guess I wasn't obvious. What I mean is, I want to be able to import that data into the cards when I add the kanji to Anki.
You can edit your Anki templates if you enable advanced settings. It can also be useful to enable debugging while you do it, so you can see the structure of the object passed to the templates. You can always reset the templates if you mess it up.
However, it's not currently possible to reliably add stroke count to templates by yourself because not all kanji have the same amount of statistics available and Handlebars can't natively perform equality checks with the names of the statistics.
If a helper such as one described here was added to https://github.com/FooSoft/yomichan/blob/e8701cb950edd4c90f6c911e340db3af32194113/ext/bg/js/handlebars.js#L123-L135 you could do something like this within an existing template such as {glossary}
:
{{#each definition.stats.misc}}
{{#ifEquals name "strokes"}}
<p>Stroke count: {{value}}</p>
{{/ifEquals}}
{{/each}}
Right now the best you can do is just list everything in definition.stats.misc
like so:
<ul>
{{#each definition.stats.misc}}
<li>{{notes}}: {{value}}</li>
{{/each}}
</ul>
The stroke count information is available on the Kanjidic, still, you can't import them with Yomichan. Frequency could also be a nice thing to have.