mirror of
https://github.com/wader/fq.git
synced 2024-11-22 07:16:49 +03:00
Merge pull request #1017 from wader/demo-less-width
doc: Less wide demo image to make it scale down less
This commit is contained in:
commit
e927a94ca1
@ -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 '.headers[].frames[] | select(.id == "APIC")?.picture | tobits' file.mp3 >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 '.headers[0].frames[] | grep_by(.id == "APIC") | grep_by(.type == "IHDR") | {res: {width, height}} | to_yaml' 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 'grep_by(.type == "IHDR") | {res: {width, height}} | to_yaml' 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 |
@ -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'"
|
||||
|
Loading…
Reference in New Issue
Block a user