Repository navigation
TypewriterEffect: support Subtitle Edit Batch convert - #328
Merged
Merged
Conversation
- plugin.json "batch": true - batch request: apply the effect to every line with the saved end delay, answered before Avalonia starts (no UI) - configure request: end delay only, settings returned without subtitle - run unchanged; response building moved to TypewriterResponses - new TypewriterEffect.Tests project, run by typewriter.yml Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Subtitle Edit Batch convert support (contract from SubtitleEdit/subtitleedit#16036) to Typewriter effect.
What it does
plugin.jsongets"batch": true.Program.Mainbefore Avalonia starts, so there is no UI. Every line is split using the savedendDelay(0.5 s when nothing is saved), the same engine and rules as the window, so lines of 500 ms or less are kept as they are. If no line changes, the response isokwith no subtitle. Settings are not returned (null). Errors come back aserror+ message.okwith{ "endDelay": ... }and no subtitle. Cancel returnscancelled.Decisions
MainWindowintoTypewriterResponsesso batch, configure and run can be unit tested. The run output is unchanged.settingsVersion), as they were before, so run and configure save the same shape.Tests
se5/TypewriterEffect.Testsproject (modelled on FixEncodingErrors.Tests) withBatchModeTests(5 tests: batch with the default and with a saved end delay, batch with nothing to change, run still honours the selection, configure).typewriter.ymlnow runs it in atestjob thatbuilddepends on, and its path filters include the tests folder.batchrequest.json through the built dll exits 0 and writes a sensible response.Compatibility
Subtitle Edit 5.3 ignores
"batch"and only sendsrun, which works exactly as before.🤖 Generated with Claude Code