A shell script that displays the dialogue contents of a subtitle file in the .srt format on the terminal screen with a specified delay between each line.
bc
(available from apt)
./srt2screen.sh [-k] [-t delay] [-v] file.srt
The script takes the following options:
-k
: Pause after each line of text and wait for user input.
-t delay
: Set the delay (in milliseconds) between each line of text (default: 1000).
-v
: Verbose mode. Print additional information about the input file and runtime.
-h
: Print the help message.
Clone the repository:
git clone https://github.com/yourusername/srt2screen.git
Navigate to the srt2screen directory:
cd srt2screen
Make the shell script executable:
chmod +x srt2screen.sh
To display the contents of a subtitle file called example.srt
with a delay of 500 milliseconds and pause after each line, run the following command:
./srt2screen.sh -k -t 500 example.srt