A simple GUI application that converts Excel/CSV files containing subtitle data into SRT format.
- Supports both Excel (.xls, .xlsx) and CSV files
- Simple graphical user interface
- Handles Japanese subtitle data
- Automatic time and duration calculations
- Python 3.6 or higher
- PyQt5
- Required Python packages (listed in requirements.txt)
- Clone or download this repository
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate- Install the required packages:
pip install -r requirements.txt- Run the script:
python srt.py- In the application window:
- Click "Browse" to select your Excel/CSV file
- Click "Convert" to start the conversion
- The converted SRT file will be saved in the same directory as the input file
The Excel/CSV file must contain the following columns:
- ページナンバー (Page Number)
- 送出タイミング (Timing)
- Duration
- 字幕文字列 (Subtitle Text)
The application will display error messages if:
- Required columns are missing
- Input file format is invalid
- Time format is incorrect
You can create a standalone executable for this application using PyInstaller:
-
Install PyInstaller:
pip install pyinstaller
-
Run PyInstaller to generate the executable. You have two options:
-
Single file (
--onefile):pyinstaller --onefile --windowed srt.py
- The
--onefileflag creates a single executable file. - The
--windowedflag prevents a terminal window from opening (for GUI apps). - Pros: Easy to distribute, just one file.
- Cons: Startup/loading time can be slower, as everything is unpacked to a temporary folder at runtime.
- The
-
Directory (
--onedir, default):pyinstaller --onedir --windowed srt.py
- The
--onedirflag (default) creates a folder containing the executable and all dependencies. - Pros: Faster startup/loading time.
- Cons: Distribution requires sending the whole folder, not just a single file.
- The
-
-
The executable or folder will be located in the
distdirectory. -
Distribute the executable file (
dist/srt.exeon Windows,dist/srton macOS/Linux) or the entire folder (for--onedir) to users. They do not need Python installed to run it.