From 659118c20c4a9f090634220c52d8bb06f481bea6 Mon Sep 17 00:00:00 2001 From: sudacode Date: Mon, 16 Mar 2026 01:50:13 -0700 Subject: [PATCH] docs: document stats page mining, word exclusions, and vocabulary UX improvements --- README.md | 2 +- ...026-03-16-stats-mining-and-vocabulary-ux.md | 11 +++++++++++ docs-site/immersion-tracking.md | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 changes/2026-03-16-stats-mining-and-vocabulary-ux.md diff --git a/README.md b/README.md index 8d99e3a..c7062b1 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ SubMiner is an Electron overlay that sits on top of mpv. It turns your video pla - **Look up words as you watch** — Yomitan dictionary popups on hover or keyboard-driven token-by-token navigation - **One-key Anki mining** — Creates cards with sentence, audio, screenshot, and translation; optional local AnkiConnect proxy auto-enriches Yomitan cards instantly - **Reading annotations** — N+1 targeting, frequency-dictionary highlighting, JLPT underlining, and character name dictionary for anime/manga proper nouns -- **Immersion stats** — Optional local dashboard and overlay for watch time, anime progress, session drill-down, vocabulary growth, and mining throughput +- **Immersion stats** — Optional local dashboard and overlay for watch time, anime progress, session drill-down, vocabulary growth, mining throughput, and card mining directly from example sentences - **Subtitle tools** — Download from Jimaku, sync with alass/ffsubsync - **Jellyfin & AniList integration** — Remote playback, cast device mode, and automatic episode progress tracking - **Texthooker & API** — Built-in texthooker page and annotated websocket feed for external clients diff --git a/changes/2026-03-16-stats-mining-and-vocabulary-ux.md b/changes/2026-03-16-stats-mining-and-vocabulary-ux.md new file mode 100644 index 0000000..d1d6d81 --- /dev/null +++ b/changes/2026-03-16-stats-mining-and-vocabulary-ux.md @@ -0,0 +1,11 @@ +type: added +area: immersion + +- Added Mine Word, Mine Sentence, and Mine Audio buttons to word detail example lines in the stats dashboard. +- Mine Word creates a full Yomitan card (definition, reading, pitch accent) via the hidden search page bridge, then enriches with sentence audio, screenshot, and metadata extracted from the source video. +- Mine Sentence and Mine Audio create cards directly with appropriate Lapis/Kiku flags, sentence highlighting, and media from the source file. +- Media generation (audio + image/AVIF) runs in parallel and respects all AnkiConnect config options. +- Added word exclusion list to the Vocabulary tab with localStorage persistence and a management modal. +- Fixed truncated readings in the frequency rank table (e.g. お前 now shows おまえ instead of まえ). +- Clicking a bar in the Top Repeated Words chart now opens the word detail panel. +- Secondary subtitle text is now stored alongside primary subtitle lines for use as translation when mining cards from the stats page. diff --git a/docs-site/immersion-tracking.md b/docs-site/immersion-tracking.md index d2e21a8..3170505 100644 --- a/docs-site/immersion-tracking.md +++ b/docs-site/immersion-tracking.md @@ -33,7 +33,7 @@ Dashboard tabs: - Anime: cover-art library, per-series progress, episode drill-down, and direct links into mined cards - Trends: watch time, sessions, words seen, and per-anime progress/pattern charts - Sessions: expandable session history with new-word activity, cumulative totals, and pause/seek/card markers -- Vocabulary: top repeated words, new-word timeline, kanji breakdown, and click-through occurrence drilldown in a right-side drawer +- Vocabulary: top repeated words (click a bar to open the word), new-word timeline, frequency rank table with full readings, kanji breakdown, word exclusion list, and click-through occurrence drilldown with Mine Word / Mine Sentence / Mine Audio buttons Stats server config lives under `stats`: @@ -56,6 +56,22 @@ Stats server config lives under `stats`: - `subminer stats` fails with an error when `immersionTracking.enabled` is `false`. - `subminer stats cleanup` defaults to vocabulary cleanup, repairs stale `headword`, `reading`, and `part_of_speech` values, attempts best-effort MeCab backfill for legacy rows, and removes rows that still fail vocab filtering. +## Mining Cards from the Stats Page + +The Vocabulary tab's word detail panel shows example lines from your viewing history. Each example line with a valid source file offers three mining buttons: + +- **Mine Word** — performs a full Yomitan dictionary lookup for the word (definition, reading, pitch accent, etc.) via the hidden search page, then enriches the card with sentence audio, a screenshot or animated AVIF clip, the highlighted sentence, and metadata extracted from the source video file. Requires Anki and Yomitan dictionaries to be loaded. +- **Mine Sentence** — creates a sentence card directly with the `IsSentenceCard` flag set (for Lapis/Kiku workflows), along with audio, image, and translation from the secondary subtitle if available. +- **Mine Audio** — creates an audio-only card with the `IsAudioCard` flag, attaching only the sentence audio clip. + +All three modes respect your `ankiConnect` config: deck, model, field mappings, media settings (static vs AVIF, quality, dimensions), audio padding, metadata pattern, and tags. Media generation runs in parallel for faster card creation. + +Secondary subtitle text (typically English translations) is stored alongside primary subtitles during playback and used as the translation field when mining from the stats page. + +### Word Exclusion List + +The Vocabulary tab toolbar includes an **Exclusions** button for hiding words from all vocabulary views. Excluded words are stored in browser localStorage and can be managed (restored or cleared) from the exclusion modal. Exclusions affect stat cards, charts, the frequency rank table, and the word list. + ## Retention Defaults Data is kept for the following durations before automatic cleanup: