ttml-to-json
Convert TTML to JSON
Installation
Install this tool using pip:
pip install ttml-to-json
Usage
To output JSON for a TTML file:
ttml-to-json subtitles.ttml
This will output to standard output. Use -o filename to send it to a specified file.
Use -s or --single to output single "line" keys instead of a "lines" array.
You can also use:
python -m ttml_to_json ...
Output
Regular output:
[
{
"start": "00:00:00.000",
"end": "00:00:04.560",
"lines": ["my career in side projects and open"]
}
]
-s or --single output:
[
{
"start": "00:00:00.000",
"end": "00:00:04.560",
"line": "my career in side projects and open"
}
]
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd ttml-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
Release files for ttml-to-json 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ttml-to-json-0.2.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ttml_to_json-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / ttml-to-json-0.2.tar.gz
| Download URL | ttml-to-json-0.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
acb771b12bed29367c3201dc7cfd9d297effe2671f286c3145c2965248701377
|
|
BLAKE2b-256 checksum How to use checksums |
ff7768a9396b0a06f87ab1bb57c2fcd2f9f80a6df3cd7e2460174b0629587903
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / ttml_to_json-0.2-py3-none-any.whl
| Download URL | ttml_to_json-0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aad6e960f9e387009181f7cc93dcc860b94d7f98a110bc5183ae0b2fb2546117
|
|
BLAKE2b-256 checksum How to use checksums |
4a1f25f73a1ec91e7c14d6eb375fc165d75c603c51f7418677094cffb1238aff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|