Created
November 26, 2018 19:46
-
-
Save trickkiste/68a19e0619aa4e533d0163657210d380 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
ORS="" | |
OFS="" | |
print "{\"payload\":[" | |
} | |
/[^\s"]+|"([^"]*)"/g && (NR>2) { | |
ORS="" | |
OFS="" | |
printf "%s\"index\":\"%d\",\"filename\":\"%s\",\"in\":\"%d\",\"out\":\"%d\",\"length\":\"%d\",\"calculated_length\":\"%d\",\"fps\":\"%s\"", sep, $1, $2, $3, $4, $5, $6, $7; sep="],[" | |
} | |
END{ | |
ORS="" | |
OFS="" | |
print "]}\n" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment