1
1
mirror of https://github.com/wader/fq.git synced 2024-09-11 12:05:39 +03:00
Commit Graph

35 Commits

Author SHA1 Message Date
Mattias Wadman
9cd1d0f3e3 dev: Move examples and snippets to wiki 2023-07-26 11:11:48 +02:00
Mattias Wadman
e3ae1440c9 interp: Rename to/from<format> functions to to_/from_<format>
Feels less cluttered, easier to read and more consistent.

Still keep tovalue, tobytes etc that are more basic functions this
only renamed format related functions.
Also there is an exceptin for to/fromjson as it comes from jq.

Also fixes lots of spelling errors while reading thru.
2022-12-21 17:48:39 +01:00
Mattias Wadman
9b81d4d3ab decode: More type safe API and split scalar into multiple types
Preparation to make decoder use less memory and API more type safe.
Now each scalar type has it's own struct type so it can store different
things and enables to have a scalar interface.
Also own types will enable experimenting with decode DLS designs like
using chained methods that are type aware.
2022-12-14 16:23:58 +01:00
Mattias Wadman
42debe5871 dev,doc,make: Cleanup makefile and have proper targets for *.md and *.svg
Update format dev docs to only generate README.md and doc/foramts.md to not
cause formats.svg conflicts.
2022-12-04 12:37:10 +01:00
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