Add script to generate Lens bindings

This commit is contained in:
AuroraWright
2025-03-29 06:30:47 +01:00
parent f4989a620d
commit 2378876500
2 changed files with 13 additions and 1 deletions

12
generate_lens_bindings.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: $0 <path_to_proto_files>"
exit 1
fi
PROTO_PATH="$1"
mkdir -p owocr/py_lens
protoc "--proto_path=$PROTO_PATH" --python_out=owocr/py_lens $PROTO_PATH/*.proto
sed -i '' "s/import lens_overlay/import owocr.py_lens.lens_overlay/" py_lens/*