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.3.tar.gz
(25.8 kB
view details)
Built Distribution
pysubs2-1.4.3-py3-none-any.whl
(32.6 kB
view details)
File details
Details for the file pysubs2-1.4.3.tar.gz
.
File metadata
- Download URL: pysubs2-1.4.3.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b15dff5af2f23b4e11a5a727877880504f2231a80697757ddbd345613f241e |
|
MD5 | da9756f67970b56327a6e0b4b95204ef |
|
BLAKE2b-256 | ecd0ea94c0e63460233793097b442bb2c8e4029b5b2b8557066045fcd86f44f7 |
File details
Details for the file pysubs2-1.4.3-py3-none-any.whl
.
File metadata
- Download URL: pysubs2-1.4.3-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e45a413275f8a8ce04c7b45279814832814a219d8e871a4bfb0e07d1d5428af |
|
MD5 | 03af482ab3fbf7d181a220384a077187 |
|
BLAKE2b-256 | 7e5a1815bbacd2fb62581929dbb62446446f99a73c9559eabfe90c15179377bd |