clipwright-wrap
MCP tool to format subtitle file text (SRT/VTT) at phrase boundaries using BudouX with line wrapping.
Overview
clipwright-wrap takes SRT/VTT subtitle files as input, splits each cue text into phrase units by BudouX, inserts line breaks to fit within specified character count and line count, and outputs the subtitle file in the same format. A pure text formatting tool with no FFmpeg / Whisper dependencies.
Input/Output
- Input: SRT file (
.srt) or VTT file (.vtt) - Output: Subtitle file in same format as input (with phrase boundary line breaks inserted)
- Timecodes: Unchanged (no retiming)
MCP Tool
clipwright_wrap_captions
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input |
string |
required | Input subtitle file path (.srt / .vtt) |
output |
string |
required | Output subtitle file path (same extension as input) |
language |
string |
"ja" |
Phrase splitting language (ja / zh-hans / zh-hant / th) |
max_chars |
int |
16 |
Max characters per line (full-width and half-width both count as 1 character). Positive integer. |
max_lines |
int |
2 |
Max lines per cue. Over-limit cues recorded in warnings (not truncated). Positive integer. |
Character Count Specification
max_chars is counted uniformly as 1 character each (both full-width and half-width as one len() character). Full-width normalization is a future extension (requirement §8).
Phrase Wrapping Mechanism
- Each cue text (if multiple lines, remove line breaks and concatenate) is split into phrases by BudouX
- Phrase token sequence is greedily packed into one line within
max_chars - Formatted text (multiple lines separated by
\n) is written back to cue
If a single phrase exceeds max_chars alone, place that phrase on one line (no splitting mid-phrase).
Supported Languages
Supports the following languages for which BudouX provides phrase splitting:
language Value |
Language |
|---|---|
ja |
Japanese |
zh-hans |
Chinese (Simplified) |
zh-hant |
Chinese (Traditional) |
th |
Thai |
Dependencies
| Package | Purpose |
|---|---|
budoux |
Phrase boundary splitting (standard dependency, lightweight model bundled) |
clipwright |
Shared types, envelope, errors |
mcp[cli] |
MCP server |
pydantic |
Parameter validation |
No FFmpeg / Whisper dependencies (pure text formatting). budoux is a standard dependency bundled with the package, so e2e tests can run continuously without environment variable gating.
Installation and Startup
uv add clipwright-wrap
clipwright-wrap
Or within a uv workspace:
uv run --package clipwright-wrap clipwright-wrap
Prerequisites
- Python 3.11 or later
- FFmpeg not required (text formatting only)
Metadata
Release files for clipwright-wrap 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clipwright_wrap-0.3.2.tar.gz | 14.9 kB | With provenance | Details for clipwright_wrap-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clipwright_wrap-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for clipwright_wrap-0.3.2-py3-none-any.whl |
Total release size: 33.4 kB
Release files / clipwright_wrap-0.3.2.tar.gz
| Download URL | clipwright_wrap-0.3.2.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c245fe151143fb0f0610b558ae3e55836035ea1850d9b84461e5a2b47be41a9
|
|
BLAKE2b-256 checksum How to use checksums |
e79a759574846d39241f8bb5f5f4a73922a9816fe80863efb58e4fec9a86a52f
|
| 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 Jul 8, 2026.
Transparency logRelease files / clipwright_wrap-0.3.2-py3-none-any.whl
| Download URL | clipwright_wrap-0.3.2-py3-none-any.whl |
|---|---|
| Size | 18.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04433ea2dfd28bc978729cf83dda5b27b73b865a38e9a249b94e8fef7f9805d5
|
|
BLAKE2b-256 checksum How to use checksums |
187a1fec709d6f15bd613b7a6bf8199da1106fea58a93a0d31d8e3c2102e62f4
|
| 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 Jul 8, 2026.
Transparency logSecurity for clipwright-wrap 0.3.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for clipwright_wrap-0.3.2.tar.gz
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 Jul 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.