Skip to main content

vtt to srt subtitles converter package

Project description

vtt_to_srt3

Convert vtt files to srt subtitle format

For Python 3.x

Docs

https://jsonzilla.github.io/vtt_to_srt3/

Installation

pip install vtt_to_srt3
python -m pip install vtt_to_srt3

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


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_srt3-0.2.0.4.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

vtt_to_srt3-0.2.0.4-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file vtt_to_srt3-0.2.0.4.tar.gz.

File metadata

  • Download URL: vtt_to_srt3-0.2.0.4.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for vtt_to_srt3-0.2.0.4.tar.gz
Algorithm Hash digest
SHA256 ed1baea5fb1010752880cb877a1ab7ba10f9d7a248c4305f456ebba2651adf61
MD5 3b73b1097e90506cfaf2f0ed820e086f
BLAKE2b-256 63c65207dbce856c59fefd9e242da4e2def68ec69a90153cc8219b0b0aad9cbd

See more details on using hashes here.

File details

Details for the file vtt_to_srt3-0.2.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for vtt_to_srt3-0.2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 75dab9b55640b4d641b942d58a37e60a327121d0826a41fc214bb922574e0cab
MD5 1c6e463da8601f5c86ea0af96cfc5870
BLAKE2b-256 7fd82930e9585f37c9afa9df817b6a3a66df0e6178734a2d38f507e9bfd40233

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page