1## Introduction 2 3This is a python script to convert between OH Haptic JSON and HE Haptic JSON formats. 4 5## Requirements 6 7- Python 3.8+ 8- `pip3 install jsonschema` if needed 9 10## Usage 11``` 12usage: converter.py [-h] [-o OUTPUT] -f {oh,he_v1,he_v2} [-s SCHEMA_DIR] [-v] input 13 14Convert between OH Haptic JSON and HE Haptic JSON formats. 15 16positional arguments: 17 input Path to the input JSON file or directory. 18 19options: 20 -h, --help show this help message and exit 21 -o OUTPUT, --output OUTPUT 22 Path to the output directory (default: input directory with '_out' suffix). 23 -f {oh,he_v1,he_v2}, --format {oh,he_v1,he_v2} 24 Target format: 'oh', 'he_v1', or 'he_v2'. 25 -s SCHEMA_DIR, --schema_dir SCHEMA_DIR 26 Directory containing JSON schema files (default: 'schemas'). 27 -v, --version_suffix Include version suffix ('_v1' or '_v2') in output HE file names. 28 29``` 30 31 32## Run command example 33 34convert oh to he_v2 35 36``` 37./converter.py ../tests/test_data/oh_sample.json -o output_dir -f he_v2 38 39``` 40 41 42## Test command example 43 44Need add more test cases to cover corner case 45 46``` 47python3 -m unittest discover -s tests 48``` 49