KanjiStudy-Tools

AnkiWeb addon 435881682

Maintains decks from Japanese Kanji Study exports by tagging notes with known kanji, deduplicating while keeping more-studied notes, and updating note content from text exports.
AI-generated summary; may contain mistakes.

importnote-managementtaggingduplicatesservice-client

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-04-10
Anki versions
25.09.2~
Description language
en

Maintenance

active

  • Last update or commit was 174 days before the snapshot (2026-04-10).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
24.0625.09.2+2026-04-10
History across monthly snapshots

Loading…

Similar addons

Export Known Words

Exports known words from an Anki collection as text, clipboard, or JSON, selecting deck, field, and mature, young, learning, or relearning card states.

export

Rating 0 πŸ‘ 0 Β· πŸ‘Ž 0 ⭐ 2 Anki 26.09~ Updated 2026-09-21

README

KanjiStudy-Tools

A collection of scripts I wrote to do maintenance on Anki decks created through the Japanese Kanji Study app's export to Anki feature. See below for a list of the things it can do.

Installation

The recommended way is to install the add-on from AnkiWeb.

Alternatively, you'll want to get a copy of the kanjistudy_tools/ folder in this repository inside your Anki add-on folder[^addonfolder]. Here is one way to do that (on linux):

cd "$wherever_you_want_to_store_this_repo/"
git clone https://github.com/AgentConDier/kanjistudy-tools.git
cd kanjistudy-tools/
ln -rs kanjistudy_tools/ ~/.local/share/Anki2/addons21/

[^addonfolder]: When in doubt, click Tools β€Ί Add-ons β€Ί View Files to find your add-ons in the filesystem.

Features

The following options are added to Anki's Tools menu by this addon:

Tag notes with known kanji

The biggest reason I wanted to write this add-on. This script will read a Kanji Study backup file (.ksdata), and import the list of kanji you already know, based on their study rating.

Then, it will look through all notes in the currently selected deck, and compare the contents of the field you configured to the list of known kanji. If all kanji in that field are known, a tag is added to the note.

My use case is to favorite every word I like, and then regularly export all favorited words to an Anki deck. Then, I can create a filtered deck to study only those words I actually know all the characters for.

Filtered decks will include all cards matching the filter in your study session, so you need to explicitly limit the filter to only due cards. Here is what I use to make it behave like a normal deck:
Filter: "deck:ζ—₯本θͺž Random Stuff" is:due tag:all-kanji-known
Second Filter: "deck:ζ—₯本θͺž Random Stuff" is:new tag:all-kanji-known

The script needs to be configured with the path to a directory that contains your Kanji Study backups. To create a backup, open Kanji Study and scroll down on the home screen. Below Backup Info, tap Settings and then Export backup file.

Progress-aware deduplication

This script assumes that your notes have a field (e.g. the ID field for Kanji Study words) which uniquely identifies that note, and any additional notes (in the selected deck) with the same value in that field are duplicates and should be deleted. To prevent loss of study progress when deleting notes, for each unique value of the deduplication field, the note with the most repetitions is kept.

Use case: After the last big translation update, Kanji Study updated the note type used for word cards, and re-exported existing cards with the new model, so I needed a way to get rid of the duplicates.

Update note data from export

Continuing the assumption that each note has a unique identifier, this provides a way to update your notes without affecting study progress, if the content associated with that identifier changes. When you start this script, the file picker asks for an Anki deck text export containing the new data. Each line in the export contains the note type (model) and the field values for one note. The script will look for a matching note in your collection (deck-agnostic) based on note type and ID value, and replace the content of all other fields with the imported data.

To import updated note fields from Kanji Study, the process is as follows:

  • (In AnkiDroid) Go to Settings β€Ί Sync and activate One-way sync, so you can discard changes to the local collection after the export is done
  • Delete the deck with your Kanji Study cards (to forcibly re-create all cards with the latest content)
  • Open Kanji Study and export (Add to Anki) the desired kanji/words/sentences to a (new) temprary Anki deck
  • Return to AnkiDroid, long-press the new deck and select Export deck
  • Complete the export using the Notes in Plain Text (.txt) format, with Include note type name enabled
  • To restore the previously deleted notes, tap the sync button and choose to keep the remote collection from AnkiWeb
  • Now you can move the export to your PC and use the script to import it

Instead of a statically configured field, this script uses the Sort Field of each note type as the unique note identifier. This means that the note type(s) in the export need to match[^notetypematch] those in your anki collection. If that is not the case, you can use the Notes β€Ί Change Note Type feature from Anki's Browse window to migrate your notes.

[^notetypematch]: What's important is that the name and field order of the note type matches, since the field order also decides the export's column order. Adding or removing fields at the end of the list is fine.

Notes

On completion, each of the scripts will show a popup dialog with a log and some statistics about their operation and changes to your Anki collection. Changes done by the scripts are committed at the end as a single undo history item, so you can easily revert if the script didn't do what you intended.

If a script crashes, please restart Anki to flush out any actions the script might have done in the frontend, but not yet committed to the backend.