Skip to content
A Python library for editing subtitle files
Python Makefile
Branch: master
Clone or download
tkarabela and Tomas Karabela Version 0.2.4
Latest commit fc53473 Jun 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Version 0.2.4 Jun 22, 2019
pysubs2 Version 0.2.4 Jun 22, 2019
tests Merge pull request #13 from bkiziuk/tmp-support Jun 22, 2019
.gitignore cosmetics Oct 16, 2015
.travis.yml Drop support for Python 3.3 as it's not available in Travis CI anymore Jun 22, 2019
LICENSE.txt Version 0.2.4 Jun 22, 2019
README.rst Document TMP file support Jun 22, 2019
makefile cosmetics Oct 16, 2015
setup.py Document TMP file support Jun 22, 2019

README.rst

pysubs2

pysubs2 build master branch PyPI - Version PyPI - Status PyPI - Python Version PyPI - License

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.

$ pip install pysubs2
$ pysubs2 --shift 0.3s *.srt
$ pysubs2 --to srt *.ass
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")

To learn more, please see the documentation.

pysubs2 is licensed under the MIT license (see LICENSE.txt).

You can’t perform that action at this time.