Skip to content

Instantly share code, notes, and snippets.

@trickkiste
Created November 27, 2018 01:37
Show Gist options
  • Save trickkiste/368ab8a58bd618744be826c5ceda999a to your computer and use it in GitHub Desktop.
Save trickkiste/368ab8a58bd618744be826c5ceda999a to your computer and use it in GitHub Desktop.
#!/usr/bin/awk -f
BEGIN {
FS=" *\" *";
ORS="";
OFS="";
print "{\"payload\":["
}
\
(NR>2) { printf "%s\
\"index\":\"%s\",\
\"filename\":\"%s\",\
\"in\":\"%s\",\
\"out\":\"%s\",\
\"length\":\"%s\",\
\"calculated_length\":\"%s\",\
\"fps\":\"%f\"", sep, $1, $2, $3, $4, $5, $6, $7; sep="],["}\
\
END{ print "]}\n" }
fflush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment