Revert "cleaner json... i think"
This reverts commit 69f687790590d5cfeef8b28658687dddf42307aa.
This commit is contained in:
parent
69f6877905
commit
35c802bf7a
19
ocr.sh
19
ocr.sh
@ -17,8 +17,23 @@ 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='{"Amount":"$amount","Currency":"$currency","Date":"$date $time","From":"$from","referece":"$referece","Remarks":"$remarks","Status":"$status","To":{"Account":"$to_number","Name":"$to_name"}}'
|
||||
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
|
||||
)
|
||||
|
||||
echo $json #| jq
|
||||
echo $json | jq
|
||||
#echo $raw_text
|
||||
#tesseract $INPUT_IMAGE stdout --psm 6
|
||||
|
Loading…
x
Reference in New Issue
Block a user