Skip to main content

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


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.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pysrt-0.2.2-py2.6.egg (23.6 kB view details)

Uploaded Egg

pysrt-0.2.2-py2.5.egg (23.6 kB view details)

Uploaded Egg

File details

Details for the file pysrt-0.2.2.tar.gz.

File metadata

  • Download URL: pysrt-0.2.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysrt-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ff33168b87de4b04e9dceb398137df3c627f61ac2fba9901a9d732755f97a698
MD5 e12e111d861b56a0282f92709e823abb
BLAKE2b-256 94c866dd10497536e1fcf0b8fd183233acad36c41b7b70dd826d5fda49a02c92

See more details on using hashes here.

File details

Details for the file pysrt-0.2.2-py2.6.egg.

File metadata

  • Download URL: pysrt-0.2.2-py2.6.egg
  • Upload date:
  • Size: 23.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysrt-0.2.2-py2.6.egg
Algorithm Hash digest
SHA256 4ba932cfeffb333197ba89a685cc79b1788540ea08b12906bee07160f8b8f1c6
MD5 e4432f575e7c5b5473960fd91c2758a3
BLAKE2b-256 12ca2bc2ea2f12bd3d9d4191a51b0c89176031db2ed4b1363dadd200b6548e47

See more details on using hashes here.

File details

Details for the file pysrt-0.2.2-py2.5.egg.

File metadata

  • Download URL: pysrt-0.2.2-py2.5.egg
  • Upload date:
  • Size: 23.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysrt-0.2.2-py2.5.egg
Algorithm Hash digest
SHA256 f1a576e62bae13fa4d779886d19dbb14b2724fa4d3483ba74670c47cd9cc8004
MD5 204b276019b093b2b1c4d4017f786420
BLAKE2b-256 777c9202ec4ad4c73f7596747b886d04328cf0e6145f3f21e22cc3fc29c4795f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page