pysubs2


Namepysubs2 JSON
Version 1.8.0 PyPI version JSON
download
home_pagehttps://github.com/tkarabela/pysubs2
SummaryA library for editing subtitle files
upload_time2024-12-24 12:39:47
maintainerNone
docs_urlhttps://pythonhosted.org/pysubs2/
authorTomas Karabela
requires_python>=3.9
licenseMIT
keywords substation subrip microdvd mpl2 webvtt ass srt sub vtt subtitles captions
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pysubs2
=======

[![pysubs2 build master branch](https://img.shields.io/github/actions/workflow/status/tkarabela/pysubs2/main.yml?branch=master)](https://github.com/tkarabela/pysubs2/actions)
[![pysubs2 test code coverage](https://img.shields.io/codecov/c/github/tkarabela/pysubs2)](https://app.codecov.io/github/tkarabela/pysubs2)
[![Static Badge](https://img.shields.io/badge/MyPy%20%26%20Ruffle-checked-blue?style=flat)](https://github.com/tkarabela/pysubs2/actions)
[![PyPI - Version](https://img.shields.io/pypi/v/pysubs2.svg?style=flat)](https://pypi.org/project/pysubs2/)
[![PyPI - Status](https://img.shields.io/pypi/status/pysubs2.svg?style=flat)](https://pypi.org/project/pysubs2/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pysubs2.svg?style=flat)](https://pypi.org/project/pysubs2/)
[![PyPI - License](https://img.shields.io/pypi/l/pysubs2.svg?style=flat)](LICENSE.txt)
[![GitHub Repo stars](https://img.shields.io/github/stars/tkarabela/pysubs2?style=flat&label=GitHub%20stars)](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[![pysubs2 build master branch](https://img.shields.io/github/actions/workflow/status/tkarabela/pysubs2/main.yml?branch=master)](https://github.com/tkarabela/pysubs2/actions)\n[![pysubs2 test code coverage](https://img.shields.io/codecov/c/github/tkarabela/pysubs2)](https://app.codecov.io/github/tkarabela/pysubs2)\n[![Static Badge](https://img.shields.io/badge/MyPy%20%26%20Ruffle-checked-blue?style=flat)](https://github.com/tkarabela/pysubs2/actions)\n[![PyPI - Version](https://img.shields.io/pypi/v/pysubs2.svg?style=flat)](https://pypi.org/project/pysubs2/)\n[![PyPI - Status](https://img.shields.io/pypi/status/pysubs2.svg?style=flat)](https://pypi.org/project/pysubs2/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pysubs2.svg?style=flat)](https://pypi.org/project/pysubs2/)\n[![PyPI - License](https://img.shields.io/pypi/l/pysubs2.svg?style=flat)](LICENSE.txt)\n[![GitHub Repo stars](https://img.shields.io/github/stars/tkarabela/pysubs2?style=flat&label=GitHub%20stars)](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"
}
        
Elapsed time: 0.37034s