Convert WebVTT to JSON, optionally removing duplicate lines
Project description
webvtt-to-json
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
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
webvtt-to-json-0.1.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for webvtt_to_json-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35ee4c28ed4e58603c9c962df10a68e0c8ec932ea03f3a8681eca584318ade7a |
|
MD5 | b489dcf9d8c2d30c01c485717c90c66e |
|
BLAKE2b-256 | 07d12f84a6d7dbc945be0483571ebeda5d748a172a1d122903e8d68f963c4884 |