docs: update config examples, docs site, and add screenshots

- Update config examples with word field, retention, and stats options
- Add immersion tracking documentation for retention presets
- Add Anki integration and configuration docs updates
- Add stats dashboard screenshots
This commit is contained in:
2026-03-18 02:24:46 -07:00
parent 97126caf4e
commit af1505fbe6
16 changed files with 60 additions and 21 deletions

View File

@@ -319,6 +319,7 @@
"SubMiner" "SubMiner"
], // Tags to add to cards mined or updated by SubMiner. Provide an empty array to disable automatic tagging. ], // Tags to add to cards mined or updated by SubMiner. Provide an empty array to disable automatic tagging.
"fields": { "fields": {
"word": "Expression", // Word setting.
"audio": "ExpressionAudio", // Audio setting. "audio": "ExpressionAudio", // Audio setting.
"image": "Picture", // Image setting. "image": "Picture", // Image setting.
"sentence": "Sentence", // Sentence setting. "sentence": "Sentence", // Sentence setting.
@@ -347,7 +348,7 @@
"highlightEnabled": false, // Enable fast local highlighting for words already known in Anki. Values: true | false "highlightEnabled": false, // Enable fast local highlighting for words already known in Anki. Values: true | false
"refreshMinutes": 1440, // Minutes between known-word cache refreshes. "refreshMinutes": 1440, // Minutes between known-word cache refreshes.
"matchMode": "headword", // Known-word matching strategy for subtitle annotations. Values: headword | surface "matchMode": "headword", // Known-word matching strategy for subtitle annotations. Values: headword | surface
"decks": [], // Decks used for known-word cache scope. Supports one or more deck names. "decks": {}, // Decks and fields for known-word cache. Object mapping deck names to arrays of field names to extract, e.g. { "Kaishi 1.5k": ["Word", "Word Reading"] }.
"color": "#a6da95" // Color used for known-word highlights. "color": "#a6da95" // Color used for known-word highlights.
}, // Known words setting. }, // Known words setting.
"behavior": { "behavior": {
@@ -498,13 +499,21 @@
"queueCap": 1000, // In-memory write queue cap before overflow policy applies. "queueCap": 1000, // In-memory write queue cap before overflow policy applies.
"payloadCapBytes": 256, // Max JSON payload size per event before truncation. "payloadCapBytes": 256, // Max JSON payload size per event before truncation.
"maintenanceIntervalMs": 86400000, // Maintenance cadence (prune + rollup + vacuum checks). "maintenanceIntervalMs": 86400000, // Maintenance cadence (prune + rollup + vacuum checks).
"retentionMode": "preset", // Retention mode (`preset` uses preset values, `advanced` uses explicit values). Values: preset | advanced
"retentionPreset": "balanced", // Retention preset when `retentionMode` is `preset`. Values: minimal | balanced | deep-history
"retention": { "retention": {
"eventsDays": 7, // Raw event retention window in days. "eventsDays": 0, // Raw event retention window in days. Use 0 to keep all.
"telemetryDays": 30, // Telemetry retention window in days. "telemetryDays": 0, // Telemetry retention window in days. Use 0 to keep all.
"dailyRollupsDays": 365, // Daily rollup retention window in days. "sessionsDays": 0, // Session retention window in days. Use 0 to keep all.
"monthlyRollupsDays": 1825, // Monthly rollup retention window in days. "dailyRollupsDays": 0, // Daily rollup retention window in days. Use 0 to keep all.
"vacuumIntervalDays": 7 // Minimum days between VACUUM runs. "monthlyRollupsDays": 0, // Monthly rollup retention window in days. Use 0 to keep all.
} // Retention setting. "vacuumIntervalDays": 0 // Minimum days between VACUUM runs. Use 0 to disable.
}, // Retention setting.
"lifetimeSummaries": {
"global": true, // Maintain global lifetime stats rows. Values: true | false
"anime": true, // Maintain per-anime lifetime stats rows. Values: true | false
"media": true // Maintain per-media lifetime stats rows. Values: true | false
} // Lifetime summaries setting.
}, // Enable/disable immersion tracking. }, // Enable/disable immersion tracking.
// ========================================== // ==========================================
@@ -514,6 +523,7 @@
// ========================================== // ==========================================
"stats": { "stats": {
"toggleKey": "Backquote", // Key code to toggle the stats overlay. "toggleKey": "Backquote", // Key code to toggle the stats overlay.
"markWatchedKey": "KeyW", // Key code to mark the current video as watched and advance to the next playlist entry.
"serverPort": 6969, // Port for the stats HTTP server. "serverPort": 6969, // Port for the stats HTTP server.
"autoStartServer": true, // Automatically start the stats server on launch. Values: true | false "autoStartServer": true, // Automatically start the stats server on launch. Values: true | false
"autoOpenBrowser": true // Automatically open the stats dashboard in a browser when the server starts. Values: true | false "autoOpenBrowser": true // Automatically open the stats dashboard in a browser when the server starts. Values: true | false

View File

@@ -114,6 +114,7 @@ SubMiner maps its data to your Anki note fields. Configure these under `ankiConn
```jsonc ```jsonc
"ankiConnect": { "ankiConnect": {
"fields": { "fields": {
"word": "Expression", // mined word / expression text
"audio": "ExpressionAudio", // audio clip from the video "audio": "ExpressionAudio", // audio clip from the video
"image": "Picture", // screenshot or animated clip "image": "Picture", // screenshot or animated clip
"sentence": "Sentence", // subtitle text "sentence": "Sentence", // subtitle text

View File

@@ -733,6 +733,7 @@ Enable automatic Anki card creation and updates with media generation:
"tags": ["SubMiner"], "tags": ["SubMiner"],
"deck": "Learning::Japanese", "deck": "Learning::Japanese",
"fields": { "fields": {
"word": "Expression",
"audio": "ExpressionAudio", "audio": "ExpressionAudio",
"image": "Picture", "image": "Picture",
"sentence": "Sentence", "sentence": "Sentence",
@@ -797,6 +798,7 @@ This example is intentionally compact. The option table below documents availabl
| `tags` | array of strings | Tags automatically added to cards mined/updated by SubMiner (default: `['SubMiner']`; set `[]` to disable automatic tagging). | | `tags` | array of strings | Tags automatically added to cards mined/updated by SubMiner (default: `['SubMiner']`; set `[]` to disable automatic tagging). |
| `deck` | string | Anki deck to monitor for new cards | | `deck` | string | Anki deck to monitor for new cards |
| `ankiConnect.knownWords.decks` | array of strings | Decks used for known-word cache lookups. When omitted/empty, falls back to `ankiConnect.deck`. | | `ankiConnect.knownWords.decks` | array of strings | Decks used for known-word cache lookups. When omitted/empty, falls back to `ankiConnect.deck`. |
| `fields.word` | string | Card field for mined word / expression text (default: `Expression`) |
| `fields.audio` | string | Card field for audio files (default: `ExpressionAudio`) | | `fields.audio` | string | Card field for audio files (default: `ExpressionAudio`) |
| `fields.image` | string | Card field for images (default: `Picture`) | | `fields.image` | string | Card field for images (default: `Picture`) |
| `fields.sentence` | string | Card field for sentences (default: `Sentence`) | | `fields.sentence` | string | Card field for sentences (default: `Sentence`) |

View File

@@ -30,13 +30,37 @@ The same immersion data powers the stats dashboard.
- Maintenance command: run `subminer stats cleanup` or `subminer stats cleanup -v` to backfill/repair vocabulary metadata (`headword`, `reading`, POS) and purge stale or excluded rows from `imm_words` on demand. - Maintenance command: run `subminer stats cleanup` or `subminer stats cleanup -v` to backfill/repair vocabulary metadata (`headword`, `reading`, POS) and purge stale or excluded rows from `imm_words` on demand.
- Browser page: open `http://127.0.0.1:5175` directly if the local stats server is already running. - Browser page: open `http://127.0.0.1:5175` directly if the local stats server is already running.
Dashboard tabs: ### Dashboard Tabs
- Overview: recent sessions, streak calendar, watch-time history, and a tracking snapshot with completed episodes/anime totals #### Overview
- Library: 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 Recent sessions, streak calendar, watch-time history, and a tracking snapshot with completed episodes/anime totals.
- Sessions: expandable session history with new-word activity, cumulative totals, and pause/seek/card markers
- 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 Overview](/screenshots/stats-overview.png)
#### Library
Cover-art library with search and sorting, per-series progress, episode drill-down, and direct links into mined cards.
![Stats Library](/screenshots/stats-library.png)
#### Trends
Watch time, sessions, words seen, and per-anime progress/pattern charts with configurable date ranges and grouping.
![Stats Trends](/screenshots/stats-trends.png)
#### Sessions
Expandable session history with new-word activity, cumulative totals, and pause/seek/card markers.
![Stats Sessions](/screenshots/stats-sessions.png)
#### 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 Vocabulary](/screenshots/stats-vocabulary.png)
Stats server config lives under `stats`: Stats server config lives under `stats`:
@@ -244,7 +268,7 @@ LIMIT ?;
- Large-table reads are index-backed for `sample_ms`, session time windows, frequency-ranked words/kanji, and cover-art identity lookups. - Large-table reads are index-backed for `sample_ms`, session time windows, frequency-ranked words/kanji, and cover-art identity lookups.
- Workload-dependent tuning knobs remain at defaults unless you change them: `cache_size`, `mmap_size`, `temp_store`, `auto_vacuum`. - Workload-dependent tuning knobs remain at defaults unless you change them: `cache_size`, `mmap_size`, `temp_store`, `auto_vacuum`.
### Schema (v12) ### Schema (v4)
Core tables: Core tables:

View File

@@ -319,6 +319,7 @@
"SubMiner" "SubMiner"
], // Tags to add to cards mined or updated by SubMiner. Provide an empty array to disable automatic tagging. ], // Tags to add to cards mined or updated by SubMiner. Provide an empty array to disable automatic tagging.
"fields": { "fields": {
"word": "Expression", // Word setting.
"audio": "ExpressionAudio", // Audio setting. "audio": "ExpressionAudio", // Audio setting.
"image": "Picture", // Image setting. "image": "Picture", // Image setting.
"sentence": "Sentence", // Sentence setting. "sentence": "Sentence", // Sentence setting.
@@ -347,7 +348,7 @@
"highlightEnabled": false, // Enable fast local highlighting for words already known in Anki. Values: true | false "highlightEnabled": false, // Enable fast local highlighting for words already known in Anki. Values: true | false
"refreshMinutes": 1440, // Minutes between known-word cache refreshes. "refreshMinutes": 1440, // Minutes between known-word cache refreshes.
"matchMode": "headword", // Known-word matching strategy for subtitle annotations. Values: headword | surface "matchMode": "headword", // Known-word matching strategy for subtitle annotations. Values: headword | surface
"decks": [], // Decks used for known-word cache scope. Supports one or more deck names. "decks": {}, // Decks and fields for known-word cache. Object mapping deck names to arrays of field names to extract, e.g. { "Kaishi 1.5k": ["Word", "Word Reading"] }.
"color": "#a6da95" // Color used for known-word highlights. "color": "#a6da95" // Color used for known-word highlights.
}, // Known words setting. }, // Known words setting.
"behavior": { "behavior": {
@@ -498,8 +499,8 @@
"queueCap": 1000, // In-memory write queue cap before overflow policy applies. "queueCap": 1000, // In-memory write queue cap before overflow policy applies.
"payloadCapBytes": 256, // Max JSON payload size per event before truncation. "payloadCapBytes": 256, // Max JSON payload size per event before truncation.
"maintenanceIntervalMs": 86400000, // Maintenance cadence (prune + rollup + vacuum checks). "maintenanceIntervalMs": 86400000, // Maintenance cadence (prune + rollup + vacuum checks).
"retentionMode": "preset", // Retention mode to use for defaults. Values: preset | advanced "retentionMode": "preset", // Retention mode (`preset` uses preset values, `advanced` uses explicit values). Values: preset | advanced
"retentionPreset": "balanced", // Named preset when retentionMode is preset. "retentionPreset": "balanced", // Retention preset when `retentionMode` is `preset`. Values: minimal | balanced | deep-history
"retention": { "retention": {
"eventsDays": 0, // Raw event retention window in days. Use 0 to keep all. "eventsDays": 0, // Raw event retention window in days. Use 0 to keep all.
"telemetryDays": 0, // Telemetry retention window in days. Use 0 to keep all. "telemetryDays": 0, // Telemetry retention window in days. Use 0 to keep all.
@@ -509,10 +510,10 @@
"vacuumIntervalDays": 0 // Minimum days between VACUUM runs. Use 0 to disable. "vacuumIntervalDays": 0 // Minimum days between VACUUM runs. Use 0 to disable.
}, // Retention setting. }, // Retention setting.
"lifetimeSummaries": { "lifetimeSummaries": {
"global": true, // Keep lifetime global totals. "global": true, // Maintain global lifetime stats rows. Values: true | false
"anime": true, // Keep lifetime per-anime totals. "anime": true, // Maintain per-anime lifetime stats rows. Values: true | false
"media": true // Keep lifetime per-media totals. "media": true // Maintain per-media lifetime stats rows. Values: true | false
} // Lifetime summary setting. } // Lifetime summaries setting.
}, // Enable/disable immersion tracking. }, // Enable/disable immersion tracking.
// ========================================== // ==========================================
@@ -522,6 +523,7 @@
// ========================================== // ==========================================
"stats": { "stats": {
"toggleKey": "Backquote", // Key code to toggle the stats overlay. "toggleKey": "Backquote", // Key code to toggle the stats overlay.
"markWatchedKey": "KeyW", // Key code to mark the current video as watched and advance to the next playlist entry.
"serverPort": 6969, // Port for the stats HTTP server. "serverPort": 6969, // Port for the stats HTTP server.
"autoStartServer": true, // Automatically start the stats server on launch. Values: true | false "autoStartServer": true, // Automatically start the stats server on launch. Values: true | false
"autoOpenBrowser": true // Automatically open the stats dashboard in a browser when the server starts. Values: true | false "autoOpenBrowser": true // Automatically open the stats dashboard in a browser when the server starts. Values: true | false

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB