Repository navigation
SplitDialogs: support Subtitle Edit Batch convert - #332
Merged
Merged
Conversation
- plugin.json "batch": true - batch request: split every dialog line with the saved options (all rows checked, the window's default), no UI; no dialogs = ok without subtitle - configure request: options-only window, settings returned without subtitle - settings load/save moved to SplitSettings so window and batch share them - new SplitDialogs.Tests project, run by split-dialogs.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 Batch convert support (SubtitleEdit/subtitleedit#16036) to Split dialogs.
What it does
batch(once per file, no UI): splits every dialog line in the file using the saved options (Only split where the line before the dash ends a sentence, Gap between lines (ms)). ASSA/SSA stay in their native format, like a normal run. A file with no dialog lines returnsokwithout a subtitle. Settings are not returned.configure(Batch convert's Configure...): the window opens with only the two options, a short "Batch convert settings" panel, and an OK button (always enabled). The preview list, column header and Select all/none are hidden. OK returns the settings +settingsVersionwith no subtitle; Cancel returnscancelled.plugin.jsonhas"batch": true. SE 5.3 ignores it and only sendsrun.runworks exactly as before.Decisions
MainWindowto a smallSplitSettingsrecord (same JSON keys and version 1, so saved settings carry over). The batch/configure responses live in a newBatchModeclass.Tests
se5/SplitDialogs.Testsproject (modelled on FixEncodingErrors.Tests) withBatchModeTests, 6 tests: default split, saved settings (rule off + gap), no dialogs = ok without subtitle, ASSA style/actor kept, configure response, settings round-trip/defaults. All pass.split-dialogs.ymlnow has atestjob (build waits for it) and the Tests path in its filters, like fix-encoding-errors.yml.batchrequest.json: exit 0, the dialog split as in the README example (01,000-01,738 / 01,762-04,000).🤖 Generated with Claude Code