1
1
mirror of https://github.com/wader/fq.git synced 2024-11-26 21:55:57 +03:00
Commit Graph

31 Commits

Author SHA1 Message Date
Mattias Wadman
3c21b058e4 lint: Fix ioutil deprecation, reformat for new doc standard 2022-08-05 00:22:32 +02:00
Mattias Wadman
1ddea1ada3 interp,format: Refactor registry usage and use function helpers
Move registry to interp and add support for functions and filesystems.
This will be used later for allow formats to add own functions and fq code.

Add gojqextra function helpers to have more comfortable API to add functions.
Takes care of argument type casting and JQValue:s and some more things.

Refactor interp package to use new function helper and registry. Probably
fixes a bunch of JQValue bugs and other type errors.

Refactor out some mpeg nal things to mpeg format.

Refactor interp jq code into display.q and init.jq.

Remove undocumented aes_ctr funciton, was a test. Hopefully will add more crypto things laster.
2022-07-16 19:24:13 +02:00
Mattias Wadman
95e619659b interp: Add internal _is_<type> helpers 2022-05-20 16:49:00 +02:00
Mattias Wadman
e9d9f8aef9 fq: Use go 1.18
Rename s/interface{}/any/g
Preparation for using generics in decode API and native jq funcations etc
Remove some unused linter ignores as linter has been fixed
2022-05-20 15:23:16 +02:00
Mattias Wadman
26d9650b0e interp: Refactor radix* into toradix($base)/fromradix($base)
There is also toradix($base; $table)/fromradix($base; $table) for custom symbols and bases.
Add radix tests

Part of cleaning up all convert/tranformation functions into to/from*.

Remove number_to_bytes as with better binary support it can be written as:
1234 | tobytes | [.[range(.size)]] and soon as 1234 | tobytes | explode
2022-02-11 01:28:39 +01:00
Mattias Wadman
d1943dad49 pcapng,fuzz: Fix infinite loop by fatal error on block length <= 0
Also add dev/fuzzbytes.go tool to convert fuzz input to raw bytes
2022-01-23 13:34:56 +01:00
Mattias Wadman
44251ca8bd snippet: Add mp4_matrix_structure_rotation 2021-11-19 15:59:41 +01:00
Mattias Wadman
c083a9e475 decode: Fix MapRawToScalar regression 2021-11-17 17:14:19 +01:00
Mattias Wadman
ede2e77975 decode: Nicer scalar template and add doc 2021-11-17 16:13:10 +01:00
Mattias Wadman
fcbfc29154 make: Move testjq.sh into pkg/interp 2021-11-12 00:23:16 +01:00
Mattias Wadman
6a15625587 interp,decode: Refactor out Scalar from Value and merge Array/Struct into Compound
Also add tosym, toactual
2021-11-05 17:29:22 +01:00
Mattias Wadman
3bfc95b3c2 test: Nicer test output 2021-09-19 11:58:37 +02:00
Mattias Wadman
90c19c6cc1 make,test: Move testjq to own script and reuse fq binary
Remove version from --help for now
2021-09-19 11:50:41 +02:00
Mattias Wadman
242525f8de doc: Move formats to own file 2021-09-19 10:31:43 +02:00
Mattias Wadman
e4e269b162 Rename and move cli test to pkg/cli 2021-09-18 18:23:28 +02:00
Mattias Wadman
46d37eff88 fq: Add cli sanity test 2021-09-18 12:31:03 +02:00
Mattias Wadman
797bd4d652 flac: Refactor flac_metadatablock into flac_metadatablocks
metadatablocks are not really used alone
2021-09-17 15:46:13 +02:00
Mattias Wadman
684193afdb snippets: add changes/1 2021-09-12 13:08:56 +02:00
Mattias Wadman
0a97f86f32 doc: Cleanup and note about repl limit 2021-09-12 13:08:55 +02:00
Mattias Wadman
25f5ad7566 fq,cli: Rename chunk to streaks, cleanup 2021-09-12 13:08:55 +02:00
Mattias Wadman
69c6d150e2 editlit.jq: Update after mp4 field renames 2021-09-12 13:08:53 +02:00
Mattias Wadman
45afbe6201 wip 2021-09-12 13:08:53 +02:00
Mattias Wadman
d23edaa4a5 fq: Rename bits/0 bytes/0 to tobits tobytes, remove string/0 2021-09-12 13:08:53 +02:00
Mattias Wadman
9797cdc6b2 Cleanup dev/snippets.jq 2021-09-12 13:08:52 +02:00
Mattias Wadman
1888bb2892 gojq: Remove div operator
Add intdiv function intead
2021-09-12 13:08:52 +02:00
Mattias Wadman
fda1dda1ae snippets: urlencode: only 0-9a-f 2021-09-12 13:08:52 +02:00
Mattias Wadman
af3e6b1220 dev: Add format_summary.jq 2021-09-12 13:08:51 +02:00
Mattias Wadman
79a1aea1d0 snippets: Add urldecode 2021-09-12 13:08:51 +02:00
Mattias Wadman
77f97aade2 builtin: Add chunk_by, count_by and debug 2021-09-12 13:08:51 +02:00
Mattias Wadman
f33b31049d Refactor decode.Value gojq bindings 2021-09-12 13:08:48 +02:00
Mattias Wadman
970465996c Init 2021-09-12 13:08:42 +02:00