mirror of
https://github.com/wader/fq.git
synced 2024-12-25 14:23:18 +03:00
cae288e6be
json, yaml, toml, xml, html, csv are now normal formats and most of them also particiate in probing (not html and csv). Also fixes a bunch of bugs in to/fromxml, to/fromjq etc.
12 lines
465 B
Plaintext
12 lines
465 B
Plaintext
# note this is a "dynamic" include, output string will be used as source
|
|
|
|
[ _registry.groups
|
|
| to_entries[]
|
|
# TODO: nicer way to skip "all" which also would override builtin all/*
|
|
| select(.key != "all")
|
|
| "def \(.key)($opts): decode(\(.key | tojson); $opts);"
|
|
, "def \(.key): decode(\(.key | tojson); {});"
|
|
, "def from\(.key)($opts): decode(\(.key | tojson); $opts) | if ._error then error(._error.error) end;"
|
|
, "def from\(.key): from\(.key)({});"
|
|
] | join("\n")
|