From f247edb592738d3f7c29f1ceb837e5dbd145dd8f Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Fri, 29 Jul 2022 16:34:27 +0200 Subject: [PATCH] doc: Update README demo a bit with new features --- README.md | 2 +- doc/demo.sh | 8 +- doc/demo.svg | 715 +++++++++++++++++++++++++++++---------------------- 3 files changed, 416 insertions(+), 309 deletions(-) diff --git a/README.md b/README.md index b407b448..76053b8d 100644 --- a/README.md +++ b/README.md @@ -283,4 +283,4 @@ Licenses of direct dependencies: - golang/snappy https://github.com/golang/snappy/blob/master/LICENSE (BSD) - github.com/BurntSushi/toml https://github.com/BurntSushi/toml/blob/master/COPYING (MIT) - gopkg.in/yaml.v3 https://github.com/go-yaml/yaml/blob/v3/LICENSE (MIT) -- github.com/creasty/defaults https://github.com/creasty/defaults/blob/master/LICENSE (MIT) \ No newline at end of file +- github.com/creasty/defaults https://github.com/creasty/defaults/blob/master/LICENSE (MIT) diff --git a/doc/demo.sh b/doc/demo.sh index 2cc9575f..a9044048 100755 --- a/doc/demo.sh +++ b/doc/demo.sh @@ -17,10 +17,12 @@ echo c "Show ID3v2 tag inside mp3 file" s "fq '.headers[0]' file.mp3" echo -c "Resolution of embedded PNG cover art" -s "fq '.headers[0].frames[] | select(.id == \"APIC\").picture.chunks[] | select(.type == \"IHDR\") | {width, height}' file.mp3" -echo c "Extract PNG file" s "fq '.headers[].frames[] | select(.id == \"APIC\")?.picture | tobits' file.mp3 >file.png" 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}} | toyaml' file.mp3" +c "Add query parameter to URL" +s "echo 'http://host?a=b' | fq -Rr 'fromurl | .query.b = 1234 | tourl'" diff --git a/doc/demo.svg b/doc/demo.svg index dbbb5d76..ba726ee3 100644 --- a/doc/demo.svg +++ b/doc/demo.svg @@ -1,4 +1,4 @@ - +