skip to navigation
skip to content

pysubs2 0.2.2

A library for editing subtitle files

Package Documentation

pysubs2 is a Python library for editing subtitle files. It’s based on SubStation Alpha, the native format of Aegisub; it also supports SubRip and MicroDVD 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")
 
File Type Py Version Uploaded on Size
pysubs2-0.2.2.tar.gz (md5) Source 2017-07-22 17KB