File: json_to_image.sh

package info (click to toggle)
openvlbi 3.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,524 kB
  • sloc: ansic: 21,182; cpp: 4,119; sh: 141; makefile: 5
file content (11 lines) | stat: -rwxr-xr-x 257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

(( $# < 2 )) && exit

json=$1
image=$2

response=$(vlbi_server_json -t 4 -v -f "$json")
buffer=$(echo $response | jq .model.buffer | tr -d '"')
format=$(echo $response | jq .model.format | tr -d '"')
echo $buffer | base64 -d > "$image.$format"