From ad1c1aea1bbf57fe224e4b92209d1ac9b8f10742 Mon Sep 17 00:00:00 2001 From: sudacode Date: Sat, 29 Aug 2026 13:38:44 -0700 Subject: [PATCH] feat(anki): add multi-line subtitle selection to media timing review --- changes/media-timing-review.md | 1 + docs-site/anki-integration.md | 2 + src/anki-integration/card-creation.ts | 5 +- .../note-update-workflow.test.ts | 37 ++++ src/anki-integration/note-update-workflow.ts | 6 +- src/main.ts | 12 +- src/main/runtime/media-timing-review.test.ts | 45 +++++ src/main/runtime/media-timing-review.ts | 84 +++++++- src/renderer/index.html | 52 +++++ .../modals/media-timing-review.test.ts | 30 +++ src/renderer/modals/media-timing-review.ts | 183 +++++++++++++++++- src/renderer/style.css | 94 ++++++++- src/renderer/utils/dom.ts | 18 ++ src/types/anki.ts | 13 +- 14 files changed, 562 insertions(+), 20 deletions(-) diff --git a/changes/media-timing-review.md b/changes/media-timing-review.md index 0092abcc..15dbc955 100644 --- a/changes/media-timing-review.md +++ b/changes/media-timing-review.md @@ -2,3 +2,4 @@ type: added area: mining - Added optional pre-generation timing review for word, sentence, and audio cards with a compact speech-weighted waveform, clearly labeled mined-line boundaries, drag and keyboard adjustments, audio preview with a sweeping playhead, exact screenshot and AVIF timing, cancellation choices that include keeping a card without media, and a session-only runtime toggle. +- The timing review can pull any number of previous and next subtitle lines onto the card: `P`/`N` (or the Prev/Next steppers) add lines one at a time, Shift removes them, the sentence preview highlights exactly what the card will contain, and the clip range follows the added lines automatically. diff --git a/docs-site/anki-integration.md b/docs-site/anki-integration.md index e10eecac..a4acbbd8 100644 --- a/docs-site/anki-integration.md +++ b/docs-site/anki-integration.md @@ -183,6 +183,8 @@ The audio is uploaded to Anki's media folder and inserted as `[sound:audio_