To merge two subtitles together.
Steps:
-
parse two separate srt files using 'srtparser' e.g. Usage: srt1 = srtparser(r"001 Find out all about this course in less than 2 minutes.de.srt") srt2 = srtparser(r"001 Find out all about this course in less than 2 minutes.en.srt")
-
remove the line numbers from the parsed srt texts using 'removelineno' e.g. Usage: srt1 = removelineno(srt1) srt2 = removelineno(srt2)
-
You may customise the srt to differentiate the, using 'customisesrt' e.g. Usage: srt2 = customisesrt(srt2, color="#ffff54", loc='top-center') color and loc are named arguments, color accept Color Hex codes, loc accepts 'center', 'top-center', 'top-left', 'center-left'
-
You can now merge this two srts using 'mergesrt' e.g. Usage: mergedsrt = mergesrt(srt1, srt2, method='normal') method, named argument has two procesdures, a) time-wise juxtaposing the same subtitles together, b) time-wise copying to the nearest cue for srt file 1 (under development)
-
Add the line numbers back again, before writting them back into file. e.g. Usage: mergedsrt = addlineno(mergedsrt)
-
Write the subtitle back into a file. e.g. Usage: srtwriter(mergedsrt, r"output.srt")
Any developmental inputs are welcomed.
In development:
- Nearest Cue, method of merging
- GUI
- Executor(Executor GUI) to batch merge, multiple files.