cleaner json... i think
This commit is contained in:
parent
f9ef381c90
commit
69f6877905
19
ocr.sh
19
ocr.sh
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user