mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-12-04 19:42:12 -05:00
Record visible controls and document text in the previous release
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user