--- /srv/rebuilderd/tmp/rebuilderdX7tKNH/inputs/python-srt-doc_3.5.3-1_all.deb
+++ /srv/rebuilderd/tmp/rebuilderdX7tKNH/out/python-srt-doc_3.5.3-1_all.deb
├── file list
│ @@ -1,3 +1,3 @@
│ -rw-r--r-- 0 0 0 4 2023-06-15 00:46:46.000000 debian-binary
│ -rw-r--r-- 0 0 0 1372 2023-06-15 00:46:46.000000 control.tar.xz
│ --rw-r--r-- 0 0 0 25008 2023-06-15 00:46:46.000000 data.tar.xz
│ +-rw-r--r-- 0 0 0 24816 2023-06-15 00:46:46.000000 data.tar.xz
├── control.tar.xz
│ ├── control.tar
│ │ ├── ./control
│ │ │ @@ -1,13 +1,13 @@
│ │ │ Package: python-srt-doc
│ │ │ Source: python-srt
│ │ │ Version: 3.5.3-1
│ │ │ Architecture: all
│ │ │ Maintainer: Debian Python Team
│ │ │ -Installed-Size: 137
│ │ │ +Installed-Size: 133
│ │ │ Depends: libjs-sphinxdoc (>= 5.2)
│ │ │ Section: doc
│ │ │ Priority: optional
│ │ │ Multi-Arch: foreign
│ │ │ Homepage: https://github.com/cdown/srt
│ │ │ Description: Python library to handle SRT subtitle files (documentation)
│ │ │ srt is a tiny but featureful Python library for parsing, modifying, and
│ │ ├── ./md5sums
│ │ │ ├── ./md5sums
│ │ │ │┄ Files differ
├── data.tar.xz
│ ├── data.tar
│ │ ├── file list
│ │ │ @@ -16,15 +16,15 @@
│ │ │ -rw-r--r-- 0 root (0) root (0) 42 2017-05-15 18:58:47.000000 ./usr/share/doc/python-srt-doc/html/_static/custom.css
│ │ │ -rw-r--r-- 0 root (0) root (0) 420 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/_static/documentation_options.js
│ │ │ -rw-r--r-- 0 root (0) root (0) 286 2023-03-29 08:31:27.000000 ./usr/share/doc/python-srt-doc/html/_static/file.png
│ │ │ -rw-r--r-- 0 root (0) root (0) 7791 2021-06-13 20:22:59.000000 ./usr/share/doc/python-srt-doc/html/_static/forkme_right_darkblue_121621.png
│ │ │ -rw-r--r-- 0 root (0) root (0) 90 2023-03-29 08:31:27.000000 ./usr/share/doc/python-srt-doc/html/_static/minus.png
│ │ │ -rw-r--r-- 0 root (0) root (0) 90 2023-03-29 08:31:27.000000 ./usr/share/doc/python-srt-doc/html/_static/plus.png
│ │ │ -rw-r--r-- 0 root (0) root (0) 4846 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/_static/pygments.css
│ │ │ --rw-r--r-- 0 root (0) root (0) 35555 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/api.html
│ │ │ +-rw-r--r-- 0 root (0) root (0) 31462 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/api.html
│ │ │ -rw-r--r-- 0 root (0) root (0) 5014 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/genindex.html
│ │ │ -rw-r--r-- 0 root (0) root (0) 6164 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/index.html
│ │ │ -rw-r--r-- 0 root (0) root (0) 419 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/objects.inv
│ │ │ -rw-r--r-- 0 root (0) root (0) 3219 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/py-modindex.html
│ │ │ -rw-r--r-- 0 root (0) root (0) 6908 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/quickstart.html
│ │ │ -rw-r--r-- 0 root (0) root (0) 2980 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/search.html
│ │ │ -rw-r--r-- 0 root (0) root (0) 5830 2023-06-15 00:46:46.000000 ./usr/share/doc/python-srt-doc/html/searchindex.js
│ │ ├── ./usr/share/doc/python-srt-doc/html/api.html
│ │ │ @@ -40,17 +40,17 @@
│ │ │
│ │ │ -
│ │ │ exception srt.SRTParseError(expected_start, actual_start, unmatched_content)
│ │ │ Raised when part of an SRT block could not be parsed.
│ │ │
│ │ │ - Parameters:
│ │ │
│ │ │ -expected_start (int) – The expected contiguous start index
│ │ │ -actual_start (int) – The actual non-contiguous start index
│ │ │ -unmatched_content (str) – The content between the expected start index
│ │ │ +
expected_start (int) – The expected contiguous start index
│ │ │ +actual_start (int) – The actual non-contiguous start index
│ │ │ +unmatched_content (str) – The content between the expected start index
│ │ │ and the actual start index
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -58,44 +58,44 @@
│ │ │ class srt.Subtitle(index, start, end, content, proprietary='')
│ │ │ The metadata relating to a single subtitle. Subtitles are sorted by start
│ │ │ time by default. If no index was provided, index 0 will be used on writing
│ │ │ an SRT block.
│ │ │
│ │ │ - Parameters:
│ │ │
│ │ │ -index (int or None) – The SRT index for this subtitle
│ │ │ -start (datetime.timedelta
) – The time that the subtitle should start being shown
│ │ │ -end (datetime.timedelta
) – The time that the subtitle should stop being shown
│ │ │ -proprietary (str) – Proprietary metadata for this subtitle
│ │ │ -content (str) – The subtitle content. Should not contain OS-specific
│ │ │ +
index (int or None) – The SRT index for this subtitle
│ │ │ +start (datetime.timedelta
) – The time that the subtitle should start being shown
│ │ │ +end (datetime.timedelta
) – The time that the subtitle should stop being shown
│ │ │ +proprietary (str) – Proprietary metadata for this subtitle
│ │ │ +content (str) – The subtitle content. Should not contain OS-specific
│ │ │ line separators, only \n. This is taken care of
│ │ │ already if you use srt.parse()
to generate
│ │ │ Subtitle objects.
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -
│ │ │ to_srt(strict=True, eol='\n')
│ │ │ Convert the current Subtitle
to an SRT block.
│ │ │
│ │ │ - Parameters:
│ │ │
│ │ │ -strict (bool) – If disabled, will allow blank lines in the content
│ │ │ +
strict (bool) – If disabled, will allow blank lines in the content
│ │ │ of the SRT block, which is a violation of the SRT
│ │ │ standard and may cause your media player to explode
│ │ │ -eol (str) – The end of line string to use (default “\n”)
│ │ │ +eol (str) – The end of line string to use (default “\n”)
│ │ │
│ │ │
│ │ │ - Returns:
│ │ │ The metadata of the current Subtitle
object as an
│ │ │ SRT formatted subtitle block
│ │ │
│ │ │ - Return type:
│ │ │ -str
│ │ │ +str
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -119,30 +119,30 @@
│ │ │ >>> compose(subs)
│ │ │ '1\n00:00:01,000 --> 00:00:02,000\nx\n\n2\n00:00:01,000 --> ...'
│ │ │
│ │ │
│ │ │
│ │ │ - Parameters:
│ │ │
│ │ │ -subtitles (iterator of Subtitle
objects) – The subtitles to convert to SRT blocks
│ │ │ -reindex (bool) – Whether to reindex subtitles based on start time
│ │ │ -start_index (int) – If reindexing, the index to start reindexing from
│ │ │ -strict (bool) – Whether to enable strict mode, see
│ │ │ +
subtitles (iterator of Subtitle
objects) – The subtitles to convert to SRT blocks
│ │ │ +reindex (bool) – Whether to reindex subtitles based on start time
│ │ │ +start_index (int) – If reindexing, the index to start reindexing from
│ │ │ +strict (bool) – Whether to enable strict mode, see
│ │ │ Subtitle.to_srt()
for more information
│ │ │ -eol (str) – The end of line string to use (default “\n”)
│ │ │ -in_place (bool) – Whether to reindex subs in-place for performance
│ │ │ +
eol (str) – The end of line string to use (default “\n”)
│ │ │ +in_place (bool) – Whether to reindex subs in-place for performance
│ │ │ (version <=1.0.0 behaviour)
│ │ │
│ │ │
│ │ │ - Returns:
│ │ │ A single SRT formatted string, with each input
│ │ │ Subtitle
represented as an SRT block
│ │ │
│ │ │ - Return type:
│ │ │ -str
│ │ │ +str
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -
│ │ │ srt.make_legal_content(content)
│ │ │ @@ -153,30 +153,30 @@
│ │ │
│ │ │ >>> make_legal_content('\nfoo\n\nbar\n')
│ │ │ 'foo\nbar'
│ │ │
│ │ │
│ │ │
│ │ │ - Parameters:
│ │ │ -content (str) – The content to make legal
│ │ │ +content (str) – The content to make legal
│ │ │
│ │ │ - Returns:
│ │ │ The legalised content
│ │ │
│ │ │ - Return type:
│ │ │ srt
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -
│ │ │ srt.parse(srt, ignore_errors=False)
│ │ │ Convert an SRT formatted string (in Python 2, a unicode
object) to
│ │ │ -a generator of Subtitle objects.
│ │ │ +a generator of Subtitle objects.
│ │ │ This function works around bugs present in many SRT files, most notably
│ │ │ that it is designed to not bork when presented with a blank line as part of
│ │ │ a subtitle’s content.
│ │ │ >>> subs = parse("""\
│ │ │ ... 422
│ │ │ ... 00:31:39,931 --> 00:31:41,931
│ │ │ ... Using mainly spoons,
│ │ │ @@ -189,27 +189,27 @@
│ │ │ >>> list(subs)
│ │ │ [Subtitle(...index=422...), Subtitle(...index=423...)]
│ │ │
│ │ │
│ │ │
│ │ │ - Parameters:
│ │ │
│ │ │ -srt (str or a file-like object) – Subtitles in SRT format
│ │ │ +srt (str or a file-like object) – Subtitles in SRT format
│ │ │ ignore_errors – If True, garbled SRT data will be ignored, and we’ll
│ │ │ continue trying to parse the rest of the file,
│ │ │ instead of raising SRTParseError
and
│ │ │ stopping execution.
│ │ │
│ │ │
│ │ │ - Returns:
│ │ │ The subtitles contained in the SRT file as Subtitle
│ │ │ objects
│ │ │
│ │ │ - Return type:
│ │ │ -generator of Subtitle
objects
│ │ │ +generator of Subtitle
objects
│ │ │
│ │ │ - Raises:
│ │ │ SRTParseError – If the matches are not contiguous and
│ │ │ ignore_errors
is False.
│ │ │
│ │ │
│ │ │
│ │ │ @@ -241,74 +241,74 @@
│ │ │ [Subtitle(...index=1...), Subtitle(...index=2...)]
│ │ │
│ │ │
│ │ │
│ │ │ - Parameters:
│ │ │
│ │ │ subtitles – Subtitle
objects in any order
│ │ │ -start_index (int) – The index to start from
│ │ │ -in_place (bool) – Whether to modify subs in-place for performance
│ │ │ +
start_index (int) – The index to start from
│ │ │ +in_place (bool) – Whether to modify subs in-place for performance
│ │ │ (version <=1.0.0 behaviour)
│ │ │ -skip (bool) – Whether to skip subtitles considered not useful (see
│ │ │ +
skip (bool) – Whether to skip subtitles considered not useful (see
│ │ │ above for rules)
│ │ │
│ │ │
│ │ │ - Returns:
│ │ │ The sorted subtitles
│ │ │
│ │ │ - Return type:
│ │ │ -generator of Subtitle
objects
│ │ │ +generator of Subtitle
objects
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -
│ │ │ srt.srt_timestamp_to_timedelta(timestamp)
│ │ │ -Convert an SRT timestamp to a timedelta
.
│ │ │ +Convert an SRT timestamp to a timedelta
.
│ │ │ >>> srt_timestamp_to_timedelta('01:23:04,000')
│ │ │ datetime.timedelta(seconds=4984)
│ │ │
│ │ │
│ │ │
│ │ │ - Parameters:
│ │ │ -timestamp (str) – A timestamp in SRT format
│ │ │ +timestamp (str) – A timestamp in SRT format
│ │ │
│ │ │ - Returns:
│ │ │ -The timestamp as a timedelta
│ │ │ +The timestamp as a timedelta
│ │ │
│ │ │ - Return type:
│ │ │ -datetime.timedelta
│ │ │ +datetime.timedelta
│ │ │
│ │ │ - Raises:
│ │ │ TimestampParseError – If the timestamp is not parseable
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -
│ │ │ srt.timedelta_to_srt_timestamp(timedelta_timestamp)
│ │ │ -Convert a timedelta
to an SRT timestamp.
│ │ │ +Convert a timedelta
to an SRT timestamp.
│ │ │ >>> import datetime
│ │ │ >>> delta = datetime.timedelta(hours=1, minutes=23, seconds=4)
│ │ │ >>> timedelta_to_srt_timestamp(delta)
│ │ │ '01:23:04,000'
│ │ │
│ │ │
│ │ │
│ │ │ - Parameters:
│ │ │ -timedelta_timestamp (datetime.timedelta) – A datetime to convert to an
│ │ │ +
timedelta_timestamp (datetime.timedelta) – A datetime to convert to an
│ │ │ SRT timestamp
│ │ │
│ │ │ - Returns:
│ │ │ The timestamp in SRT format
│ │ │
│ │ │ - Return type:
│ │ │ -str
│ │ │ +str
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ ├── html2text {}
│ │ │ │ @@ -1,44 +1,44 @@
│ │ │ │ ************ AAPPII ddooccuummeennttaattiioonn_?¶ ************
│ │ │ │ A tiny library for parsing, modifying, and composing SRT files.
│ │ │ │ eexxcceeppttiioonn srt.SRTParseError(eexxppeecctteedd__ssttaarrtt, aaccttuuaall__ssttaarrtt, uunnmmaattcchheedd__ccoonntteenntt)_¶
│ │ │ │ Raised when part of an SRT block could not be parsed.
│ │ │ │ Parameters:
│ │ │ │ - * eexxppeecctteedd__ssttaarrtt (_ii_nn_tt) – The expected contiguous start index
│ │ │ │ - * aaccttuuaall__ssttaarrtt (_ii_nn_tt) – The actual non-contiguous start index
│ │ │ │ - * uunnmmaattcchheedd__ccoonntteenntt (_ss_tt_rr) – The content between the expected
│ │ │ │ + * eexxppeecctteedd__ssttaarrtt (iinntt) – The expected contiguous start index
│ │ │ │ + * aaccttuuaall__ssttaarrtt (iinntt) – The actual non-contiguous start index
│ │ │ │ + * uunnmmaattcchheedd__ccoonntteenntt (ssttrr) – The content between the expected
│ │ │ │ start index and the actual start index
│ │ │ │ ccllaassss srt.Subtitle(iinnddeexx, ssttaarrtt, eenndd, ccoonntteenntt, pprroopprriieettaarryy=='''')_¶
│ │ │ │ The metadata relating to a single subtitle. Subtitles are sorted by start
│ │ │ │ time by default. If no index was provided, index 0 will be used on
│ │ │ │ writing an SRT block.
│ │ │ │ Parameters:
│ │ │ │ - * iinnddeexx (_ii_nn_tt oorr NNoonnee) – The SRT index for this subtitle
│ │ │ │ - * ssttaarrtt (_d_a_t_e_t_i_m_e_._t_i_m_e_d_e_l_t_a) – The time that the subtitle
│ │ │ │ + * iinnddeexx (iinntt oorr NNoonnee) – The SRT index for this subtitle
│ │ │ │ + * ssttaarrtt (datetime.timedelta) – The time that the subtitle
│ │ │ │ should start being shown
│ │ │ │ - * eenndd (_d_a_t_e_t_i_m_e_._t_i_m_e_d_e_l_t_a) – The time that the subtitle should
│ │ │ │ + * eenndd (datetime.timedelta) – The time that the subtitle should
│ │ │ │ stop being shown
│ │ │ │ - * pprroopprriieettaarryy (_ss_tt_rr) – Proprietary metadata for this subtitle
│ │ │ │ - * ccoonntteenntt (_ss_tt_rr) – The subtitle content. Should not contain OS-
│ │ │ │ + * pprroopprriieettaarryy (ssttrr) – Proprietary metadata for this subtitle
│ │ │ │ + * ccoonntteenntt (ssttrr) – The subtitle content. Should not contain OS-
│ │ │ │ specific line separators, only \n. This is taken care of
│ │ │ │ already if you use _s_r_t_._p_a_r_s_e_(_) to generate Subtitle objects.
│ │ │ │ to_srt(ssttrriicctt==TTrruuee, eeooll==''\\nn'')_¶
│ │ │ │ Convert the current _S_u_b_t_i_t_l_e to an SRT block.
│ │ │ │ Parameters:
│ │ │ │ - * ssttrriicctt (_bb_oo_oo_ll) – If disabled, will allow blank lines in
│ │ │ │ + * ssttrriicctt (bbooooll) – If disabled, will allow blank lines in
│ │ │ │ the content of the SRT block, which is a violation of
│ │ │ │ the SRT standard and may cause your media player to
│ │ │ │ explode
│ │ │ │ - * eeooll (_ss_tt_rr) – The end of line string to use (default
│ │ │ │ + * eeooll (ssttrr) – The end of line string to use (default
│ │ │ │ “\n”)
│ │ │ │ Returns:
│ │ │ │ The metadata of the current _S_u_b_t_i_t_l_e object as an SRT
│ │ │ │ formatted subtitle block
│ │ │ │ Return type:
│ │ │ │ - _s_t_r
│ │ │ │ + str
│ │ │ │ eexxcceeppttiioonn srt.TimestampParseError_¶
│ │ │ │ Raised when an SRT timestamp could not be parsed.
│ │ │ │ srt.compose(ssuubbttiittlleess, rreeiinnddeexx==TTrruuee, ssttaarrtt__iinnddeexx==11, ssttrriicctt==TTrruuee, eeooll==NNoonnee,
│ │ │ │ iinn__ppllaaccee==FFaallssee)_¶
│ │ │ │ Convert an iterator of _S_u_b_t_i_t_l_e objects to a string of joined SRT blocks.
│ │ │ │ >>> from datetime import timedelta
│ │ │ │ >>> start = timedelta(seconds=1)
│ │ │ │ @@ -46,45 +46,45 @@
│ │ │ │ >>> subs = [
│ │ │ │ ... Subtitle(index=1, start=start, end=end, content='x'),
│ │ │ │ ... Subtitle(index=2, start=start, end=end, content='y'),
│ │ │ │ ... ]
│ │ │ │ >>> compose(subs)
│ │ │ │ '1\n00:00:01,000 --> 00:00:02,000\nx\n\n2\n00:00:01,000 --> ...'
│ │ │ │ Parameters:
│ │ │ │ - * ssuubbttiittlleess (_i_t_e_r_a_t_o_r of _S_u_b_t_i_t_l_e objects) – The subtitles to
│ │ │ │ + * ssuubbttiittlleess (iterator of _S_u_b_t_i_t_l_e objects) – The subtitles to
│ │ │ │ convert to SRT blocks
│ │ │ │ - * rreeiinnddeexx (_bb_oo_oo_ll) – Whether to reindex subtitles based on start
│ │ │ │ + * rreeiinnddeexx (bbooooll) – Whether to reindex subtitles based on start
│ │ │ │ time
│ │ │ │ - * ssttaarrtt__iinnddeexx (_ii_nn_tt) – If reindexing, the index to start
│ │ │ │ + * ssttaarrtt__iinnddeexx (iinntt) – If reindexing, the index to start
│ │ │ │ reindexing from
│ │ │ │ - * ssttrriicctt (_bb_oo_oo_ll) – Whether to enable strict mode, see
│ │ │ │ + * ssttrriicctt (bbooooll) – Whether to enable strict mode, see
│ │ │ │ _S_u_b_t_i_t_l_e_._t_o___s_r_t_(_) for more information
│ │ │ │ - * eeooll (_ss_tt_rr) – The end of line string to use (default “\n”)
│ │ │ │ - * iinn__ppllaaccee (_bb_oo_oo_ll) – Whether to reindex subs in-place for
│ │ │ │ + * eeooll (ssttrr) – The end of line string to use (default “\n”)
│ │ │ │ + * iinn__ppllaaccee (bbooooll) – Whether to reindex subs in-place for
│ │ │ │ performance (version <=1.0.0 behaviour)
│ │ │ │ Returns:
│ │ │ │ A single SRT formatted string, with each input _S_u_b_t_i_t_l_e represented
│ │ │ │ as an SRT block
│ │ │ │ Return type:
│ │ │ │ - _s_t_r
│ │ │ │ + str
│ │ │ │ srt.make_legal_content(ccoonntteenntt)_¶
│ │ │ │ Remove illegal content from a content block. Illegal content includes:
│ │ │ │ * Blank lines
│ │ │ │ * Starting or ending with a blank line
│ │ │ │ >>> make_legal_content('\nfoo\n\nbar\n')
│ │ │ │ 'foo\nbar'
│ │ │ │ Parameters:
│ │ │ │ - ccoonntteenntt (_ss_tt_rr) – The content to make legal
│ │ │ │ + ccoonntteenntt (ssttrr) – The content to make legal
│ │ │ │ Returns:
│ │ │ │ The legalised content
│ │ │ │ Return type:
│ │ │ │ srt
│ │ │ │ srt.parse(ssrrtt, iiggnnoorree__eerrrroorrss==FFaallssee)_¶
│ │ │ │ Convert an SRT formatted string (in Python 2, a unicode object) to a
│ │ │ │ - _g_e_n_e_r_a_t_o_r of Subtitle objects.
│ │ │ │ + generator of Subtitle objects.
│ │ │ │ This function works around bugs present in many SRT files, most notably
│ │ │ │ that it is designed to not bork when presented with a blank line as part
│ │ │ │ of a subtitle’s content.
│ │ │ │ >>> subs = parse("""\
│ │ │ │ ... 422
│ │ │ │ ... 00:31:39,931 --> 00:31:41,931
│ │ │ │ ... Using mainly spoons,
│ │ │ │ @@ -93,22 +93,22 @@
│ │ │ │ ... 00:31:41,933 --> 00:31:43,435
│ │ │ │ ... we dig a tunnel under the city and release it into the wild.
│ │ │ │ ...
│ │ │ │ ... """)
│ │ │ │ >>> list(subs)
│ │ │ │ [Subtitle(...index=422...), Subtitle(...index=423...)]
│ │ │ │ Parameters:
│ │ │ │ - * ssrrtt (_ss_tt_rr oorr aa ffiillee--lliikkee oobbjjeecctt) – Subtitles in SRT format
│ │ │ │ + * ssrrtt (ssttrr oorr aa ffiillee--lliikkee oobbjjeecctt) – Subtitles in SRT format
│ │ │ │ * iiggnnoorree__eerrrroorrss – If True, garbled SRT data will be ignored,
│ │ │ │ and we’ll continue trying to parse the rest of the file,
│ │ │ │ instead of raising _S_R_T_P_a_r_s_e_E_r_r_o_r and stopping execution.
│ │ │ │ Returns:
│ │ │ │ The subtitles contained in the SRT file as _S_u_b_t_i_t_l_e objects
│ │ │ │ Return type:
│ │ │ │ - _g_e_n_e_r_a_t_o_r of _S_u_b_t_i_t_l_e objects
│ │ │ │ + generator of _S_u_b_t_i_t_l_e objects
│ │ │ │ Raises:
│ │ │ │ _SS_RR_TT_PP_aa_rr_ss_ee_EE_rr_rr_oo_rr – If the matches are not contiguous and ignore_errors
│ │ │ │ is False.
│ │ │ │ srt.sort_and_reindex(ssuubbttiittlleess, ssttaarrtt__iinnddeexx==11, iinn__ppllaaccee==FFaallssee, sskkiipp==TTrruuee)_¶
│ │ │ │ Reorder subtitles to be sorted by start time order, and rewrite the
│ │ │ │ indexes to be in that same order. This ensures that the SRT file will
│ │ │ │ play in an expected fashion after, for example, times were changed in
│ │ │ │ @@ -127,48 +127,48 @@
│ │ │ │ ... Subtitle(index=999, start=one, end=two, content='1'),
│ │ │ │ ... Subtitle(index=0, start=two, end=three, content='2'),
│ │ │ │ ... ]
│ │ │ │ >>> list(sort_and_reindex(subs))
│ │ │ │ [Subtitle(...index=1...), Subtitle(...index=2...)]
│ │ │ │ Parameters:
│ │ │ │ * ssuubbttiittlleess – _S_u_b_t_i_t_l_e objects in any order
│ │ │ │ - * ssttaarrtt__iinnddeexx (_ii_nn_tt) – The index to start from
│ │ │ │ - * iinn__ppllaaccee (_bb_oo_oo_ll) – Whether to modify subs in-place for
│ │ │ │ + * ssttaarrtt__iinnddeexx (iinntt) – The index to start from
│ │ │ │ + * iinn__ppllaaccee (bbooooll) – Whether to modify subs in-place for
│ │ │ │ performance (version <=1.0.0 behaviour)
│ │ │ │ - * sskkiipp (_bb_oo_oo_ll) – Whether to skip subtitles considered not useful
│ │ │ │ + * sskkiipp (bbooooll) – Whether to skip subtitles considered not useful
│ │ │ │ (see above for rules)
│ │ │ │ Returns:
│ │ │ │ The sorted subtitles
│ │ │ │ Return type:
│ │ │ │ - _g_e_n_e_r_a_t_o_r of _S_u_b_t_i_t_l_e objects
│ │ │ │ + generator of _S_u_b_t_i_t_l_e objects
│ │ │ │ srt.srt_timestamp_to_timedelta(ttiimmeessttaammpp)_¶
│ │ │ │ - Convert an SRT timestamp to a _t_i_m_e_d_e_l_t_a.
│ │ │ │ + Convert an SRT timestamp to a timedelta.
│ │ │ │ >>> srt_timestamp_to_timedelta('01:23:04,000')
│ │ │ │ datetime.timedelta(seconds=4984)
│ │ │ │ Parameters:
│ │ │ │ - ttiimmeessttaammpp (_ss_tt_rr) – A timestamp in SRT format
│ │ │ │ + ttiimmeessttaammpp (ssttrr) – A timestamp in SRT format
│ │ │ │ Returns:
│ │ │ │ - The timestamp as a _t_i_m_e_d_e_l_t_a
│ │ │ │ + The timestamp as a timedelta
│ │ │ │ Return type:
│ │ │ │ - _d_a_t_e_t_i_m_e_._t_i_m_e_d_e_l_t_a
│ │ │ │ + datetime.timedelta
│ │ │ │ Raises:
│ │ │ │ _TT_ii_mm_ee_ss_tt_aa_mm_pp_PP_aa_rr_ss_ee_EE_rr_rr_oo_rr – If the timestamp is not parseable
│ │ │ │ srt.timedelta_to_srt_timestamp(ttiimmeeddeellttaa__ttiimmeessttaammpp)_¶
│ │ │ │ - Convert a _t_i_m_e_d_e_l_t_a to an SRT timestamp.
│ │ │ │ + Convert a timedelta to an SRT timestamp.
│ │ │ │ >>> import datetime
│ │ │ │ >>> delta = datetime.timedelta(hours=1, minutes=23, seconds=4)
│ │ │ │ >>> timedelta_to_srt_timestamp(delta)
│ │ │ │ '01:23:04,000'
│ │ │ │ Parameters:
│ │ │ │ - ttiimmeeddeellttaa__ttiimmeessttaammpp (_dd_aa_tt_ee_tt_ii_mm_ee_.._tt_ii_mm_ee_dd_ee_ll_tt_aa) – A datetime to convert to
│ │ │ │ + ttiimmeeddeellttaa__ttiimmeessttaammpp (ddaatteettiimmee..ttiimmeeddeellttaa) – A datetime to convert to
│ │ │ │ an SRT timestamp
│ │ │ │ Returns:
│ │ │ │ The timestamp in SRT format
│ │ │ │ Return type:
│ │ │ │ - _s_t_r
│ │ │ │ + str
│ │ │ │ ************ _ss_rr_tt ************
│ │ │ │ ******** NNaavviiggaattiioonn ********
│ │ │ │ * _Q_u_i_c_k_s_t_a_r_t
│ │ │ │ * _A_P_I_ _d_o_c_u_m_e_n_t_a_t_i_o_n
│ │ │ │ o _S_R_T_P_a_r_s_e_E_r_r_o_r
│ │ │ │ o _S_u_b_t_i_t_l_e
│ │ │ │ o _T_i_m_e_s_t_a_m_p_P_a_r_s_e_E_r_r_o_r