SRT Translator
A robust and feature-rich Python command-line tool for translating SubRip (SRT) subtitle files. Supports Google Translate, DeepL, and MyMemory with intelligent mixed-language handling, HTML tag preservation, and resilient error recovery.
✨ Features
- Modular Architecture: Easy to extend with new translation services.
- Multiple Services: Google Translate (default), DeepL, and MyMemory.
- Resilient Recovery: Automatic retries with exponential backoff and resume capability for interrupted translations.
- Parallel Processing: Use
--workersto speed up translation of large files. - Mixed-Language Handling: Sentence-level language detection for mixed subtitles.
- HTML Tag Preservation: Keeps
<i>,<b>, etc., styling intact. - Batch Processing: Translate multiple files or entire directories at once.
- Configuration: Support for
.envfiles for secure API key management.
🚀 Quick Start
Installation
-
From PyPI (Recommended):
pip install srt-translator-cli
-
From Source:
git clone https://github.com/fam007e/srt_trans.git cd srt_trans pip install .
Developer Setup
For developers wanting to run tests and build the package, we provide a Makefile:
# 1. Create venv
python -m venv .venv
# 2. Setup all dev/test dependencies
make setup
# 3. Run all checks (lint, type-check, tests)
make check
# 4. Build binary
make build
# 5. (Optional) Install in editable mode
pip install -e .
Basic Usage
srt-translator-cli movie.srt -t es
📚 Documentation
For more detailed information, please see our dedicated documentation:
- Usage Guide - Deep dive into CLI options and examples.
- API Reference - How to use SRT Translator as a library.
- Contributing - How to help improve this project.
🛠 Supported Languages
SRT Translator supports over 70 languages. Run the following command to see the full list:
srt-translator-cli --list-languages
⚖ License
This project is licensed under the MIT License. See the LICENSE file for details.
🙏 Acknowledgements
Metadata
Release files for srt-translator-cli 2026.5.31
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| srt_translator_cli-2026.5.31.tar.gz | 17.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| srt_translator_cli-2026.5.31-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.0 kB
Release files / srt_translator_cli-2026.5.31.tar.gz
| Download URL | srt_translator_cli-2026.5.31.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed765816f27211275e1379fc9530c41ef851d7ce10cdbc6f9a9d28bcc41039f7
|
|
BLAKE2b-256 checksum How to use checksums |
7adc5e31ed6d9e83922dda2e8c7c75f60e28a0d893fecb62f77fd0085dbcad3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 30, 2026.
Transparency logRelease files / srt_translator_cli-2026.5.31-py3-none-any.whl
| Download URL | srt_translator_cli-2026.5.31-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8285d102ad6844246efae87ea4e91dda96fc920a2e60c4b13d8641272a754526
|
|
BLAKE2b-256 checksum How to use checksums |
7dc16e852c940451591b0e7ee05c81e624a14c5214cdbe548d2e81d5e80be0ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 30, 2026.
Transparency log