How to make kanji cards with Yomichan and 漢字源?

I’ve been using Yomichan to make vocab cards with Anki, and now I’d like to do the same for Kanji cards. The problem is that I’d like to use 漢字源 to get readings and meanings in Japanese instead of in English with KANJIDIC, but Yomichan treats 漢字源 as a regular dictionary instead of a kanji dictionary. My end goal is to have reading and meaning on one side, and the Kanji and stroke order on the other.

Does anyone have an idea about how to approach this? I’m not sure if 漢字源 has stroke order information, so my feeling is that I’ll have to pull that from KANJIDIC, which may involve some modifying of the anki card template file. However, I haven’t found any docs on how to modify that file.

I’m not using Yomichan so I can’t really help you with this, but for displaying the stroke order I’m using the KanjiStrokeOrders font for my kanji writing cards.
This font has the stroke order baked in, so there is no need to add information on the stroke order to my cards. It makes my Anki cards look like this (I use this on the back side only):

1 Like

That’s a good point, I could find a way to change the font instead of referencing the other dictionary which may simplify things.

My card applies the font like this:

<div style="font-family:KanjiStrokeOrders;font-size:150px">{{Kanji}}</div>

Just install the font and make sure that the font family name matches the actual font name on your device, and then it should work without further modifications.

@neicul is this doable on Kitsun?

is it possible to make anki cards with yomichan for the 10k common words?

I would like to check them once in a while to be familiarized with them and read twitter better.

I think you can download 10k decks for Anki, there is no need to make them yourself.

A quick Google search pointed me to this deck; there may be others as well.

Hmm, tricky. My first instinct was to say that if Yomichan doesn’t recognize it as a kanji dictionary and there’s no way to change that (not sure about that), I’d probably use a new profile instead and connect that to a different key you need to press. Then only import your kanji dictionary into that second profile. You’d have to create/use a different Anki note type that you can use for the second profile/your kanji cards, and then format that in the way you want.

That works, but because Yomichan doesn’t recognize that you’re trying to add kanji and not word cards, field markers like onyomi, meaning etc aren’t available seperately. You’d just have all the information that’s in a dictionary entry in one huge batch ({glossary}). Looks like this:

– so the information you want (meaning and readings) is on there, but so is a lot of other stuff and it’s kind of… very messy :laughing:
Stroke order on the back should work easily though by doing the font thing.
If I had to guess I’d say that to get good results, you’d have to edit the dictionary itself.

1 Like

I think you’re on the right track here. Since all the information is in the glossary field, I’d have parse out the information (easy enough with python) and create a new dictionary. I imagine you could copy the format of KANJIDIC and replace the fields with whatever you want. I’m not quite sure how you’d edit a dictionary though.

1 Like

I don’t know either, but that sounds like an idea :grinning_face_with_smiling_eyes:
Another option would be to do the parsing thing in javascript on the anki card itself, to make sure only the information you want gets displayed. Probably not the best choice from a performance standpoint(?) but could work in theory :laughing: