pyasstosrt


Namepyasstosrt JSON
Version 1.4.1 PyPI version JSON
download
home_pagehttps://github.com/GitBib/pyasstosrt
SummaryConvert ASS subtitle to SRT format
upload_time2024-09-01 20:17:50
maintainerNone
docs_urlNone
authorGitBib
requires_python<4,>=3.8
licenseApache License, Version 2.0, see LICENSE file
keywords ass subtitle srt convert
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pyasstosrt
=================================================================================================================================================================================

[![Downloads](https://pepy.tech/badge/pyasstosrt)](https://pepy.tech/project/pyasstosrt) [![codecov](https://codecov.io/gh/GitBib/pyasstosrt/branch/master/graph/badge.svg?token=VGTJ3NYHOV)](https://codecov.io/gh/GitBib/pyasstosrt)

**pyasstosrt** – this tool will help you convert Advanced SubStation Alpha (ASS/SSA) subtitle files to SubRip (SRT) files.

Support for str path:
```python
from pyasstosrt import Subtitle

sub = Subtitle('sub.ass')
sub.export()
```

Support for all Path-like objects, instead of only pathlib's Path:

```python
from pathlib import Path

from pyasstosrt import Subtitle

path = Path('sub.ass')
sub = Subtitle(path)
sub.export()
```

You can get a sheet with dialogue by specifying output_dialogues.

```python
from pathlib import Path

from pyasstosrt import Subtitle

path = Path('sub.ass')
sub = Subtitle(path)
sub.export(output_dialogues=True)
```

If you want to remove effects from text, you can use the removing_effects.

```python
from pyasstosrt import Subtitle

sub = Subtitle('sub.ass', removing_effects=True)
sub.export()
```

You can enable the deletion of duplicate lines with the rearrangement of start and end times.

```python
from pyasstosrt import Subtitle

sub = Subtitle('sub.ass', remove_duplicates=True)
sub.export()
```
CLI
------------
```bash
pyasstosrt --filepath=/Users/user/sub/sub.ass export
```

**Optional** You can specify an export folder.
```bash
pyasstosrt --filepath=/Users/user/sub/sub.ass export /Users/user/sub/srt
```

**Optional** If you want to remove effects from text, you can use the --removing_effects flag.
```bash
pyasstosrt --filepath=/Users/user/sub/sub.ass --removing_effects=True export /Users/user/sub/srt
```
Installation
------------
Most users will want to simply install the latest version, hosted on PyPI:

    $ pip install 'pyasstosrt[cli]'

If you just want to use it as a library and don't need the CLI, you can omit the `[cli]` extra.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GitBib/pyasstosrt",
    "name": "pyasstosrt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "ASS subtitle, SRT, Convert",
    "author": "GitBib",
    "author_email": "me@bnff.website",
    "download_url": "https://files.pythonhosted.org/packages/b9/32/1bb2913220571be926adb857fb563431ff6bceeee7a7dde100e86ce33f14/pyasstosrt-1.4.1.tar.gz",
    "platform": null,
    "description": "pyasstosrt\n=================================================================================================================================================================================\n\n[![Downloads](https://pepy.tech/badge/pyasstosrt)](https://pepy.tech/project/pyasstosrt) [![codecov](https://codecov.io/gh/GitBib/pyasstosrt/branch/master/graph/badge.svg?token=VGTJ3NYHOV)](https://codecov.io/gh/GitBib/pyasstosrt)\n\n**pyasstosrt** \u2013 this tool will help you convert Advanced SubStation Alpha (ASS/SSA) subtitle files to SubRip (SRT) files.\n\nSupport for str path:\n```python\nfrom pyasstosrt import Subtitle\n\nsub = Subtitle('sub.ass')\nsub.export()\n```\n\nSupport for all Path-like objects, instead of only pathlib's Path:\n\n```python\nfrom pathlib import Path\n\nfrom pyasstosrt import Subtitle\n\npath = Path('sub.ass')\nsub = Subtitle(path)\nsub.export()\n```\n\nYou can get a sheet with dialogue by specifying output_dialogues.\n\n```python\nfrom pathlib import Path\n\nfrom pyasstosrt import Subtitle\n\npath = Path('sub.ass')\nsub = Subtitle(path)\nsub.export(output_dialogues=True)\n```\n\nIf you want to remove effects from text, you can use the removing_effects.\n\n```python\nfrom pyasstosrt import Subtitle\n\nsub = Subtitle('sub.ass', removing_effects=True)\nsub.export()\n```\n\nYou can enable the deletion of duplicate lines with the rearrangement of start and end times.\n\n```python\nfrom pyasstosrt import Subtitle\n\nsub = Subtitle('sub.ass', remove_duplicates=True)\nsub.export()\n```\nCLI\n------------\n```bash\npyasstosrt --filepath=/Users/user/sub/sub.ass export\n```\n\n**Optional** You can specify an export folder.\n```bash\npyasstosrt --filepath=/Users/user/sub/sub.ass export /Users/user/sub/srt\n```\n\n**Optional** If you want to remove effects from text, you can use the --removing_effects flag.\n```bash\npyasstosrt --filepath=/Users/user/sub/sub.ass --removing_effects=True export /Users/user/sub/srt\n```\nInstallation\n------------\nMost users will want to simply install the latest version, hosted on PyPI:\n\n    $ pip install 'pyasstosrt[cli]'\n\nIf you just want to use it as a library and don't need the CLI, you can omit the `[cli]` extra.\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0, see LICENSE file",
    "summary": "Convert ASS subtitle to SRT format",
    "version": "1.4.1",
    "project_urls": {
        "Homepage": "https://github.com/GitBib/pyasstosrt",
        "Repository": "https://github.com/GitBib/pyasstosrt"
    },
    "split_keywords": [
        "ass subtitle",
        " srt",
        " convert"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dad78b8ffce5deb12e63d6a1d002a1b6d8ba29d18635186e6fc453f1c91780a6",
                "md5": "b135530411e1ab40da0b66acd869652c",
                "sha256": "1394544ceef60e4f16a2e4eab9710417763ac955ae7450d07e36fe57d4e5cb62"
            },
            "downloads": -1,
            "filename": "pyasstosrt-1.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b135530411e1ab40da0b66acd869652c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 10919,
            "upload_time": "2024-09-01T20:17:49",
            "upload_time_iso_8601": "2024-09-01T20:17:49.721834Z",
            "url": "https://files.pythonhosted.org/packages/da/d7/8b8ffce5deb12e63d6a1d002a1b6d8ba29d18635186e6fc453f1c91780a6/pyasstosrt-1.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9321bb2913220571be926adb857fb563431ff6bceeee7a7dde100e86ce33f14",
                "md5": "32fb827fd5b5c6cdffcdd5de977aed93",
                "sha256": "e3dea611acf291f3525b0237b3ae4e4548c08d79d6bfa002855ca3e7aa2e8da4"
            },
            "downloads": -1,
            "filename": "pyasstosrt-1.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "32fb827fd5b5c6cdffcdd5de977aed93",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 9775,
            "upload_time": "2024-09-01T20:17:50",
            "upload_time_iso_8601": "2024-09-01T20:17:50.667406Z",
            "url": "https://files.pythonhosted.org/packages/b9/32/1bb2913220571be926adb857fb563431ff6bceeee7a7dde100e86ce33f14/pyasstosrt-1.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-01 20:17:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GitBib",
    "github_project": "pyasstosrt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyasstosrt"
}
        
Elapsed time: 0.91439s