A simple web application that converts SRT (SubRip Subtitle) files to plain text transcripts by extracting only the subtitle text content and removing timing information and subtitle numbers.
This tool takes SRT subtitle files and converts them to plain text by:
- Removing subtitle numbers (e.g., "1", "2", "3")
- Removing timing information (e.g., "00:00:01,000 --> 00:00:04,000")
- Extracting only the actual subtitle text content
- Combining all text into a single, readable transcript
- Web-based interface for easy file upload
- Real-time conversion
- Error handling for malformed SRT files
- Simple and clean output format
- Open the web application in your browser
- Click "Choose File" to select an SRT file
- Click "Start upload" to convert the file
- View the extracted text in the results area
1
00:00:01,000 --> 00:00:04,000
Hello, welcome to this video.
2
00:00:04,500 --> 00:00:07,500
Today we'll be discussing important topics.
Hello, welcome to this video.
Today we'll be discussing important topics.
- Python 2.7 (as specified in app.yaml)
- Bottle - Lightweight web framework
- Pystache - Template engine for HTML rendering
- Pysrt - SRT file parsing library
srt2txt/
├── main.py # Main application logic
├── app.yaml # Google App Engine configuration
├── requirements.txt # Python dependencies
├── CNAME # Custom domain configuration
├── templates/ # HTML templates
│ ├── index.html # Upload form
│ ├── upload.html # Results display
│ └── 404.html # Error page
└── README.md # This file
parse(input)- Parses SRT file and extracts text contentnumerical_ok(line)- Validates subtitle number formattiming_ok(line)- Validates timing information formatrender(filename, data)- Renders HTML templates
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Access the application at
http://localhost:8080
The application includes error handling for:
- Malformed SRT files
- Invalid subtitle number formats
- Invalid timing information formats
- File upload issues
This project is part of the Tools repository. See the main LICENSE file for details.