add scripts

This commit is contained in:
2025-05-03 23:07:18 -07:00
parent 5cff20c839
commit 773f468b37
20 changed files with 1081 additions and 0 deletions

15
projects/scripts/ocr.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -Eeuo pipefail
# RES="$(slurp | grim -g - - | gazou | sed '1d;$d')"
# # Truncate RES for display if it's longer than 100 characters
# DISPLAY_RES="${RES:0:100}"
# if [ ${#RES} -gt 100 ]; then
# DISPLAY_RES="${DISPLAY_RES}..."
# fi
# notify-send "GAZOU" "Text: $DISPLAY_RES"
# echo "$RES" | wl-copy
slurp | grim -g - /tmp/ocr.png || exit 1
transformers_ocr recognize --image-path /tmp/ocr.png || exit 1
notify-send "tramsformers_ocr" "Text: $DISPLAY_RES"