17:25
:41
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.

Remove hearing impaired sentences from subtitles

Remove hearing impaired sentences from subtitles by analysing content.

Remove those case:
  • Text beetween parenthesis

    • (bla bla)

  • Text before colon

    • bla bla:

  • Text with prefix and/or between square brackets, with or without spaces

    • -[bla bla]

How to use it

Basic users: (Node.js is not install on your system)

  1. Unzip the package with Node.js

  2. Inside nodejsutils go inside removehearingimpairedsentencesfromsubtitles

  3. To remove hearing impaired sentences from your subtitles files, just select all the "srt" subtitles files on an explorer and drop them on this file "tr.toconvertsubtitlesdroponme.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 files, just select all the "srt" subtitles files on an explorer and drop them on this cmd "tr.removehearingimpairedsentencesfromsubtitles.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.

    @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" %*

Enjoy !

Change log

  • Version 1.2.0

    • Now add removing between 2 other kind of hearing presentation, between parenthesis 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 between square brackets.

        eg: "[Thunder in _
        
        _the night]"
        
      

    • Fix bug: remove impaired sentences with no direct space after the sentence.

        eg: "[Thunder in the night]sentence"
      

  • Version 1.0.0

    • Mainly Remove impaired sentences of type

        eg: "-[Thunder in the night]"