RE: https://vozer.cafe/@vozercozer/116251272663944954
fuck, does anyone here know japanese?
RE: https://vozer.cafe/@vozercozer/116251272663944954
fuck, does anyone here know japanese?
local LAST_TEXT=""
# The current text we're working on.
local WORK_TEXT=""
while true ; do
mplayer tv:// -msglevel all=-1 -ao null -vo png:prefix=tesseract_ -frames 1 -tv driver=v4l2:width=1280:height=720
CURRENT_TEXT=$(convert tesseract_00000001.png -monochrome - | tesseract -l deu - - | sed -e '/^.{,5}$/d')
if [ "$LAST_TEXT" != "$CURRENT_TEXT" ] ; then
LAST_TEXT="$CURRENT_TEXT"
elif [ "$WORK_TEXT" != "$CURRENT_TEXT" ] ; then
echo "Work text reset"
WORK_TEXT="$CURRENT_TEXT"
echo "$CURRENT_TEXT" >> work.txt
else
echo -ne .
fi
done 2>/dev/null
You'll probably need to change some stuff. It checks the screen in a loop, and if the result is the same it won't print it again. sed -e '/^.{,5}$/d' was to remove some garbage lines but you'll probably need something different. I was using this to read German text in Mario & Luigi Brothership. You'd need to replace deu with jpn I think
@vozercozer based off my shitty knowledge from songs and anime this reads something like:
twin brothers
It's a gentle boy!
And then presumably you get to name it