Skip to main content

Convert WebVTT to JSON, optionally removing duplicate lines

Project description

webvtt-to-json

PyPI Changelog Tests License

Convert WebVTT to JSON, optionally removing duplicate lines

Installation

Install this tool using pip:

pip install webvtt-to-json

Usage

To output JSON for a WebVTT file:

webvtt-to-json subtitles.vtt

This will output to standard output. Use -o filename to send it to a specified file.

Subtitles can often include duplicate lines. Add -d or --dedupe to attempt to remove those duplicates from the output:

webvtt-to-json --dedupe subtitles.vtt

You can also use:

python -m webvtt_to_json ...

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd webvtt-to-json
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

webvtt-to-json-0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

webvtt_to_json-0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file webvtt-to-json-0.1.tar.gz.

File metadata

  • Download URL: webvtt-to-json-0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for webvtt-to-json-0.1.tar.gz
Algorithm Hash digest
SHA256 46c7ffc51cf663c08bcf5a981002fcdb88d911633fb2a6182dcc81e5855b825d
MD5 d7352fb93179104e0783ee20429163db
BLAKE2b-256 dc157c58354be858658d3addd45d869937bd4cde0476d0a57a063e3d93b38bb9

See more details on using hashes here.

File details

Details for the file webvtt_to_json-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for webvtt_to_json-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35ee4c28ed4e58603c9c962df10a68e0c8ec932ea03f3a8681eca584318ade7a
MD5 b489dcf9d8c2d30c01c485717c90c66e
BLAKE2b-256 07d12f84a6d7dbc945be0483571ebeda5d748a172a1d122903e8d68f963c4884

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