This repository includes a simple Java program to convert srt files into text files to easily copy their content and paste it into some other document.
This repository includes the next files and folders:
- SRT_to_TXT_converter.java: Main program that iterates thorugh srt file and extracts the relevant lines of the file to write them in the txt file(s). If the srt_files folder includes more than one file to convert the program will ask the user if he or she wants to convert the srt file into a single txt file or convert them into separated files.
- /srt_files (folder): It includes example srt files to test the program.
- /Script/SRT_TXT_converter.sh: Unix shell script to run the jar file exported from main program.
- /Script/SRT_TXT_converter.bat: Windows batch file to run the jar file exported from main program.
- /Script/SRT_TXT_converter.jar: Jar file exported from SRT_TXT_converter.java to easily test the program using SRT_TXT_converter.sh (Linux users) or SRT_TXT_converter.bat (windows users).
The program will create (if its not created yet) a folder named txt_files where it will save the resulting files.
After cloning or downloading this repository you can easily execute the program using the Scripts in the /Script folder. For Linux Operating systems or Linux distributions subsystems such as MobaXterm or Git, users can use /Script/SRT_TXT_converter.sh which will execute the jar file and run the program. For Windows Operating systems users can use /Script/SRT_TXT_converter.bat. After copying in srt_files folder the srt files you wish to convert you can just double click any of these scripts and use the program.
After executing the script converting srt files in a Single file:
Note: The resulting file is named after the first srt file in srt_files folder.
After executing the script converting srt files into Separated files: