Skip to content

Releases: ErickMain/anki-kotoba-export

v0.12.8 - Mined-comment readability fix

Choose a tag to compare

@ErickMain ErickMain released this 21 Sep 20:38

Fixes mined-comment readability at the actual root cause (not a cosmetic tweak - a real bug in HTML-to-text conversion).

Yomitan/Jitendex mining templates structure their glossary as real HTML (each gloss word in its own <li>, each grammar tag in its own <span>), but generic HTML-to-text stripping was deleting those tag boundaries with nothing put in their place - producing wall-of-text output like "nounwillpowergutsdeterminationgritspirit...". Checked Anki's own strip_html source directly (it's a blind tag-deleter with no special handling for <br>/<div>/<li>/<p>), confirming this affected every real run, not just an edge case.

Now recovers that structure before any generic stripping happens: glossary <li> lists are comma-joined, block-level tags become line breaks, and adjacent grammar-tag <span>s get properly spaced. Verified end-to-end against real exported note HTML and live in a real Kotoba Discord quiz.

v0.12.7 - AnkiWeb sharing prep

Choose a tag to compare

@ErickMain ErickMain released this 04 Sep 23:41

Groundwork for sharing this add-on publicly on AnkiWeb - no behavior changes for existing users beyond a stricter version gate.

  • Qt6 requirement is now enforced, not just documented: min_point_version bumped to 250200 (Anki 25.02+). Anki's Qt5 packaged builds were fully discontinued around December 2024-January 2025, so this guarantees a Qt6 environment structurally - Anki itself will refuse to load the add-on on anything older, rather than installing and crashing on first dialog open.
  • Added an MIT LICENSE.
  • Added a "Known limitations" section to the README (the undocumented Kotoba API dependency, the plaintext-cookie-at-rest tradeoff).
  • Added ANKIWEB_LISTING.md - draft submission text, not part of the installed package.

v0.12.6 - Original audit fully closed out

Choose a tag to compare

@ErickMain ErickMain released this 04 Sep 23:12

