diff --git a/patch-html.sh b/patch-html.sh new file mode 100644 index 0000000..087ef73 --- /dev/null +++ b/patch-html.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# patch-html.sh - Inject Hebrew RTL + translation into Paperclip UI +set -e + +# Find the ui-dist directory in the global npm install +UI_DIR=$(find /usr/local/lib/node_modules/paperclipai -name "ui-dist" -type d | head -1) + +if [ -z "$UI_DIR" ]; then + echo "ERROR: Could not find Paperclip ui-dist directory" + exit 1 +fi + +echo "Found ui-dist at: $UI_DIR" + +# Copy assets +cp /tmp/rtl-override.css "$UI_DIR/assets/rtl-override.css" +cp /tmp/translate-he.js "$UI_DIR/assets/translate-he.js" + +# Patch index.html: +# 1. Set dir="rtl" and lang="he" +sed -i 's/ +sed -i 's||\n\n|' "$UI_DIR/index.html" + +# 3. Update page title +sed -i 's|