mirror of
https://github.com/wader/fq.git
synced 2024-12-22 21:01:37 +03:00
doc: Update README a bit
This commit is contained in:
parent
69e4eea920
commit
d6d3265b34
@ -4,6 +4,12 @@ Tool, language and decoders for exploring binary data.
|
|||||||
|
|
||||||
![fq demo](doc/demo.svg)
|
![fq demo](doc/demo.svg)
|
||||||
|
|
||||||
|
In most cases it works the same way of jq but instead of reading JSON it reads binary formats into
|
||||||
|
a JSON compatbile structure. Also each value knows from which bit ranges it comes from, can have
|
||||||
|
symbolic interprestations and knows how to be presented in a useful way.
|
||||||
|
|
||||||
|
**NOTE:** fq is early in development and many things are missing, broken or do not make sense. That also means there is a great opportunity to help out.
|
||||||
|
|
||||||
## Goals
|
## Goals
|
||||||
|
|
||||||
- Make binary formats accessible and queryable.
|
- Make binary formats accessible and queryable.
|
||||||
@ -12,8 +18,6 @@ Tool, language and decoders for exploring binary data.
|
|||||||
- Bit and byte transformations and conversions.
|
- Bit and byte transformations and conversions.
|
||||||
- Programmer's calculator.
|
- Programmer's calculator.
|
||||||
|
|
||||||
**NOTE:** fq is early in development and many things are missing, broken or do not make sense. That also means there is a great opportunity to help out.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Basic usage is: `fq . file`.
|
Basic usage is: `fq . file`.
|
||||||
|
@ -99,6 +99,7 @@
|
|||||||
|
|
||||||
#### Formats
|
#### Formats
|
||||||
|
|
||||||
|
- Network protocols, pcap?
|
||||||
- Pass argument to format
|
- Pass argument to format
|
||||||
- Value decoder in jq `u(32)`, `u32`?
|
- Value decoder in jq `u(32)`, `u32`?
|
||||||
- Warnings and errors
|
- Warnings and errors
|
||||||
|
@ -11,16 +11,16 @@ s() {
|
|||||||
sh -c "${1/fq/$FQ -o unicode=true -C}"
|
sh -c "${1/fq/$FQ -o unicode=true -C}"
|
||||||
}
|
}
|
||||||
|
|
||||||
c "Overview of mp3"
|
c "Overview of mp3 file"
|
||||||
s "fq . file.mp3"
|
s "fq . file.mp3"
|
||||||
echo
|
echo
|
||||||
c "Show ID3v2 tag in mp3 file"
|
c "Show ID3v2 tag inside mp3 file"
|
||||||
s "fq '.headers[0]' file.mp3"
|
s "fq '.headers[0]' file.mp3"
|
||||||
echo
|
echo
|
||||||
c "Resolution of ID3v2 cover art"
|
c "Resolution of embedded PNG cover art"
|
||||||
s "fq '.headers[0].frames[] | select(.id == \"APIC\").picture.chunks[] | select(.type == \"IHDR\") | {width, height}' file.mp3"
|
s "fq '.headers[0].frames[] | select(.id == \"APIC\").picture.chunks[] | select(.type == \"IHDR\") | {width, height}' file.mp3"
|
||||||
echo
|
echo
|
||||||
c "Extract image file"
|
c "Extract PNG file"
|
||||||
s "fq '.headers[].frames[] | select(.id == \"APIC\")?.picture | tobits' file.mp3 >file.png"
|
s "fq '.headers[].frames[] | select(.id == \"APIC\")?.picture | tobits' file.mp3 >file.png"
|
||||||
s "file file.png"
|
s "file file.png"
|
||||||
rm -f file.png
|
rm -f file.png
|
||||||
|
70
doc/demo.svg
70
doc/demo.svg
@ -24,6 +24,10 @@
|
|||||||
<text x="112" y="0" style="fill: #ffffff">m</text>
|
<text x="112" y="0" style="fill: #ffffff">m</text>
|
||||||
<text x="120" y="0" style="fill: #ffffff">p</text>
|
<text x="120" y="0" style="fill: #ffffff">p</text>
|
||||||
<text x="128" y="0" style="fill: #ffffff">3</text>
|
<text x="128" y="0" style="fill: #ffffff">3</text>
|
||||||
|
<text x="144" y="0" style="fill: #ffffff">f</text>
|
||||||
|
<text x="152" y="0" style="fill: #ffffff">i</text>
|
||||||
|
<text x="160" y="0" style="fill: #ffffff">l</text>
|
||||||
|
<text x="168" y="0" style="fill: #ffffff">e</text>
|
||||||
<text x="0" y="16">$</text>
|
<text x="0" y="16">$</text>
|
||||||
<text x="16" y="16">f</text>
|
<text x="16" y="16">f</text>
|
||||||
<text x="24" y="16">q</text>
|
<text x="24" y="16">q</text>
|
||||||
@ -376,13 +380,17 @@
|
|||||||
<text x="120" y="160" style="fill: #ffffff">g</text>
|
<text x="120" y="160" style="fill: #ffffff">g</text>
|
||||||
<text x="136" y="160" style="fill: #ffffff">i</text>
|
<text x="136" y="160" style="fill: #ffffff">i</text>
|
||||||
<text x="144" y="160" style="fill: #ffffff">n</text>
|
<text x="144" y="160" style="fill: #ffffff">n</text>
|
||||||
<text x="160" y="160" style="fill: #ffffff">m</text>
|
<text x="152" y="160" style="fill: #ffffff">s</text>
|
||||||
<text x="168" y="160" style="fill: #ffffff">p</text>
|
<text x="160" y="160" style="fill: #ffffff">i</text>
|
||||||
<text x="176" y="160" style="fill: #ffffff">3</text>
|
<text x="168" y="160" style="fill: #ffffff">d</text>
|
||||||
<text x="192" y="160" style="fill: #ffffff">f</text>
|
<text x="176" y="160" style="fill: #ffffff">e</text>
|
||||||
<text x="200" y="160" style="fill: #ffffff">i</text>
|
<text x="192" y="160" style="fill: #ffffff">m</text>
|
||||||
<text x="208" y="160" style="fill: #ffffff">l</text>
|
<text x="200" y="160" style="fill: #ffffff">p</text>
|
||||||
<text x="216" y="160" style="fill: #ffffff">e</text>
|
<text x="208" y="160" style="fill: #ffffff">3</text>
|
||||||
|
<text x="224" y="160" style="fill: #ffffff">f</text>
|
||||||
|
<text x="232" y="160" style="fill: #ffffff">i</text>
|
||||||
|
<text x="240" y="160" style="fill: #ffffff">l</text>
|
||||||
|
<text x="248" y="160" style="fill: #ffffff">e</text>
|
||||||
<text x="0" y="176">$</text>
|
<text x="0" y="176">$</text>
|
||||||
<text x="16" y="176">f</text>
|
<text x="16" y="176">f</text>
|
||||||
<text x="24" y="176">q</text>
|
<text x="24" y="176">q</text>
|
||||||
@ -815,19 +823,25 @@
|
|||||||
<text x="88" y="384" style="fill: #ffffff">n</text>
|
<text x="88" y="384" style="fill: #ffffff">n</text>
|
||||||
<text x="104" y="384" style="fill: #ffffff">o</text>
|
<text x="104" y="384" style="fill: #ffffff">o</text>
|
||||||
<text x="112" y="384" style="fill: #ffffff">f</text>
|
<text x="112" y="384" style="fill: #ffffff">f</text>
|
||||||
<text x="128" y="384" style="fill: #ffffff">I</text>
|
<text x="128" y="384" style="fill: #ffffff">e</text>
|
||||||
<text x="136" y="384" style="fill: #ffffff">D</text>
|
<text x="136" y="384" style="fill: #ffffff">m</text>
|
||||||
<text x="144" y="384" style="fill: #ffffff">3</text>
|
<text x="144" y="384" style="fill: #ffffff">b</text>
|
||||||
<text x="152" y="384" style="fill: #ffffff">v</text>
|
<text x="152" y="384" style="fill: #ffffff">e</text>
|
||||||
<text x="160" y="384" style="fill: #ffffff">2</text>
|
<text x="160" y="384" style="fill: #ffffff">d</text>
|
||||||
<text x="176" y="384" style="fill: #ffffff">c</text>
|
<text x="168" y="384" style="fill: #ffffff">d</text>
|
||||||
<text x="184" y="384" style="fill: #ffffff">o</text>
|
<text x="176" y="384" style="fill: #ffffff">e</text>
|
||||||
<text x="192" y="384" style="fill: #ffffff">v</text>
|
<text x="184" y="384" style="fill: #ffffff">d</text>
|
||||||
<text x="200" y="384" style="fill: #ffffff">e</text>
|
<text x="200" y="384" style="fill: #ffffff">P</text>
|
||||||
<text x="208" y="384" style="fill: #ffffff">r</text>
|
<text x="208" y="384" style="fill: #ffffff">N</text>
|
||||||
<text x="224" y="384" style="fill: #ffffff">a</text>
|
<text x="216" y="384" style="fill: #ffffff">G</text>
|
||||||
<text x="232" y="384" style="fill: #ffffff">r</text>
|
<text x="232" y="384" style="fill: #ffffff">c</text>
|
||||||
<text x="240" y="384" style="fill: #ffffff">t</text>
|
<text x="240" y="384" style="fill: #ffffff">o</text>
|
||||||
|
<text x="248" y="384" style="fill: #ffffff">v</text>
|
||||||
|
<text x="256" y="384" style="fill: #ffffff">e</text>
|
||||||
|
<text x="264" y="384" style="fill: #ffffff">r</text>
|
||||||
|
<text x="280" y="384" style="fill: #ffffff">a</text>
|
||||||
|
<text x="288" y="384" style="fill: #ffffff">r</text>
|
||||||
|
<text x="296" y="384" style="fill: #ffffff">t</text>
|
||||||
<text x="0" y="400">$</text>
|
<text x="0" y="400">$</text>
|
||||||
<text x="16" y="400">f</text>
|
<text x="16" y="400">f</text>
|
||||||
<text x="24" y="400">q</text>
|
<text x="24" y="400">q</text>
|
||||||
@ -969,15 +983,13 @@
|
|||||||
<text x="48" y="496" style="fill: #ffffff">a</text>
|
<text x="48" y="496" style="fill: #ffffff">a</text>
|
||||||
<text x="56" y="496" style="fill: #ffffff">c</text>
|
<text x="56" y="496" style="fill: #ffffff">c</text>
|
||||||
<text x="64" y="496" style="fill: #ffffff">t</text>
|
<text x="64" y="496" style="fill: #ffffff">t</text>
|
||||||
<text x="80" y="496" style="fill: #ffffff">i</text>
|
<text x="80" y="496" style="fill: #ffffff">P</text>
|
||||||
<text x="88" y="496" style="fill: #ffffff">m</text>
|
<text x="88" y="496" style="fill: #ffffff">N</text>
|
||||||
<text x="96" y="496" style="fill: #ffffff">a</text>
|
<text x="96" y="496" style="fill: #ffffff">G</text>
|
||||||
<text x="104" y="496" style="fill: #ffffff">g</text>
|
<text x="112" y="496" style="fill: #ffffff">f</text>
|
||||||
<text x="112" y="496" style="fill: #ffffff">e</text>
|
<text x="120" y="496" style="fill: #ffffff">i</text>
|
||||||
<text x="128" y="496" style="fill: #ffffff">f</text>
|
<text x="128" y="496" style="fill: #ffffff">l</text>
|
||||||
<text x="136" y="496" style="fill: #ffffff">i</text>
|
<text x="136" y="496" style="fill: #ffffff">e</text>
|
||||||
<text x="144" y="496" style="fill: #ffffff">l</text>
|
|
||||||
<text x="152" y="496" style="fill: #ffffff">e</text>
|
|
||||||
<text x="0" y="512">$</text>
|
<text x="0" y="512">$</text>
|
||||||
<text x="16" y="512">f</text>
|
<text x="16" y="512">f</text>
|
||||||
<text x="24" y="512">q</text>
|
<text x="24" y="512">q</text>
|
||||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
1130
doc/formats.svg
1130
doc/formats.svg
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 86 KiB |
Loading…
Reference in New Issue
Block a user