pysubs2
=======
[](https://github.com/tkarabela/pysubs2/actions)
[](https://app.codecov.io/github/tkarabela/pysubs2)
[](https://github.com/tkarabela/pysubs2/actions)
[](https://pypi.org/project/pysubs2/)
[](https://pypi.org/project/pysubs2/)
[](https://pypi.org/project/pysubs2/)
[](LICENSE.txt)
[](https://github.com/tkarabela/pysubs2)
pysubs2 is a Python library for editing subtitle files.
It’s based on *SubStation Alpha*, the native format of
[Aegisub](http://www.aegisub.org/); it also supports *SubRip (SRT)*,
*MicroDVD*, *MPL2*, *TMP*, *WebVTT*, *TTML* and *SAMI* formats and *OpenAI Whisper* captions.
There is a small CLI tool for batch conversion and retiming.
```bash
pip install pysubs2
pysubs2 --shift 0.3s *.srt
pysubs2 --to srt *.ass
```
```python
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](http://pysubs2.readthedocs.io).
If you'd like to contribute, see [CONTRIBUTING.md](CONTRIBUTING.md).
pysubs2 is licensed under the MIT license (see [LICENSE.txt](LICENSE.txt)).
Raw data
{
"_id": null,
"home_page": "https://github.com/tkarabela/pysubs2",
"name": "pysubs2",
"maintainer": null,
"docs_url": "https://pythonhosted.org/pysubs2/",
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "SubStation, SubRip, MicroDVD, MPL2, WebVTT, ass, srt, sub, vtt, subtitles, captions",
"author": "Tomas Karabela",
"author_email": "tkarabela@seznam.cz",
"download_url": "https://files.pythonhosted.org/packages/31/4a/becf78d9d3df56e6c4a9c50b83794e5436b6c5ab6dd8a3f934e94c89338c/pysubs2-1.8.0.tar.gz",
"platform": null,
"description": "pysubs2\n=======\n\n[](https://github.com/tkarabela/pysubs2/actions)\n[](https://app.codecov.io/github/tkarabela/pysubs2)\n[](https://github.com/tkarabela/pysubs2/actions)\n[](https://pypi.org/project/pysubs2/)\n[](https://pypi.org/project/pysubs2/)\n[](https://pypi.org/project/pysubs2/)\n[](LICENSE.txt)\n[](https://github.com/tkarabela/pysubs2)\n\n\npysubs2 is a Python library for editing subtitle files.\nIt\u2019s based on *SubStation Alpha*, the native format of\n[Aegisub](http://www.aegisub.org/); it also supports *SubRip (SRT)*,\n*MicroDVD*, *MPL2*, *TMP*, *WebVTT*, *TTML* and *SAMI* formats and *OpenAI Whisper* captions.\n\nThere is a small CLI tool for batch conversion and retiming.\n\n```bash\npip install pysubs2\npysubs2 --shift 0.3s *.srt\npysubs2 --to srt *.ass\n```\n\n```python\nimport pysubs2\nsubs = pysubs2.load(\"my_subtitles.ass\", encoding=\"utf-8\")\nsubs.shift(s=2.5)\nfor line in subs:\n line.text = \"{\\\\be1}\" + line.text\nsubs.save(\"my_subtitles_edited.ass\")\n```\n\nTo learn more, please [see the documentation](http://pysubs2.readthedocs.io).\nIf you'd like to contribute, see [CONTRIBUTING.md](CONTRIBUTING.md).\n\npysubs2 is licensed under the MIT license (see [LICENSE.txt](LICENSE.txt)).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for editing subtitle files",
"version": "1.8.0",
"project_urls": {
"Bug Tracker": "https://github.com/tkarabela/pysubs2/issues",
"Documentation": "https://pysubs2.readthedocs.io",
"Homepage": "https://github.com/tkarabela/pysubs2"
},
"split_keywords": [
"substation",
" subrip",
" microdvd",
" mpl2",
" webvtt",
" ass",
" srt",
" sub",
" vtt",
" subtitles",
" captions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "99090fc0719162e5ad723f71d41cf336f18b6b5054d70dc0fe42ace6b4d2bdc9",
"md5": "bb84d78e8917e1507e48032a75a6000d",
"sha256": "05716f5039a9ebe32cd4d7673f923cf36204f3a3e99987f823ab83610b7035a0"
},
"downloads": -1,
"filename": "pysubs2-1.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb84d78e8917e1507e48032a75a6000d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 43516,
"upload_time": "2024-12-24T12:39:44",
"upload_time_iso_8601": "2024-12-24T12:39:44.469412Z",
"url": "https://files.pythonhosted.org/packages/99/09/0fc0719162e5ad723f71d41cf336f18b6b5054d70dc0fe42ace6b4d2bdc9/pysubs2-1.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "314abecf78d9d3df56e6c4a9c50b83794e5436b6c5ab6dd8a3f934e94c89338c",
"md5": "5dda2f8769c75debe06bcb8ccd99f561",
"sha256": "3397bb58a4a15b1325ba2ae3fd4d7c214e2c0ddb9f33190d6280d783bb433b20"
},
"downloads": -1,
"filename": "pysubs2-1.8.0.tar.gz",
"has_sig": false,
"md5_digest": "5dda2f8769c75debe06bcb8ccd99f561",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1130048,
"upload_time": "2024-12-24T12:39:47",
"upload_time_iso_8601": "2024-12-24T12:39:47.769806Z",
"url": "https://files.pythonhosted.org/packages/31/4a/becf78d9d3df56e6c4a9c50b83794e5436b6c5ab6dd8a3f934e94c89338c/pysubs2-1.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-24 12:39:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tkarabela",
"github_project": "pysubs2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pysubs2"
}