vtt to srt subtitles converter package
Project description
vtt_to_srt2
Convert vtt files to srt subtitle format
For Python 2.x you can get version for Python 3.x here
Docs
https://jsonzilla.github.io/vtt_to_srt2/
Installation
pip install vtt_to_srt2
python -m pip install vtt_to_srt2
Usage from terminal
usage: vtt_to_srt [-h] [-r] [-e ENCODING] [-rf] pathname
Convert vtt files to srt files
positional arguments:
pathname a file or directory with files to be converted
options:
-h, --help show this help message and exit
-r, --recursive walk path recursively
-e ENCODING, --encoding ENCODING
encoding format for input and output files
-rf, --remove_format remove the format tags like bold & italic from output files
Usage as a lib
Convert vtt file
from vtt_to_srt.vtt_to_srt import ConvertFile
convert_file = ConvertFile("input_utf8.vtt", "utf-8")
convert_file.convert()
Recursively convert all vtt files in directory
from vtt_to_srt.vtt_to_srt import ConvertDirectories
recursive = False
convert_file = ConvertDirectories(".", recursive, "utf-8")
convert_file.convert()
Manual build
Generate wheel
python -m pip install --upgrade setuptools wheel build
python -m build
Generate documentation
Generate documentation
python -m pip install pdoc3
pdoc --html vtt_to_srt/vtt_to_srt.py -o docs
mv docs/vtt_to_srt.html docs/index.html
rm -rm docs/vtt_to_srt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vtt_to_srt2-0.2.0.4.tar.gz
(10.6 kB
view details)
Built Distribution
File details
Details for the file vtt_to_srt2-0.2.0.4.tar.gz
.
File metadata
- Download URL: vtt_to_srt2-0.2.0.4.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6261d1f9febecbca901a71c7a205a60c34e3d9c6e088f01f558af414e50d2446 |
|
MD5 | c028e093f8e55379b6eae9262db8e7f4 |
|
BLAKE2b-256 | fca10d9635c1457d128556d0f8a12a67f78ae721874ec164b98e689eeb2c9af6 |
File details
Details for the file vtt_to_srt2-0.2.0.4-py3-none-any.whl
.
File metadata
- Download URL: vtt_to_srt2-0.2.0.4-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffa7bfd06a1afbecb0c8cb0400fbb6909eae4cf79b6abe166528605815502bf5 |
|
MD5 | caec8f5f83a0172961bc6c71219127c8 |
|
BLAKE2b-256 | 58670d563250c8e7eb3dc131d3978d502c0dfc3bf80aab4a856d32af90ce9302 |