This script converts subtitle files in SRT (SubRip Text) format to CSV (Comma-Separated Values) format.
No installation is required. Just ensure you have Python installed on your system.
-
Clone the Repository
git clone https://github.com/christopher-chandler/srt_csv.git
-
Navigate to the Directory
cd srt-to-csv-converter
-
Run the Script
Execute the script using Python with the following command:
python convert.py --file <filename_without_extension>
Replace
<filename_without_extension>
with the name of the SRT file you want to convert. -
Output
The converted CSV file will be generated in the
data/outgoing
directory.
To convert a file named example.srt
, run:
python convert.py --file example
--file
: Specifies the name of the SRT file to be converted.
-
Standard Library
argparse
: For parsing command-line arguments.
-
Custom
srt_processor.convertor
: Module containing the conversion function.
This project is licensed under the MIT License. See the LICENSE file for details.
This is based on the code https://stackoverflow.com/questions/53585676/creating-a-csv-file-from-an-srt-file-friends-subtitles-in-python