Skip to main content

A library for editing subtitle files

Project description

pysubs2 is a Python library for editing subtitle files. It’s based on SubStation Alpha, the native format of Aegisub; it also supports SubRip (SRT), MicroDVD, MPL2 and TMP formats. There is a small CLI tool for batch conversion and retiming.

import pysubs2
subs = pysubs2.load("my_subtitles.ass", encoding="utf-8")
subs.shift(s=2.5)
for line in subs:
    line.text = "{\\be1}" + line.text
subs.save("my_subtitles_edited.ass")

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

pysubs2-0.2.4.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

pysubs2-0.2.4-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file pysubs2-0.2.4.tar.gz.

File metadata

  • Download URL: pysubs2-0.2.4.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for pysubs2-0.2.4.tar.gz
Algorithm Hash digest
SHA256 07f9bb5da0efe8238b88c9ee35cc42ad8c6a3ffc2e4bf8f3bff6d463d02a4b6f
MD5 8877ea3e5a0bbc3b2826b24142c8d411
BLAKE2b-256 8a835ebaf5a1d6f04ae21c2bdc16dcdba4a950b1c0b10f0fe83e71f9c5738e33

See more details on using hashes here.

File details

Details for the file pysubs2-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: pysubs2-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for pysubs2-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dc079dc323c8cf886fd604b8f80b464a70b8511f431979db4a93da36dbb9d697
MD5 9a8e3bb3eb86fc0a43e595ac75f27189
BLAKE2b-256 891b128901eaa32629a40378014210e783ce5e927e245c10fbc54f05fffc963d

See more details on using hashes here.

Supported by

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