mirror of
https://github.com/wader/fq.git
synced 2024-12-28 08:02:28 +03:00
1b32b42f93
Generate more code More generic and comfortable API Improve and Update format decoder to new API Add some more format tests
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
$ fq -ni
|
|
null> 123 | var("a")
|
|
null> "bb" | var("bb")
|
|
null> var
|
|
{
|
|
"a": 123,
|
|
"bb": "bb"
|
|
}
|
|
null> $a
|
|
123
|
|
null> "aa" | var("a")
|
|
null> var
|
|
{
|
|
"a": "aa",
|
|
"bb": "bb"
|
|
}
|
|
null> $a
|
|
"aa"
|
|
null> var("a"; empty)
|
|
null> $a
|
|
error: repl:1:0: variable not defined: $a
|
|
null> var
|
|
{
|
|
"bb": "bb"
|
|
}
|
|
null> . | repl
|
|
> null> $bb
|
|
"bb"
|
|
> null> ^D
|
|
null> var("bb"; empty)
|
|
null> var
|
|
{}
|
|
null> 123 | var("a b")
|
|
error: invalid variable name: a b
|
|
null> 123 | var(null)
|
|
error: invalid variable name: null
|
|
null> ^D
|
|
$ fq -d mp3 -i . /test.mp3
|
|
mp3> .frames[0] | var("f")
|
|
mp3> $f
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0]: {} (mp3_frame)
|
|
0x20| ff fb 40| ..@| header: {}
|
|
0x30|c0 |. |
|
|
0x30| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ...............| side_info: {}
|
|
0x40|00 00 |.. |
|
|
0x40| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| xing: {} (xing)
|
|
0x50|02 57 00 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6|.W..............|
|
|
* |until 0xdd.7 (156) | |
|
|
0xd0| 00 00| ..| padding: raw bits
|
|
0xe0|00 00 00 |... |
|
|
| | | crc_calculated: "827a" (raw bits)
|
|
mp3> ^D
|