Record visible controls and document text in the previous release

This commit is contained in:
Codex
2026-11-30 15:02:39 +01:00
parent cb99f7a153
commit 512f166bb6
2 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ swaymsg 'seat seat0 cursor release button1'
sleep .5
printf 'preexisting external contents' | wl-copy
grim /tmp/document-scene.png
tesseract /tmp/document-scene.png stdout tsv 2>/dev/null > /tmp/ocr.tsv
awk -F '\t' '$12 == "outbound" {print}' /tmp/ocr.tsv
tesseract /tmp/document-scene.png stdout --psm 11 tsv 2>/dev/null > /tmp/ocr.tsv
awk -F '\t' '$12 != "" {print $7,$8,$12}' /tmp/ocr.tsv | tail -80
read -r tx ty < <(awk -F '\t' '$12 == "outbound" {print int($7+$9/2),int($8+$10/2);exit}' /tmp/ocr.tsv)
swaymsg "seat seat0 cursor set $tx $ty"
for press in 1 2; do
@@ -25,3 +25,12 @@ jobs:
flatpak --user install -y "$RUNNER_TEMP"/bundle/*.flatpak
- name: Copy document text to another app and paste into Find
run: dbus-run-session -- bash .github/qa/flatpak-clipboard.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshot-and-ocr
path: |
/tmp/document-scene.png
/tmp/ocr.tsv
if-no-files-found: ignore