Created
July 25, 2025 23:47
-
-
Save bojidar-bg/16d07eebbbc9c9ea905cef5804222042 to your computer and use it in GitHub Desktop.
Mass rename script for Subtitle Compose
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
/* | |
@name mass-rename Title | |
@version 1.0 | |
@summary Edit before using! Mass-renames voices in Subtitle Compose. | |
@author Bojidar Marinov | |
*/ | |
const s = subtitle.instance(); | |
for(let i = s.linesCount() - 1; i >= 0; i--) { | |
let line = s.line(i); | |
line.setRichPrimaryText(line.richPrimaryText() | |
// ----- Edit from here: | |
.split("<v old voice>").join("<v new voice>") | |
.split("<v old voice 2>").join("<v new voice 2>") | |
// ----- to here | |
// Repeat the .split(...).join(...) line for all voices as needed | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment