I found out how to do OCR for Portuguese.
In the example, the results are displayed on the screen, but you can also export the results to a file or write a script to run it from MacroDroid via Termux:Tasker.
If the folder where the screenshots are stored is DCIM or in another language, please be creative.
1.Install Termux from F-Droid
2.apt update
3.apt upgrade
4.pkg install tesseract
5.termux-setup-storage
6.Download language files from https://github.com/tesseract-ocr/tessdata_best (por.traineddata)
7.cd ~/storage/downloads
8.cp por.traineddata /data/data/com.termux/files/usr/share/tessdata
9.cd
10.Take a screenshot
11.tesseract ~/storage/pictures/Screenshots/Screenshot_20230614-193424.png stdout -l por+eng
(if the file name is Screenshot_20230614-193424.png)
In the example, the results are displayed on the screen, but you can also export the results to a file or write a script to run it from MacroDroid via Termux:Tasker.
If the folder where the screenshots are stored is DCIM or in another language, please be creative.
1.Install Termux from F-Droid
2.apt update
3.apt upgrade
4.pkg install tesseract
5.termux-setup-storage
6.Download language files from https://github.com/tesseract-ocr/tessdata_best (por.traineddata)
7.cd ~/storage/downloads
8.cp por.traineddata /data/data/com.termux/files/usr/share/tessdata
9.cd
10.Take a screenshot
11.tesseract ~/storage/pictures/Screenshots/Screenshot_20230614-193424.png stdout -l por+eng
(if the file name is Screenshot_20230614-193424.png)