pyasstosrt
=================================================================================================================================================================================
[![alt text](https://img.shields.io/pypi/v/pyasstosrt.svg?style=flat)](https://pypi.org/project/pyasstosrt/) [![Downloads](https://pepy.tech/badge/pyasstosrt)](https://pepy.tech/project/pyasstosrt) [![Coverage Status](https://coveralls.io/repos/github/GitBib/pyasstosrt/badge.svg)](https://coveralls.io/github/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": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "ASS subtitle,SRT,Convert",
"author": "GitBib",
"author_email": "me@bnff.website",
"download_url": "https://files.pythonhosted.org/packages/5e/f0/49be1e3838d45c7b84ea751320a422c3585d84035ba027408d7fba904e3a/pyasstosrt-1.4.0.tar.gz",
"platform": null,
"description": "pyasstosrt\n=================================================================================================================================================================================\n\n[![alt text](https://img.shields.io/pypi/v/pyasstosrt.svg?style=flat)](https://pypi.org/project/pyasstosrt/) [![Downloads](https://pepy.tech/badge/pyasstosrt)](https://pepy.tech/project/pyasstosrt) [![Coverage Status](https://coveralls.io/repos/github/GitBib/pyasstosrt/badge.svg)](https://coveralls.io/github/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.0",
"split_keywords": [
"ass subtitle",
"srt",
"convert"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8490bb6e4e8155f3da30fa3a953afccd1194628c4072b651e89d2040b7aaeeda",
"md5": "95a92ccd0084935a5727d15530741293",
"sha256": "77ee51872eab846492586a6d0876e8a4e76d4fe1c97acb7a4fcf158bb88914d2"
},
"downloads": -1,
"filename": "pyasstosrt-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "95a92ccd0084935a5727d15530741293",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 9392,
"upload_time": "2023-03-19T17:14:16",
"upload_time_iso_8601": "2023-03-19T17:14:16.946599Z",
"url": "https://files.pythonhosted.org/packages/84/90/bb6e4e8155f3da30fa3a953afccd1194628c4072b651e89d2040b7aaeeda/pyasstosrt-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5ef049be1e3838d45c7b84ea751320a422c3585d84035ba027408d7fba904e3a",
"md5": "35768c11c65cfac6b96f46883fe23775",
"sha256": "e9d5daa013538d12dcbc8ace9a2ec3f87adc5dde9a8349c4b2e5bd33644fe1c3"
},
"downloads": -1,
"filename": "pyasstosrt-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "35768c11c65cfac6b96f46883fe23775",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 8869,
"upload_time": "2023-03-19T17:14:18",
"upload_time_iso_8601": "2023-03-19T17:14:18.616277Z",
"url": "https://files.pythonhosted.org/packages/5e/f0/49be1e3838d45c7b84ea751320a422c3585d84035ba027408d7fba904e3a/pyasstosrt-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-19 17:14:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "GitBib",
"github_project": "pyasstosrt",
"travis_ci": true,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "fire",
"specs": [
[
"==",
"0.4.0"
]
]
},
{
"name": "pyfiglet",
"specs": []
}
],
"tox": true,
"lcname": "pyasstosrt"
}