Metadata-Version: 2.1
Name: subtitle-parser
Version: 1.2.0
Summary: Parser for SRT and WebVTT subtitle files
Home-page: https://github.com/remram44/subtitle-parser
License: MIT
Keywords: subtitle,srt,webvtt,video,text track,subrip
Author: Remi Rampin
Author-email: remi@rampin.org
Requires-Python: >=3.7,<4
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
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: Topic :: Text Processing
Classifier: Topic :: Utilities
Requires-Dist: chardet (>=4,<6)
Project-URL: Bug Tracker, https://github.com/remram44/subtitle-parser/issues
Project-URL: Repository, https://github.com/remram44/subtitle-parser
Description-Content-Type: text/markdown

subtitle-parser
===============

This is a simple Python library for parsing subtitle files in SRT or WebVTT format.

How to use stand-alone?
-----------------------

You can use this as a script to convert subtitles to HTML or CSV.

If you have installed it using `pip install subtitle-parser`, use `python3 -m subtitle_parser`. If you have cloned this repository or downloaded the file, use `python3 subtitle_parser.py`.

Examples:

```
$ python3 subtitle_parser.py --to csv Zoom_transcript.vtt --output transcript.csv
```

```
$ python3 -m subtitle_parser --to html episode.srt --input-charset iso-8859-15 --output dialogue.html
```

How to use as a library?
------------------------

```python
import subtitle_parser

with open('some_file.srt', 'r') as input_file:
    parser = subtitle_parser.SrtParser(input_file)
    parser.parse()

parser.print_warnings()

for subtitle in parser.subtitles:
    print(subtitle.text)
```

