cleaner json... i think

This commit is contained in:
Shihaam Abdul Rahman 2024-08-03 02:21:32 +05:00
parent f9ef381c90
commit 69f6877905
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

19
ocr.sh
View File

@ -17,23 +17,8 @@ remarks=$(echo "$raw_text" | grep Remarks | sed 's/Remarks //')
from=$(echo "$raw_text" | grep From | sed 's/From //')
to_name=$(echo "$raw_text"| grep -B1 $to_number | grep -v $to_number)
json=$(cat <<EOF
{
"Amount": "$amount",
"Currency": "$currency",
"Date": "$date $time",
"From": "$from",
"referece": "$referece",
"Remarks": "$remarks",
"Status": "$status",
"To": {
"Account": "$to_number",
"Name": "$to_name"
}
}
EOF
)
json='{"Amount":"$amount","Currency":"$currency","Date":"$date $time","From":"$from","referece":"$referece","Remarks":"$remarks","Status":"$status","To":{"Account":"$to_number","Name":"$to_name"}}'
echo $json | jq
echo $json #| jq
#echo $raw_text
#tesseract $INPUT_IMAGE stdout --psm 6