mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2025-12-05 14:53:38 -08:00
add scripts
This commit is contained in:
15
projects/scripts/ocr.sh
Executable file
15
projects/scripts/ocr.sh
Executable 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"
|
||||
Reference in New Issue
Block a user