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?
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)
Metadata
Release files for subtitle-parser 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| subtitle_parser-2.0.1.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| subtitle_parser-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / subtitle_parser-2.0.1.tar.gz
| Download URL | subtitle_parser-2.0.1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1215907586c6ffbdbdefd59c0ee4f35026a6dad6cf87908f3f4a70b1bb59e353
|
|
BLAKE2b-256 checksum How to use checksums |
6b4c14a7c8a089c43823562035dd6a3bd5ea633b133d6e230289fe30d10a17b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / subtitle_parser-2.0.1-py3-none-any.whl
| Download URL | subtitle_parser-2.0.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d903d6f7974ab41849491940e60e284c50c3df7f4d81cd007101e25783ea635
|
|
BLAKE2b-256 checksum How to use checksums |
650f89de0a2df2d313bf9d8a7598b5a82ba76be23670cf57b8ee813b1516629c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for subtitle-parser 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.