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, TMP and WebVTT 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-1.2.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

pysubs2-1.2.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysubs2-1.2.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pysubs2-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6bac5307455eb1f63e1c1d696a4c4d78615765ecada83c323e28507e9bd9d887
MD5 7acd29e8344670cefb1b064c249ddbc7
BLAKE2b-256 0c5dea6cb4fda284b18a034008e08650e68885cd5fca90dc17f45886ce15320d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysubs2-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pysubs2-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 841ad4bf8ac07cb5774654aee81e4ec2cb6213bd9b75e3397bbf841a0fdc99aa
MD5 5dc964fe3241fd116e8d0e01e319491d
BLAKE2b-256 897fa7b500e32ead93da79f596f0a3229996b9654b3cb9528e5edaba72add549

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