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('some/file.srt') subs[42].end.hours += 3 subs[42].sub_title = "Never end !" #equivalent part = SubRipFile(i for i in subs if i.end > SubRipTime(0, 0, 40)) part = SubRipFile(i for i in subs if i.end > (0, 0, 40)) part = SubRipFile(i for i in subs if i.end > {'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.1.6.tar.gz
(4.2 kB
view details)
File details
Details for the file pysrt-0.1.6.tar.gz
.
File metadata
- Download URL: pysrt-0.1.6.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e574d496af6d0aab73d8bc3998f7fa0a398e51a34f3886067fcfa5147bbe5c8 |
|
MD5 | c7788bdd3e0eb83c290af41927b0b2e9 |
|
BLAKE2b-256 | 7982527b23b9fbb2dc88f194e529ef182b6fc270a1e4dc3f3f92d32848e3e6c4 |