# Haptic JSON Converter **Repository Path**: butterls/haptic-json-converter ## Basic Information - **Project Name**: Haptic JSON Converter - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-29 - **Last Updated**: 2024-06-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Introduction This is a python script to convert between OH Haptic JSON and HE Haptic JSON formats. ## Requirements - Python 3.8+ - `pip3 install jsonschema` if needed ## Usage ``` usage: converter.py [-h] [-o OUTPUT] -f {oh,he_v1,he_v2} [-s SCHEMA_DIR] [-v] input Convert between OH Haptic JSON and HE Haptic JSON formats. positional arguments: input Path to the input JSON file or directory. options: -h, --help show this help message and exit -o OUTPUT, --output OUTPUT Path to the output directory (default: input directory with '_out' suffix). -f {oh,he_v1,he_v2}, --format {oh,he_v1,he_v2} Target format: 'oh', 'he_v1', or 'he_v2'. -s SCHEMA_DIR, --schema_dir SCHEMA_DIR Directory containing JSON schema files (default: 'schemas'). -v, --version_suffix Include version suffix ('_v1' or '_v2') in output HE file names. ``` ## Run command example convert oh to he_v2 ``` ./converter.py ../tests/test_data/oh_sample.json -o output_dir -f he_v2 ``` ## Test command example TODO: need add proper test cases to pass all the test ``` python3 -m unittest discover -s tests ```