Subject: CVS commit: pkgsrc/devel/fq
From: Thomas Klausner
Date: 2023-04-13 18:35:41
Message id: 20230413163541.399A2FA85@cvs.NetBSD.org

Log Message:
fq: update to 0.5.0.

# 0.5.0

Mostly a bug fix release but adds `-V` for easy JSON output.

## Changes

- Add `-V` argument to default output JSON instead of decode tree in case of \ 
decode value. #385 Thanks @peterwaller-arm for reminding me to merge this.
  ```sh
  # default in case of decode value is to show a hexdump tree
  $ fq '.headers | grep_by(.id=="TSSE").text' file.mp3
      │00 01 02 03 04 05 06 07 08 09 0a 0b│0123456789ab│
  0x0c│                           4c 61 76│         \ 
Lav│.headers[0].frames[0].text: "Lavf58.76.100"
  0x18│66 35 38 2e 37 36 2e 31 30 30 00   │f58.76.100. │

  # with -V an implicit "tovalue" is done
  $ fq -V '.headers | grep_by(.id=="TSSE").text' file.mp3
  "Lavf58.76.100"

  # and in combination with -r will for strings output a "raw string" \ 
without quotes
  # for other types like number, object, array etc -r makes not difference (same \ 
as jq)
  $ fq -Vr '.headers | grep_by(.id=="TSSE").text' file.mp3
  Lavf58.76.100
  ```

  As a side note `-V` can be used with binary type also. Then the binary data \ 
will be interpreted as UTF-8 and turned into a string.
  ```sh
  # trailing null terminator ends up as codepoint zero `\u0000`
  $ fq -V '.headers | grep_by(.id=="TSSE").text | tobytes' file.mp3
  "Lavf58.76.100\u0000"

  # with -r null terminator and a new line is outputted
  $ fq -Vr '.headers | grep_by(.id=="TSSE").text | tobytes' file.mp3 | \ 
hexdump -C
  00000000  4c 61 76 66 35 38 2e 37  36 2e 31 30 30 00 0a     |Lavf58.76.100..|
  0000000f

  # in contrast raw binary output has no new line separator
  $ fq '.headers | grep_by(.id=="TSSE").text | tobytes' doc/file.mp3 | \ 
hexdump -C
  00000000  4c 61 76 66 35 38 2e 37  36 2e 31 30 30 00        |Lavf58.76.100.|
  0000000e
  ```
- Fix issue using decode value in object passed as argument to internal \ 
function. #638
  ```sh
  # this used to fail but now works
  fq '.tracks[0].samples[10] | avc_au({length_size: <decode value>})' file.mp4
  ```
- Some typo fixes. Thanks @retokromer and @peterwaller-arm

## Decoder changes

- `aiff` Basic AIFF decoder added. #614
- `matroska` Update to latest specification. #640
- `msgpack` Fix bug decoding some fixstr lengths. #636 Thanks @schmee for reporting.

Files:
RevisionActionfile
1.6modifypkgsrc/devel/fq/Makefile
1.3modifypkgsrc/devel/fq/distinfo
1.3modifypkgsrc/devel/fq/go-modules.mk