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.4.tar.gz
(7.6 kB
view details)
File details
Details for the file pysrt-0.2.4.tar.gz
.
File metadata
- Download URL: pysrt-0.2.4.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d053a3f2d1ad8f9ffa984c4e16bfd1aa7206d0339d2d6ddb13709b5769b39498 |
|
MD5 | 0737c73b441ad48346aaea8e831e9732 |
|
BLAKE2b-256 | e606793d4446338497ebc2ea3e9086cf35a44176f0fffa30edf45d94d29c7c01 |