srt-to-vtt
Python package to enable easy conversion of .srt files to .vtt files.
Install
srt-to-vtt is available on PyPI and you can install the latest version with
pip install srt-to-vtt
Basic usage
Import as a module within 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)
Execute from CLI
stv -i example.srt -o output.vtt
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.
Then, install the build requirements with
pip install -r build_requirements.txt
Format
This project adheres to the 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 the tests by simply executing
pytest
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.
Metadata
Release files for srt-to-vtt 1.4.0
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 | Actions |
|---|---|---|---|---|
| srt_to_vtt-1.4.0.tar.gz | 4.0 kB | Without provenance | Details for srt_to_vtt-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| srt_to_vtt-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for srt_to_vtt-1.4.0-py3-none-any.whl |
Total release size: 8.7 kB
Release files / srt_to_vtt-1.4.0.tar.gz
| Download URL | srt_to_vtt-1.4.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fb0ced6b0b536f1b1280e4150df3e9e30bd36b7f669fdf49add2b84603ef672
|
|
BLAKE2b-256 checksum How to use checksums |
c1f3e8c537c6f21f4f9d7bdc800d383957023415ab4ccf291c2e0a983e12b8fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / srt_to_vtt-1.4.0-py3-none-any.whl
| Download URL | srt_to_vtt-1.4.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c065637b79fdfcce97a6068f9625d3bcfe816f85169962214f1ff8c2ee2edc58
|
|
BLAKE2b-256 checksum How to use checksums |
c313abfa184f7993d74e40177e94122efd199d9d0e9a3b2918794988ec6c7783
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for srt-to-vtt 1.4.0
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.