KanjiStudy-Tools

AnkiWeb addon 435881682

Maintains Anki decks exported from Japanese Kanji Study by tagging notes whose kanji are all known, deduplicating while preserving study progress, and updating note content from text exports.
AI-generated summary; may contain mistakes.

importnote-managementtaggingduplicates

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-04-10
Anki versions
25.09.2~
License
Unlicense (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

stale

  • Last update or commit: 2026-04-10 (205 days before the snapshot).
  • Commits in the last year: 1.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

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

Kanji Unlock Addon

Automatically unsuspends kanji cards whose kanji appear in already-learned vocabulary words, optionally including component radicals, helping align vocabulary and kanji study progress.

review-flownote-managementdeck-management

4 votes 51% approval πŸ‘ 4 Β· πŸ‘Ž 0 ⭐ 1 Anki 2.1.33~ Updated 2020-09-15
Known Kanji Manager

Scans tagged cards for kanji and suspends or unsuspends them based on whether all contained kanji are known, updating manually.

review-flownote-management

9 votes 56% approval πŸ‘ 8 Β· πŸ‘Ž 1 Updated 2020-05-24
Kanji Find and Tag

Bulk-tags notes whose chosen field contains only a specified subset of kanji, ignoring non-kanji characters, with selectable deck, field, target kanji, and tag name.

tagging

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.1~ Updated 2025-02-12

Description

A collection of scripts I wrote to do maintenance on Anki decks created through the Japanese Kanji Study export to Anki feature.

Features

  • Tag notes if all the kanji they contain are known, by importing study ratings from a .ksdata file
  • Delete duplicates (based on a specific field) while preferring to keep the version with more repetitions
  • Update note content from text exports

Notes

Please read the more detailed explanation on GitHub.

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.