pysrt 0.2.2
SubRip (.srt) subtitle parser and writer
Latest Version: 0.4.1
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')
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| pysrt-0.2.2-py2.5.egg (md5) | Python Egg | 2.5 | 2009-11-07 | 23KB | 561 |
| pysrt-0.2.2-py2.6.egg (md5) | Python Egg | 2.6 | 2009-11-07 | 23KB | 546 |
| pysrt-0.2.2.tar.gz (md5) | Source | 2009-11-07 | 7KB | 575 | |
- Author: Jean Boussier
- Home Page: http://github.com/byroot/pysrt
- Keywords: SubRip srt subtitle
- License: GPLv3
- Platform: Independent
- Categories
- Package Index Owner: jeanb
- DOAP record: pysrt-0.2.2.xml
