Metadata-Version: 2.1
Name: srt-to-vtt
Version: 1.3.0
Summary: Python package to enable easy conversion of .srt files to .vtt files.
Author-email: Joshua Hamilton <hamiltonjoshuadavid@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Joshua Hamilton
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: homepage, https://github.com/joshdavham/srt-to-vtt
Keywords: subtitle,subtitles,convert,srt,vtt,webvtt
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

[![PyPi](https://img.shields.io/pypi/v/srt-to-vtt)](https://pypi.org/project/srt-to-vtt/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# srt-to-vtt

Python package to enable easy conversion of .srt files to .vtt files.

## Install

srt-to-vtt is available on [PyPI](https://pypi.org/project/srt-to-vtt/) and you can install the latest version with
```
pip install srt-to-vtt
```

## Basic usage

```python
from srt_to_vtt import srt_to_vtt

path_to_my_srt_file = "example.srt"
path_to_converted_vtt_file = "output.vtt"

# converts example.srt into output.vtt
srt_to_vtt(path_to_my_srt_file, path_to_converted_vtt_file)

```

## Develop

Clone this repo and then, at the root, install the package in ediable mode with
```
pip install -e .
```
You can now make changes to the package source code found in `srt-to-vtt/srt_to_vtt/` and see them reflected immediately.

## Format, build, test and distribute

Before doing anything else, make sure to bump the version number under `[project]` in `pyproject.toml`. Please use [semantic versioning](https://semver.org/).



Then, install the build requirements with
```
pip install -r build_requirements.txt
```

### Format

This project adheres to the [Black](https://github.com/psf/black) code style. You can automatically refomat your code to Black by executing the following in the root directory of this repo:
```
black .
```

### Build
Then, to build, run
```
python -m build
```

### Test

After building the package, install it with

```
pip install dist/srt_to_vtt-#.#.#-py3-none-any.whl
```

You may now run any of the tests found in the `tests/` directory.

### Distribute

Assuming that all the tests are passing, the package is now ready to be released on PyPI!

Open a pull request on the main branch and, if approved and merged, the package will be automatically updated on PyPI after the next Release is published on GitHub.
