SubRip (.srt) subtitle parser and writer
Project description
pysrt is a Python library used to edit or create SubRip files.
Usage
from pysrt import SubRipFile, SubRipItem, SubRipTime subs = SubRipFile.open('some/file.srt') subs[42].end.hours += 3 subs[42].text = "Never end !" #equivalent part = subs.slice(ends_after=SubRipTime(0, 0, 40)) part = subs.slice(ends_after=(0, 0, 40)) part = subs.slice(ends_after={'seconds': 40}) part.shift(seconds=-2) subs.save('other/path.srt', 'utf-8')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysrt-0.2.6.tar.gz
(7.9 kB
view details)
Built Distribution
pysrt-0.2.6-py2.6.egg
(25.5 kB
view details)
File details
Details for the file pysrt-0.2.6.tar.gz
.
File metadata
- Download URL: pysrt-0.2.6.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31dd7fd4b2a4b84c50f1ddc5ea2979fb0bfb08c5f3708847a0972c7964fe3f4 |
|
MD5 | d573b6cb4411850813ad4e9913d7c64c |
|
BLAKE2b-256 | e5a025235d0860cf5887c5757304191f366cfe589bdd32d87ae5636a054bf054 |
File details
Details for the file pysrt-0.2.6-py2.6.egg
.
File metadata
- Download URL: pysrt-0.2.6-py2.6.egg
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1602ebe809900b194a069443ab6759acb2df2357f0d19bfe97f0d63cb1c6f9ba |
|
MD5 | 508a22798ff8f540964fce780cc898b2 |
|
BLAKE2b-256 | 25a470835e8ba00999056d20c1da0860b290f03b109dafb7231fc74c1fc60f96 |