added remarks
This commit is contained in:
parent
00dcaf8a2b
commit
115313ce3a
4
ocr.sh
4
ocr.sh
@ -13,6 +13,7 @@ time=$(echo "$raw_text" | grep -oE '[0-2][0-9]:[0-5][0-9]')
|
||||
currency=$(echo "$raw_text" | grep -oP '(?<=Amount\s)[A-Z]{3}')
|
||||
amount=$(echo "$raw_text" | grep -oP '(?<=Amount\s[A-Z]{3}\s)[0-9]{1,3}(?:,[0-9]{3})*(?:\.[0-9]{2})')
|
||||
status=$(echo "$raw_text" | grep -oP '(?<=Status\s)[A-Z]+')
|
||||
remarks=$(echo "$raw_text" | grep Remarks | sed 's/Remarks //')
|
||||
|
||||
json=$(cat <<EOF
|
||||
{
|
||||
@ -32,4 +33,5 @@ EOF
|
||||
)
|
||||
|
||||
echo $json | jq
|
||||
echo $raw_text
|
||||
#echo $raw_text
|
||||
tesseract $INPUT_IMAGE stdout --psm 6
|
||||
|
Loading…
x
Reference in New Issue
Block a user