__ _ _ ____ ___ _ _ ____ _ _
( )( \/ )/ ___) / __)/ )( \( _ \( \/ )
)( / \/ \\___ \( (__ ) __ ( ) // \/ \
(__)\_)(_/(____/ \___)\_)(_/(__\_)\_)(_/
imschrm validates IMSC documents against the IMSC Hypothetical Render Model (HRM), which constrains document complexity.
imschrm consists of a library and command line application written in pure Python, and uses ttconv.
A demo web app based on imschrm is available at https://hrm.sandflow.com/.
Install the most recent development release:
pip install imschrm --pre
imschrm <input IMSC document>
Issues are tracked at https://github.com/sandflow/imscHRM/issues.
cli.py [-h] [--itype {ttml,manifest}] input
input
: input file--itype
: specifies whether the input file is a single IMSC document (ttml
) (default) or a manifest (manifest
) containing a list of IMSC documents.
The manifest is a JSON file that conforms to the schema at src/main/resources/json/manifest.json.schema
.
EXAMPLE:
[
{
"begin": "12/24",
"end": 1,
"path": "doc001.ttml"
},
{
"begin": 1,
"end": null,
"path": "doc002.ttml"
}
]
The project uses pipenv to manage dependencies.
- run
pipenv install --dev
- set the
PYTHONPATH
environment variable tosrc/main/python
, e.g.export PYTHONPATH=src/main/python
pipenv run
can then be used
From the root directory of the project:
pipenv install --dev
mkdir build
export PYTHONPATH=src/main/python
pipenv run python src/main/python/imschrm/cli.py src/test/resources/ttml/fail001.ttml