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.5.tar.gz
(7.5 kB
view details)
File details
Details for the file pysrt-0.2.5.tar.gz
.
File metadata
- Download URL: pysrt-0.2.5.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd34a1b25bcf5f51b7e2ddb4390062f055f925d2f2153a2dac7c28f4e7392e73 |
|
MD5 | a739231ffea10931add383d009138a46 |
|
BLAKE2b-256 | be56e0b9e652e20d0e90aeeafa48d7f9f79bc3615551ddbccc58dc74a302629a |