12:23
:03
2016
Remove hearing impaired sentences from subtitles
- Resume:
Script to easily remove the dedicated hearing impaired sentences from subtitles. You can do it by dropping the subtitles files on the command.
- Version:
1.2.0
- Size:
3kb
- License:
MIT License
- Copyrights:
Renan Lavarec
I just want to watch my series with english subtitles but without the dedicated hearing impaired sentences.

Sometimes it can cost time to look for subtitles without hearing impaired sentences.

I decided to build a small Node.js script to enable to drop all the subtitles with hearing impaired sentences on this cmd and get ready to watch my best serial TV without doing anymore action.
- Dependencies:
- underscore
- How to use it:
Basic users: (Node.js is not install on your system)

- 1) Unzip the package with Node.js

- 2) Inside nodejs_utils go inside remove_hearing_impaired_sentences_from_subtitles

- 3) To remove hearing impaired sentences from your subtitles, just select all the "srt" subtitles on an explorer and drop them on this file "tr.launch.windows.cmd"

It will magicaly update all your srt files and save the original to "filename.backup".

If you do not like this ".backup" extension, rename it at the beginning of the "tr.script.js" file.

Enjoy !




Advanced user: (Node.js is install on your system :) )

To easily launch the nodejs script, I made a dos batch file (sample under), in the same directory than the script (downloadable on top)

- 1) Unzip the package without Node.js

- 2) Customize the path to NODEJS inside the "tr.launch.windows.cmd"

- 3) To remove hearing impaired sentences from your subtitles, just select all the "srt" subtitles on an explorer and drop them on this cmd

It will magicaly update all your srt files and save the original to "filename.backup".

If you do not like this ".backup" extension, rename it at the beginning of the "tr.script.js" file.

Enjoy !

1
2
3
4
5
6
7
8
9
10
@ECHO OFF
REM --------> Script by Ti-R
cd /d %~dp0
REM ----> Need to set the path for nodejs to find node_modules
SET NODEJS=%CD%\..\..\nodeJS
SET NODE_PATH=%NODEJS%\node_modules\
CALL "%NODEJS%\node.exe" --harmony ".\tr.script.js" %*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

- Change log:
- Version 1.2.0
* Now add removing between 2 other kind of hearing presentation, between brackets and before a colon.

eg: "(Thunder in the night)"
eg: "Thunder in the night:"

- Version 1.1.0
* Fix bug: remove multilines sentences hearing impaired.
* Fix bug: remove impaired sentences with no direct space after the sentence.

eg: "[Thunder in
the night]
"
eg: "[Thunder in the night]sentence"

- Version 1.0.0
* Software release

Remove impaired sentences
eg: "-[Thunder in the night]"