2022-05-21 20:33:52 +03:00
|
|
|
$ fq -i -d mp3 . test.mp3
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | ., tovalue, toactual, tosym, type, length?
|
2022-05-20 13:38:43 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2023-03-05 21:23:44 +03:00
|
|
|
0x0|49 44 33 |ID3 |.headers[0].header.magic: "ID3" (valid)
|
2021-08-12 00:51:00 +03:00
|
|
|
"ID3"
|
2022-09-25 17:58:31 +03:00
|
|
|
"ID3"
|
|
|
|
null
|
2020-06-08 03:29:51 +03:00
|
|
|
"string"
|
|
|
|
3
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[0] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"I"
|
|
|
|
"string"
|
|
|
|
1
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[-1000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
""
|
|
|
|
"string"
|
|
|
|
0
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[1000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
""
|
|
|
|
"string"
|
|
|
|
0
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[1:3] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"D3"
|
|
|
|
"string"
|
|
|
|
2
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[0:-1] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"ID"
|
|
|
|
"string"
|
|
|
|
2
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[-1000:2000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"ID3"
|
|
|
|
"string"
|
|
|
|
3
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic["test"] | ., type, length?
|
2023-09-02 21:07:52 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> [.headers[0].header.magic[]] | type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot iterate over: string
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | keys
|
2020-06-08 03:29:51 +03:00
|
|
|
error: keys cannot be applied to: string
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | has("a")
|
2020-06-08 03:29:51 +03:00
|
|
|
error: has cannot be applied to: string
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | has(0)
|
2020-06-08 03:29:51 +03:00
|
|
|
error: has cannot be applied to: string
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | type
|
2020-06-08 03:29:51 +03:00
|
|
|
"string"
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | tonumber
|
2020-06-08 03:29:51 +03:00
|
|
|
error: invalid number: "ID3"
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | tostring
|
2020-06-08 03:29:51 +03:00
|
|
|
"ID3"
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic + ""
|
2020-06-08 03:29:51 +03:00
|
|
|
"ID3"
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic + 1
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot add: string ("ID3") and number (1)
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._start | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
|
|
|
"number"
|
|
|
|
0
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._stop | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
24
|
|
|
|
"number"
|
|
|
|
24
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._len | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
24
|
|
|
|
"number"
|
|
|
|
24
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._name | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"magic"
|
|
|
|
"string"
|
|
|
|
5
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._actual | ., type, length?
|
2022-09-25 17:58:31 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2023-03-05 21:23:44 +03:00
|
|
|
0x0|49 44 33 |ID3 |.headers[0].header.magic: "ID3" (valid)
|
2022-09-25 17:58:31 +03:00
|
|
|
"string"
|
|
|
|
3
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._sym | ., type, length?
|
2022-09-25 17:58:31 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2023-03-05 21:23:44 +03:00
|
|
|
0x0|49 44 33 |ID3 |.headers[0].header.magic: "ID3" (valid)
|
2021-11-05 19:24:49 +03:00
|
|
|
"null"
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._description | ., type, length?
|
2021-11-05 17:04:26 +03:00
|
|
|
"valid"
|
2020-06-08 03:29:51 +03:00
|
|
|
"string"
|
2021-11-05 17:04:26 +03:00
|
|
|
5
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._path | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
"headers",
|
|
|
|
0,
|
2023-03-05 21:23:44 +03:00
|
|
|
"header",
|
2020-06-08 03:29:51 +03:00
|
|
|
"magic"
|
|
|
|
]
|
|
|
|
"array"
|
2023-03-05 21:23:44 +03:00
|
|
|
4
|
|
|
|
mp3> .headers[0].header.magic._bits | ., type, length?
|
2022-05-20 13:38:43 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2023-10-20 16:08:14 +03:00
|
|
|
0x0|49 44 33 |ID3 |.: raw bits 0x0-0x3 (3)
|
2022-07-26 16:50:18 +03:00
|
|
|
"string"
|
2020-06-08 03:29:51 +03:00
|
|
|
24
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._bytes | ., type, length?
|
2022-05-20 13:38:43 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2023-10-20 16:08:14 +03:00
|
|
|
0x0|49 44 33 |ID3 |.: raw bits 0x0-0x3 (3)
|
2022-07-26 16:50:18 +03:00
|
|
|
"string"
|
2020-06-08 03:29:51 +03:00
|
|
|
3
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._error | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic._gap | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
false
|
|
|
|
"boolean"
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic.a = 1
|
2023-08-08 13:09:29 +03:00
|
|
|
error: setpath(["headers",0,"header","ma ...]; 1) cannot be applied to {"footers":[],"frames":[{" ...: expected an object but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[0] = 1
|
2023-08-08 13:09:29 +03:00
|
|
|
error: setpath(["headers",0,"header","ma ...]; 1) cannot be applied to {"footers":[],"frames":[{" ...: expected an array but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic.a |= empty
|
2023-09-02 21:07:52 +03:00
|
|
|
error: delpaths([["headers",0,"header","m ...]) cannot be applied to {"footers":[],"frames":[{" ...: expected an object but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic[0] |= empty
|
2023-08-08 13:09:29 +03:00
|
|
|
error: delpaths([["headers",0,"header","m ...]) cannot be applied to {"footers":[],"frames":[{" ...: expected an array but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | setpath(["a"]; 1)
|
2023-08-08 13:09:29 +03:00
|
|
|
error: setpath(["a"]; 1) cannot be applied to "ID3": expected an object but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | setpath([0]; 1)
|
2023-08-08 13:09:29 +03:00
|
|
|
error: setpath([0]; 1) cannot be applied to "ID3": expected an array but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | delpaths([["a"]])
|
2023-08-08 13:09:29 +03:00
|
|
|
error: delpaths([["a"]]) cannot be applied to "ID3": expected an object but got: string ("ID3")
|
2023-03-05 21:23:44 +03:00
|
|
|
mp3> .headers[0].header.magic | delpaths([[0]])
|
2023-08-08 13:09:29 +03:00
|
|
|
error: delpaths([[0]]) cannot be applied to "ID3": expected an array but got: string ("ID3")
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> ^D
|