Mattias Wadman
0fdc03a4f1
doc: Fix some incorrect example prompts
2022-09-27 13:42:31 +02:00
Mattias Wadman
a7a101ca67
doc,help: Nicer format help and move help tests into each format
...
Also add authors to avro and macho decoders
Generated with:
for i in $(go run . -r -n '_registry | [([([.files[][].name | split(".")[0]] | unique[]), (.formats[].name)] | count[] | select(.[1] == 2)[0]), (.formats[] | select(.decode_in_arg).name)] | unique[]'); do DIR=$(dirname $(find format -name $i.go)); echo "$ fq -h $i" > "$DIR/testdata/help_$i.fqtest" ; done
2022-09-22 23:07:58 +02:00
Mattias Wadman
725ab1b17b
doc,html,xml: Add more documentation and examples
2022-09-20 17:35:27 +02:00
Mattias Wadman
abd19ed89b
doc: Fix format sections a bit
2022-09-11 09:55:56 +02:00
Mattias Wadman
87b2c6c10c
help,doc: Use markdown for format documentation again
...
Markdown is used as is in online documentation and in cli the markdown decoder
is used to decode and the some jq code massages it into something cli friendly.
Was just too much of a mess to have doc in jq.
2022-09-11 00:53:29 +02:00
Mattias Wadman
8016352b3b
html: Handle html with leading doctype etc
2022-09-01 22:58:48 +02:00
Mattias Wadman
226a9a3e08
generics: Use more from x/exp
2022-08-31 10:50:56 +02:00
Mattias Wadman
7d86534348
sortex: Package with type safe sort helpers
2022-08-30 11:02:57 +02:00
Mattias Wadman
095e1161b7
xml: Switch from "-" to "@" as attribute prefix and make it an option
...
Seems to be more common.
2022-08-25 17:15:23 +02:00
Mattias Wadman
716323cea1
xml: Even more namespace fixes
...
fromXML*: Collect namespaces before resolving to not relay on attribute order.
toXML*: Sort attributes, prefer non-namescaped first.
2022-08-25 15:45:09 +02:00
Mattias Wadman
f24d685a5b
xml: Keep track of default namespace and skip it element names
...
Refactor element name handling a bit, return it instead, feels nicer.
2022-08-21 10:11:59 +02:00
Mattias Wadman
71900c2a9d
xml: Correctly sort if one #seq is found and allow negative seq numbers
2022-08-18 23:08:31 +02:00
Mattias Wadman
3623eac365
yaml: Error on trailing yaml/json
...
Turns our yaml is a superset of json
2022-08-15 19:14:25 +02:00
Mattias Wadman
0cd846a18c
*extra: Rename <pkg>extra to just <pkg>ex and refactor to use generics
2022-08-12 16:29:47 +02:00
Mattias Wadman
9a5fcc89f1
xml: Allow trailing <?procinstr?>
...
Also more context in error messages and refactor trim function
2022-08-11 23:48:29 +02:00
Mattias Wadman
f4e0137244
xml,html: Always include attrs and children in array mode
...
Was hard to use when you dont know what indexes things will have. They are sill optioal for toxml
2022-08-04 11:44:59 +02:00
Mattias Wadman
9e447c9af1
interp: Use RegisterFS instead of format files
2022-07-27 13:22:59 +02:00
Mattias Wadman
cae288e6be
format,intepr: Refactor json, yaml, etc into formats also move out related functions
...
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.
2022-07-23 21:48:45 +02:00