pysrt 0.1.3
SubRip (.srt) subtitle parser and writer
Latest Version: 0.2.2
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')
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| pysrt-0.1.3.tar.gz (md5) | Source | 2009-10-17 21:37:51.304727 | 3KB | 59 | |
- Author: Jean Boussier <jean boussier at gmail com>
- Keywords: SubRip srt subtitle
- License: GPLv3
- Platform: Independent
- Categories
- Package Index Owner: jeanb
- DOAP record: pysrt-0.1.3.xml
Log in to rate this package.
