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
Release history Release notifications | RSS feed
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.4.2.tar.gz
(25.7 kB
view hashes)
Built Distribution
pysubs2-1.4.2-py3-none-any.whl
(32.4 kB
view hashes)