1
1
mirror of https://github.com/wader/fq.git synced 2024-11-21 23:04:07 +03:00

doc: Less wide demo image to make it scale down less

This commit is contained in:
Mattias Wadman 2024-09-27 10:39:36 +02:00
parent b5b9dd82ac
commit b9b14c64b2
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<svg width="126ch" height="50em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<svg width="100ch" height="50em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style>
* {
font-family: Courier, monospace;
@ -58,8 +58,8 @@
<text x="0ch" y="31.5em"><tspan>$ fq &#39;.headers[].frames[] | select(.id == &#34;APIC&#34;)?.picture | tobits&#39; file.mp3 &gt;file.png</tspan></text>
<text x="0ch" y="32.5em"><tspan>$ file file.png</tspan></text>
<text x="0ch" y="33.5em"><tspan>file.png: PNG image data, 320 x 240, 8-bit/color RGB, non-interlaced</tspan></text>
<text x="0ch" y="35.5em"><tspan class="fa15"># Resolution of embedded PNG cover art as YAML</tspan></text>
<text x="0ch" y="36.5em"><tspan>$ fq -r &#39;.headers[0].frames[] | grep_by(.id == &#34;APIC&#34;) | grep_by(.type == &#34;IHDR&#34;) | {res: {width, height}} | to_yaml&#39; file.mp3</tspan></text>
<text x="0ch" y="35.5em"><tspan class="fa15"># Grep for PNG header, extract resolution and output as YAML</tspan></text>
<text x="0ch" y="36.5em"><tspan>$ fq -r &#39;grep_by(.type == &#34;IHDR&#34;) | {res: {width, height}} | to_yaml&#39; file.mp3</tspan></text>
<text x="0ch" y="37.5em"><tspan>res:</tspan></text>
<text x="0ch" y="38.5em"><tspan> height: 240</tspan></text>
<text x="0ch" y="39.5em"><tspan> width: 320</tspan></text>

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -28,8 +28,8 @@ s "fq '.headers[].frames[] | select(.id == \"APIC\")?.picture | tobits' file.mp3
s "file file.png"
rm -f file.png
echo
c "Resolution of embedded PNG cover art as YAML"
s "fq -r '.headers[0].frames[] | grep_by(.id == \"APIC\") | grep_by(.type == \"IHDR\") | {res: {width, height}} | to_yaml' file.mp3"
c "Grep for PNG header, extract resolution and output as YAML"
s "fq -r 'grep_by(.type == \"IHDR\") | {res: {width, height}} | to_yaml' file.mp3"
#echo
c "Add query parameter to URL"
s "echo 'http://host?a=b' | fq -Rr 'from_url | .query.b = \"a b c\" | to_url'"