Checks all .srt
files in a given folder for:
- Any common errors by running its content through this tool
- Uppercase letters in the middle of words or other lowercase letters
- Lines that begin with spaces
- Word typos using CSpell
This will only run the validations for the most recent versions of the captions. For example, if there's a caption file called gen_123_v1.srt
and another called gen_123_v2.srt
, it will only run the validations for gen_123_v2.srt
.
validate /YOUR/PATH/HERE
You can drag&drop a folder into the terminal window to get its path.
Clone this repository and then:
- Open a terminal window.
- Ensure you have Node installed by running
node --version
. If you don't have it installed, get it from their website OR from Brew - Go to a terminal and
cd
into this folder - Run
npm i
- (Optional) Open
package.json
and change the hardcoded path for the scriptspellcheck
. This script is used to run only the spellcheck using CSpell. - Run the script using
validate /YOUR/PATH/HERE
. You'll see output in case there are any bad caption files. This runs all the validations. - To just spellcheck all files, run
npm run spellcheck
.- You can also run this from any other folder with
cspell --no-progress --show-suggestions --locale "pt-PT, en-US, fr-FR, es-ES" "/YOUR/PATH/HERE/*.srt"
- You can also run this from any other folder with