Anki add-on: JLPT Color Tags

JLPT Color Tags 🎌✨ Automatically colorize and/or tag your Japanese cards by JLPT level using Jisho.org 🌟 Features Looks up the lookup field to determine JLPT level ( always picks the easiest level if multiple are listed, e.g., JLPT-N5 over JLPT-N1 ). Colors configured fields only if ENABLE_COLORING is true: N1 → 🔴 Red (hardest) N2 → 🟠 Orange N3 → 🟡 Yellow N4 → 🟢 Green N5 → 🔵 Blue (easiest) None + Common → 🟣 Purple (special case) Adds JLPT tags (JLPT-N5 … JLPT-N1) and a Common word tag if the word is marked as common on Jisho. 🏷️ Preserves existing HTML (e.g., <br> , <i> , <b> ) in your fields while applying JLPT colors. Respects manual tag edits — recolors fields if you add/remove JLPT tags yourself. Configurable per-level skipping: you can skip rescanning cards already tagged with specific JLPT levels (or JLPT-None) to speed up future runs. Auto-updates colors: if you change colors in the config, running the add-on again will update all cards to match. Deck filtering: only modifies notes in the decks specified in TARGET_DECKS. Use "current" to target the currently open deck, or specify deck names explicitly. 🛠 How it works Queries Jisho for the first word in the lookup field. Determines the JLPT level: if multiple levels are found, the easiest (highest number, N5 > N1) is chosen. Checks the associated reading (LOOKUP_FIELD2) if provided to ensure the correct word variant is selected. Updates colors and tags on the card based on JLPT results. Cards already tagged with JLPT levels can be skipped depending on your config. Recoloring happens only if ENABLE_COLORING is true, otherwise fields remain untouched. Progress window shows the number of notes processed. The final window shows how many were updated from Jisho this session. ⚠️ Notes & Limitations Existing HTML formatting (like <br> ) is preserved; only old <font> wrappers are replaced with JLPT coloring. Some words may not have JLPT data on Jisho; in that case, JLPT-None is added (or skipped if already present). Colorization applies to all configured fields, but JLPT lookup is always based on the configured LOOKUP_FIELD only. Lookup and coloring are skipped for cards outside of decks specified in TARGET_DECKS . First token of the expression and reading is used for lookup (space-delimited). Any extra text after the first token is ignored. Only the word chosen as the “best candidate” has its JLPT and Common flags applied ⚙️ Customization In the add-on Config, you can adjust: LOOKUP_FIELD → which field to query Jisho for JLPT data LOOKUP_FIELD2 → which field to provide the Reading of the associated LOOKUP_FIELD ENABLE_COLORING → toggle coloring on/off (tags are still applied) JLPT_COLORS → customize colors for each JLPT level COMMON_NONE_COLOR → color for Common + JLPT-None cards TARGET_FIELDS → specify which fields should be colored TAGS → choose which tags to apply (JLPT- tags and Common) SKIP_JLPT_LEVELS → control which JLPT-tagged cards are skipped in future scans TARGET_DECKS → limit processing to certain decks; "current" targets the active deck, or use exact deck names 🎯 Summary JLPT Color Tags colors and tags your Japanese vocabulary using Jisho, chooses the most learner-friendly JLPT level when multiple are present, preserves your formatting, and respects manual adjustments to tags Perfect for visualizing your JLPT progression, keeping cards organized, and only touching the decks you want. 💡📚 📝 Changelog v1.3.2 — 2025-11-15 Version bumped to new Anki version (25.09.2) v1.3.1 — 2025-09-20 Fixed an issue where notes that only had their fields recolored (without JLPT/Common tag changes) were not counted as updated. Recoloring-only changes are now included in the update count, ensuring consistency when scanning decks with ENABLE_COLORING enabled. v1.3.0 — 2025-09-18 JLPT level detection now selects the easiest level when multiple JLPT results exist (e.g., ["jlpt-n1", "jlpt-n5"] → JLPT-N5). Checks the reading field (LOOKUP_FIELD2) to match the correct word variant when multiple variants exist for the expression. Only the JLPT and Common info from the selected “best candidate” is applied; other candidates are ignored. Prior versions always chose the first result. This should hopefully result in smarter searches based on the expression and reading provided to Jisho. Uses the first token only of the expression and reading for Jisho lookups; extra text after the first token is ignored. v1.2.0 — 2025-09-16 Added LOOKUP_FIELD to config to allow querying a field other than Expression. Added ENABLE_COLORING to config — fields are not modified if coloring is disabled. Added TARGET_DECKS to config, only specified decks are modified. "current" is default.