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].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.3.tar.gz
(7.9 kB
view hashes)
Built Distributions
pysrt-0.2.3-py2.6.egg
(24.2 kB
view hashes)
pysrt-0.2.3-py2.5.egg
(24.2 kB
view hashes)
Close
Hashes for pysrt-0.2.3.macosx-10.6-universal.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c340a88abcb02e4980176e25142702684346208c87b244cb5511d69ae518691 |
|
MD5 | b0a85396d7fef47c5c870c00dd9d0bf3 |
|
BLAKE2b-256 | 34bd28a6d803c66135fa073aa5b31c6f5054f410c92d1015263369306d0b68e7 |