Fixes the remaining lower-priority findings (F2, F3, F5, F6) from the original adversarial audit, independently re-verified against current code. This closes out that audit entirely - every finding (H1, M1-M6, F1-F8) has now been addressed across this and prior releases.

  • F2: a tag or deck name ending in a literal backslash produced a malformed, unterminated Anki search string. Fixed by escaping backslashes before quotes.
  • F3: cancelling the note-mapping step of an ad-hoc export ("Export selected to Kotoba...") opened the full preset-manager dialog anyway, due to a Qt dialog-lifecycle quirk (reject() called before the dialog's own exec() had started). Fixed with an explicit cancelled-flag check.
  • F5: the final config save in the automatic-export hook wasn't guarded against a save failure (disk full, locked file) - same bug class as the F1 fix from an earlier release, just a different call site that was missed. Now wrapped consistently.
  • F6: when automatic export wasn't fully configured, every matching preset logged its own near-identical "skipped" history entry - confirmed against real usage data (this produced 8 near-duplicate rows in an earlier real history export). Now logs one combined entry.

F7 (a dead code path) is documented rather than removed, since it's still real protection for any future caller; F8 (an actually-unused method) is removed. F4 was deliberately left as-is - its real cost is already absorbed by the sync dedup guard shipped in v0.12.3.

v0.12.5 - User guide

Choose a tag to compare

@ErickMain ErickMain released this 04 Sep 22:55

Documentation-only release - no code changes since v0.12.4.

Adds USER_GUIDE.md: a step-by-step walkthrough from install through your first export, both delivery paths (including the real steps for Kotoba's Import from File screen), advanced-mode setup, overwrite mode, automatic export, preset management, History, and troubleshooting. Linked from the README.

v0.12.4 - Remove non-functional Copy CSV button

Choose a tag to compare

@ErickMain ErickMain released this 04 Sep 22:46

Removes the "Copy CSV + Open Kotoba" button from the export preview dialog.

Confirmed live against the real kotobaweb.com "New Custom Deck" editor: its Import control opens a native OS file picker, not a paste target - there was nowhere for this button's clipboard content to actually go. Kotoba's own help docs confirm custom-deck import is file-based only ("create a spreadsheet... save it as a CSV file").

"Save as .csv..." already covers this exact use case correctly (save a file, then Import from File on Kotoba's site) and remains available, alongside advanced-mode direct upload. No other behavior changes.

v0.12.3 - Skip redundant sync-triggered re-uploads

Choose a tag to compare

@ErickMain ErickMain released this 03 Sep 00:29

Adds a dedup guard for automatic sync-triggered exports, based on a real day of use: syncing AnkiWeb several times in a short window (nothing reviewed in between) was re-uploading byte-identical deck content on every single sync, and occasionally hitting Kotoba's own rate limiter as a result (observed ~7.3s retry delays in a real history log).

A sync-triggered automatic run now skips the upload (logged to History as "skipped", with a clear reason) when the freshly-built card set is identical to what was last successfully uploaded for that deck name - tracked via a content fingerprint, recorded after any successful upload (manual or automatic), so the check is accurate regardless of which trigger last actually uploaded. Startup, shutdown, and manual runs are unaffected - they happen at most a few times a day and don't need this.

v0.12.2 - Test coverage for H1/F1/M4 fixes

Choose a tag to compare

@ErickMain ErickMain released this 02 Sep 22:45

No behavior change from v0.12.1 - this closes the test-suite gaps for three of the fixes released there:

  • The import-sanitization logic (H1: presets imported from a file no longer carry over automatic-export triggers or deck-overwrite links) is now a standalone, tested function (presets.sanitize_imported_presets).
  • The "never raise on a corrupted config" guard around automatic exports (F1) is now a standalone, tested function (presets.load_presets_safe) instead of living only inside the Anki hook callback.
  • The automatic-export warnings summary (M4: History entries for unattended runs now include a one-line summary of any card-validation warnings) is now a standalone, tested function (format.summarize_warnings).

All three previously lived in Anki-dependent GUI/hook code the plain pytest suite can't import; the logic itself moved into the same aqt-free kotoba/ package the rest of the project's tested logic already lives in, with the GUI/hook code left as a thin call-through. 145 tests pass (11 new).

v0.12.1 - Security & reliability fixes

Choose a tag to compare

@ErickMain ErickMain released this 02 Sep 22:38

Patch release fixing findings from an adversarial security/bug audit and independent re-verification pass. No new features; behavior of existing features is otherwise unchanged.

Fixes:

  • Importing presets no longer carries over automatic-export triggers or deck-overwrite links from the imported file - those are the two fields with real-world side effects, and an imported file is untrusted input (may have been shared by someone else, not just a self-backup). Re-enable and re-run an imported preset once if you rely on either.
  • The advanced-mode session cookie is now validated before use; a cookie containing a stray line break used to trigger an internal InvalidHeader error that could leak the raw cookie value into an error message shown in the UI or written to History - it's now rejected up front with a generic message instead.
  • Both CSV exports (Kotoba deck CSV and History -> Export to CSV) now escape a leading =, +, -, or @ in any free-text cell, preventing formula/DDE injection if the file is opened in Excel/Google Sheets.
  • Overwrite-mode uploads no longer silently fall back to creating a brand-new deck (and rebinding the preset to it) on a validation failure like "duplicate question found" - only an actually stale link (deck deleted, or the stored secret no longer valid) triggers that fallback; anything else now surfaces as a real error, as it always should have.
  • Automatic (unattended) export runs now include a summary of any card-validation warnings in their History entry, matching what the manual preview dialog already shows - there's no dialog for an unattended run, so this was previously invisible.
  • Automatic export can no longer crash out of Anki's own startup/shutdown/sync hooks if the stored preset config is ever corrupted - that failure is now caught and logged to History like every other automatic-export failure mode.
  • README now states plainly that this add-on requires a Qt6 build of Anki (2.1.50+ shipped separate Qt5/Qt6 packaged builds side by side, so the version number alone doesn't guarantee compatibility).

v0.12.0 - Retry/backoff for the direct API

Choose a tag to compare

@ErickMain ErickMain released this 02 Sep 17:22

New: direct-API calls now retry automatically with backoff on a 429 (Kotoba rate-limits POST/PATCH), or a transient 502/503/504/connection failure - nothing to configure, it just makes uploads more resilient to a brief rate-limit hit, which is now a real possibility with "run all" and automatic startup/shutdown/sync export able to fire several uploads back to back.

Retries are deliberately conservative and asymmetric: interactive uploads get up to 2 retries, but automatic/unattended exports get only 1, since a retry adds bounded but real delay during Anki's own startup/shutdown/sync - this feature arc has been careful throughout not to make that risk worse.

Install/upgrade: download kotoba_export-0.12.0.ankiaddon below, then in Anki: Tools -> Add-ons -> Install from file (overwrites the previous version in place).

Full changelog: v0.11.0...v0.12.0

v0.11.0 - Automatic export on AnkiWeb sync

Choose a tag to compare

@ErickMain ErickMain released this 02 Sep 16:20

New: a third automatic-export trigger - AnkiWeb sync finishing - alongside Anki startup/shutdown. The preset editor's single "Automatic export" dropdown is now three checkboxes (Anki startup / Anki shutdown / AnkiWeb sync finishes), any combination. Existing presets migrate automatically - nothing to redo. Likely a better fit than shutdown for "forgotten today"-style presets on a review-then-sync routine, since it doesn't delay Anki closing (though it can still add a brief pause right after sync finishes if the upload is slow).

Also fixes: a latent bug where the reuse-mode and auto-run controls only showed their true saved value while advanced mode was enabled - otherwise an untouched Save while advanced mode was off could silently downgrade an Overwrite-mode or auto-run preset back to its default.

Install/upgrade: download kotoba_export-0.11.0.ankiaddon below, then in Anki: Tools -> Add-ons -> Install from file (overwrites the previous version in place).

Full changelog: v0.10.0...v0.11.0