Japanese Kanji Scraper

This is the support thread for my addon: Japanese Kanji Scraper

This addon finds any unique kanji in the Expression field of a note, and puts them in the Expression Kanji field.

There are 2 separate triggers for this:

  • Editing a note that has an Expression and Expression Kanji field.
  • Selecting a note in the browser screen and using the Edit > Scrape Expression Kanji button.

The purpose of this addon was to create a stroke-order section of a flashcard that lists only the unique kanji found in the text of the card. This is useful for sentence cards and vocabulary cards. Loading the raw expression text into the stroke order field is likely to include a bunch of kana in both cases, so this avoids any wasted space.

I chose the field name Expression Kanji because I wanted to avoid any overlap with other addon field names.

I guess if you have any questions, post them here.

Removed onFocusLost event hook, since it seems to be messing everything up. I looked at the Japanese Support addon’s method and copied it basically exactly, but I guess I am missing something. Might take a look at it later, but I’m not too worried about it for now.