Metadata-Version: 2.1
Name: pyasstosrt
Version: 1.4.0
Summary: Convert ASS subtitle to SRT format
Home-page: https://github.com/GitBib/pyasstosrt
License: Apache License, Version 2.0, see LICENSE file
Keywords: ASS subtitle,SRT,Convert
Author: GitBib
Author-email: me@bnff.website
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Provides-Extra: cli
Requires-Dist: fire (>=0.3.1) ; extra == "cli"
Requires-Dist: pyfiglet ; extra == "cli"
Project-URL: Repository, https://github.com/GitBib/pyasstosrt
Description-Content-Type: text/markdown

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.

