Deployed 8c43250 with MkDocs version: 1.6.1

This commit is contained in:
2026-08-24 22:22:50 +00:00
parent a107e130de
commit 759ce1d4e8
8 changed files with 257 additions and 8 deletions
+57
View File
@@ -2193,6 +2193,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Subtitle.strip_webvtt_cue_classes" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;strip_webvtt_cue_classes
</span>
</a>
</li>
<li class="md-nav__item">
@@ -3292,6 +3303,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#unshackle.core.tracks.Subtitle.strip_webvtt_cue_classes" class="md-nav__link">
<span class="md-ellipsis">
<code class="doc-symbol doc-symbol-toc doc-symbol-method"></code>&nbsp;strip_webvtt_cue_classes
</span>
</a>
</li>
<li class="md-nav__item">
@@ -5364,6 +5386,41 @@ explanation list above.</p>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Subtitle.strip_webvtt_cue_classes" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">strip_webvtt_cue_classes</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
<a href="#unshackle.core.tracks.Subtitle.strip_webvtt_cue_classes" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">strip_webvtt_cue_classes</span><span class="p">(</span><span class="n">text</span><span class="p">)</span>
</span></code></pre></div>
<div class="doc doc-contents ">
<p>Reduce a cue payload to the markup every target format shares: <code>&lt;i&gt;</code>, <code>&lt;b&gt;</code>
and <code>&lt;u&gt;</code> without their class list. It removes class spans (<code>&lt;c.foo&gt;</code>),
<code>&lt;v&gt;</code>, <code>&lt;lang&gt;</code>, <code>&lt;ruby&gt;</code>/<code>&lt;rt&gt;</code> and karaoke timestamps
(<code>&lt;00:00:01.000&gt;</code>).</p>
<p>A class only selects a CSS <code>::cue</code> rule that no player receives, so it never
carries styling, but it does break rendering. FFmpeg's SubRip reader treats a tag
name as a tag only while it matches <code>[0-9a-zA-Z_/]</code>. The dot fails that test, so
FFmpeg prints <code>&lt;i.loud&gt;</code> as cue text and then emits the closing italic-off with
nothing opened. FFmpeg's WebVTT reader matches <code>i</code>/<code>b</code>/<code>u</code> exactly and drops
the rest, so there a class silently loses the styling instead. The tags this
method removes outright are the ones both readers already discard, and that
libass would draw as text if a conversion carried them into ASS.</p>
</div>
</div>
<div class="doc doc-object doc-function">
<h3 id="unshackle.core.tracks.Subtitle.strip_webvtt_timestamp_map" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">strip_webvtt_timestamp_map</span>
+3 -3
View File
@@ -2241,10 +2241,10 @@ default. In other words, config only fills in options you did not set on the com
<td>Forced subtitle language(s); implies <code>forced_subs</code>. A <code>-</code> prefix excludes.</td>
</tr>
<tr>
<td><code>no_subs</code> / <code>no_audio</code> / <code>no_chapters</code></td>
<td><code>no_subs</code> / <code>no_audio</code> / <code>no_chapters</code> / <code>no_attachments</code></td>
<td>bool</td>
<td><code>false</code></td>
<td>Skip that track type.</td>
<td>Skip that track type. <code>no_attachments</code> also skips attaching subtitle fonts.</td>
</tr>
<tr>
<td><code>downloads</code></td>
@@ -2385,7 +2385,7 @@ in or writes them as sidecar files. See <a href="../../../guide/subtitles/">Subt
<td><code>preserve_formatting</code></td>
<td>bool</td>
<td><code>true</code></td>
<td>Keep styling/positioning when converting or stripping.</td>
<td>Pass WebVTT cue text through as written. <code>false</code> re-encodes it through pycaption, which merges identical cues but flattens styling. unshackle removes WebVTT-only cue markup either way.</td>
</tr>
<tr>
<td><code>convert_before_strip</code></td>