pysubs2
=======
.. image:: https://img.shields.io/github/actions/workflow/status/tkarabela/pysubs2/main.yml?branch=master
:alt: pysubs2 build master branch
:target: https://github.com/tkarabela/pysubs2/actions
.. image:: https://img.shields.io/codecov/c/github/tkarabela/pysubs2
:alt: pysubs2 test code coverage
:target: https://app.codecov.io/github/tkarabela/pysubs2
.. image:: http://www.mypy-lang.org/static/mypy_badge.svg
:alt: MyPy checked
:target: https://github.com/tkarabela/pysubs2/actions
.. image:: https://img.shields.io/pypi/v/pysubs2.svg?style=flat-square
:alt: PyPI - Version
:target: https://pypi.org/project/pysubs2/
.. image:: https://img.shields.io/pypi/status/pysubs2.svg?style=flat-square
:alt: PyPI - Status
:target: https://pypi.org/project/pysubs2/
.. image:: https://img.shields.io/pypi/pyversions/pysubs2.svg?style=flat-square
:alt: PyPI - Python Version
:target: https://pypi.org/project/pysubs2/
.. image:: https://img.shields.io/pypi/l/pysubs2.svg?style=flat-square
:alt: PyPI - License
:target: LICENSE.txt
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* and *WebVTT* formats and *OpenAI Whisper* captions.
There is a small CLI tool for batch conversion and retiming.
.. code:: bash
$ pip install pysubs2
$ pysubs2 --shift 0.3s *.srt
$ pysubs2 --to srt *.ass
.. code:: 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": "",
"docs_url": "https://pythonhosted.org/pysubs2/",
"requires_python": ">=3.7",
"maintainer_email": "",
"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/22/3e/fb1b08a06144ba63f19cc4758dd72e2eb8c7fc95c6c8364faccfc570c7bf/pysubs2-1.6.1.tar.gz",
"platform": null,
"description": "pysubs2\n=======\n\n\n.. image:: https://img.shields.io/github/actions/workflow/status/tkarabela/pysubs2/main.yml?branch=master\n :alt: pysubs2 build master branch\n :target: https://github.com/tkarabela/pysubs2/actions\n.. image:: https://img.shields.io/codecov/c/github/tkarabela/pysubs2\n :alt: pysubs2 test code coverage\n :target: https://app.codecov.io/github/tkarabela/pysubs2\n.. image:: http://www.mypy-lang.org/static/mypy_badge.svg\n :alt: MyPy checked\n :target: https://github.com/tkarabela/pysubs2/actions\n.. image:: https://img.shields.io/pypi/v/pysubs2.svg?style=flat-square\n :alt: PyPI - Version\n :target: https://pypi.org/project/pysubs2/\n.. image:: https://img.shields.io/pypi/status/pysubs2.svg?style=flat-square\n :alt: PyPI - Status\n :target: https://pypi.org/project/pysubs2/\n.. image:: https://img.shields.io/pypi/pyversions/pysubs2.svg?style=flat-square\n :alt: PyPI - Python Version\n :target: https://pypi.org/project/pysubs2/\n.. image:: https://img.shields.io/pypi/l/pysubs2.svg?style=flat-square\n :alt: PyPI - License\n :target: LICENSE.txt\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* and *WebVTT* formats and *OpenAI Whisper* captions.\n\nThere is a small CLI tool for batch conversion and retiming.\n\n.. code:: bash\n\n $ pip install pysubs2\n $ pysubs2 --shift 0.3s *.srt\n $ pysubs2 --to srt *.ass\n\n.. code:: python\n\n import pysubs2\n subs = pysubs2.load(\"my_subtitles.ass\", encoding=\"utf-8\")\n subs.shift(s=2.5)\n for line in subs:\n line.text = \"{\\\\be1}\" + line.text\n subs.save(\"my_subtitles_edited.ass\")\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.6.1",
"split_keywords": [
"substation",
"subrip",
"microdvd",
"mpl2",
"webvtt",
"ass",
"srt",
"sub",
"vtt",
"subtitles",
"captions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4fdcdc1763a3abab92af2253b1abb3dd48e07b2a3613d7ae64a3ab5c27da3019",
"md5": "5d904002f86c13d71354c866be1370ca",
"sha256": "1f96d9dfb5f859a54a00e04621beb20ff21ea1d788821b2f4935c5c0ef8dc68e"
},
"downloads": -1,
"filename": "pysubs2-1.6.1-py3-none-any.whl",
"has_sig": true,
"md5_digest": "5d904002f86c13d71354c866be1370ca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 35131,
"upload_time": "2023-04-02T14:18:57",
"upload_time_iso_8601": "2023-04-02T14:18:57.531479Z",
"url": "https://files.pythonhosted.org/packages/4f/dc/dc1763a3abab92af2253b1abb3dd48e07b2a3613d7ae64a3ab5c27da3019/pysubs2-1.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "223efb1b08a06144ba63f19cc4758dd72e2eb8c7fc95c6c8364faccfc570c7bf",
"md5": "ec8f6be231ff86ff323aa898486e3105",
"sha256": "0261611e71735ff7763972c519c72593c8063efcb9039c54af65f31b81cec116"
},
"downloads": -1,
"filename": "pysubs2-1.6.1.tar.gz",
"has_sig": true,
"md5_digest": "ec8f6be231ff86ff323aa898486e3105",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 42522,
"upload_time": "2023-04-02T14:19:00",
"upload_time_iso_8601": "2023-04-02T14:19:00.458876Z",
"url": "https://files.pythonhosted.org/packages/22/3e/fb1b08a06144ba63f19cc4758dd72e2eb8c7fc95c6c8364faccfc570c7bf/pysubs2-1.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-02 14:19:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "tkarabela",
"github_project": "pysubs2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pysubs2"
}