1
1
mirror of https://github.com/wader/fq.git synced 2024-11-29 23:27:12 +03:00
Commit Graph

446 Commits

Author SHA1 Message Date
Pavel Safonov
dd9c7f0420 Merge branch 'postgres' into postgres_wal_sync_with_postgres 2022-10-12 10:43:59 +03:00
Pavel Safonov
6588e1dd88 Merge branch 'wader_master' into postgres 2022-10-05 19:39:35 +03:00
Mattias Wadman
cb3dc80252 decode,tar: Add scalar description and Try* helpers
Rework time helpers to use new functions
Fix panic in tar decoder where sym value might be missing

Still not very happy about the API but it's getting better.
2022-10-04 17:18:51 +02:00
Mattias Wadman
09ea08f3aa
Merge pull request #427 from dgmcdona/bplist
Adds support for Apple Binary Plist, version 00
2022-10-04 14:25:53 +02:00
Mattias Wadman
c4219d69db interp: Fix interrupt panic for cli eval
Rewrite cli query to use display as output query, same as for repl.
Without this "tovalue" values that don't print in the current eval
will end up in the paren eval and be written using an output without
a cancel context.
2022-09-29 18:17:57 +02:00
Mattias Wadman
00ee10a1a1 interp: Make to{actual,sym} behave similar to tovalue
Before if you did toactual it behaved differently and even gave error for
a scalar that only had actual value set. Now both to{actal,sym} works
similar to tovalue but will force if actual or sym value should be used.
2022-09-25 17:53:12 +02:00
Mattias Wadman
0f35fe48fd ranges,decode: Correctly skip empty ranges when adding unknown fields
Before an empty range could cause gaps to be devided instead of continous.
2022-09-25 16:02:15 +02:00
David McDonald
bcccde2358 Fixes and embeds documentation 2022-09-24 12:57:11 -05:00
David McDonald
5f61994087 adds function for decoding fixed sized arrays 2022-09-23 20:50:41 -05:00
David McDonald
a77cec921f Added documentation and tests, fixed bad date parsing 2022-09-23 20:23:23 -05:00
David McDonald
5711f29084 Code fixes from PR, still need to add tests and testdata 2022-09-23 20:21:32 -05:00
David McDonald
d784db69bc Adds support for Apple Binary Plist, version 00 2022-09-23 20:21:32 -05:00
Pavel Safonov
94e5b79bbf Merge branch 'wader_master' into postgres 2022-09-23 12:18:06 +03: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
Pavel Safonov
9f1adb2d81 postgres: change AssertPosBytes to AssertPos (bits) 2022-09-21 13:36:15 +03:00
Pavel Safonov
f122f72373 Merge branch 'wader_master' into postgres 2022-09-16 17:18:30 +03:00
Pavel Safonov
448c369014 postgres: try to implement pg_wal 2022-09-15 16:34:22 +03:00
Mattias Wadman
fe64530e11 csv: Add tsv and header example
Also fix string esacpe in fuzz options parser
2022-09-15 01:16:45 +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
00a50662ea markdown: Add decoder 2022-09-10 18:26:45 +02:00
Pavel Safonov
8e27e30f89 Merge branch 'wader_master' into postgres 2022-09-09 17:30:33 +03:00
Pavel Safonov
666bbfba29 postgres: fix some unknown, chanche tests tovalue -> dv 2022-09-05 12:50:59 +03:00
Pavel Safonov
d58860580a Merge branch 'master' of github.com:pnsafonov/fq into postgres 2022-09-02 16:16:19 +03:00
Pavel Safonov
2ee01f79c2 allow to change FillGaps in decoder 2022-09-02 09:03:08 +03:00
Mattias Wadman
a6429ffe7a decode: Remove RangeSorted flag as we can decide on array/struct instead 2022-09-01 17:45:28 +02:00
Mattias Wadman
768df3012c interp,decode: For struct use map to lookup field
Will make it faster for struct with logs of fields and seems to
not cuase any significant difference for small structs.

All this really needs a rewrite somehow, maybe refactor into interfaces somehow? getting messy.
2022-09-01 11:35:19 +02:00
Pavel Safonov
7cd43b4919 perfomance: increase performance by map usage 2022-09-01 09:36:50 +03:00
Pavel Safonov
b4c4de26ca Merge remote-tracking branch 'github/master' 2022-08-31 12:17:14 +03:00
Mattias Wadman
226a9a3e08 generics: Use more from x/exp 2022-08-31 10:50:56 +02:00
Mattias Wadman
6a6fec54f5 range,decode: Use own range sort impl to speed up a bit 2022-08-30 15:24:19 +02:00
Mattias Wadman
7d86534348 sortex: Package with type safe sort helpers 2022-08-30 11:02:57 +02:00
Pavel Safonov
e4ba72f42f Merge remote-tracking branch 'github/master' 2022-08-25 09:55:48 +03:00
Mattias Wadman
913f5780f4 columnwriter,dump: Add Column interface and refactor into BarColumn and MultiLineColumn
This removes bar column drawing responsility from already complicated dump code.

Start of dump code refactor that will enable configurable columns and proper column truncate/wrap.
2022-08-24 21:48:56 +02:00
Mattias Wadman
d8792fd104 interp,dump: Correctly flush columns if data will be shown
Before addrbar ended up in data and also redudant colunms was added
2022-08-24 21:14:26 +02:00
Mattias Wadman
8fc43533a9 prores_frame: Add basic container and frame header decoder 2022-08-24 19:33:35 +02:00
Mattias Wadman
64b236591f fqtest: Run tests in parallell 2022-08-23 20:08:44 +02:00
bitbears-dev
89cb0d8e91
Merge branch 'wader:master' into wasm-support 2022-08-22 21:01:19 +09:00
Mattias Wadman
326dada7ca decode: Add LEB128 readers 2022-08-20 12:05:44 +02:00
Takashi Oguma
934ed9a809
wasm: initial version 2022-08-18 21:40:30 +09:00
Mattias Wadman
ff29fe7154
Merge pull request #377 from wader/force-unicode
interp: Add --unicode-output/-U to force use of unicode
2022-08-17 21:49:40 +02:00
Mattias Wadman
c7559b59a0 interp: Add --unicode-output/-U to force use of unicode
Currently only used to make dump output a bit nicer.
2022-08-17 21:40:42 +02:00
Mattias Wadman
cf15661e9c mp3_frame: Add LSF support and fix incorrect main data handling
Some mpeg versions use LSF (low sampling frequency) when encoding
low sample rates which changes a bit how the side info is layed out.

Also skip trying to separate data and other_data as after reading up
a bit on how main data begin and bit reservoir works i think it was done
incorrectly. To know the real audio data length i think you need to decode
the huffman tables. Instead just have a "audio_data" field which are the
bits with audo data for current and possibly following frames.
2022-08-17 21:36:39 +02:00
Mattias Wadman
701c67c136 jsonl: Add decoder, also tojsonl encoder 2022-08-15 19:43:59 +02:00
Mattias Wadman
0d44b9376c tar: Some number fields can be empty 2022-08-15 14:57:16 +02:00
Mattias Wadman
d898732c3d gojq: Update fq fork, new scope function, rawstring, stricter integers
Update repl completion for new scope/0 function, now reports name/arity and is more correct
Support for experimental `rawstring` literals, similar to go raw string literals
Sticter number literals, now 0b,0o and 0x fail it they have invalud symbols, ex: 0b123
2022-08-14 22:40:44 +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
29005c70bf interp,dump: Show address bar for root, nested roots and on format change
Also increase indent for nested roots a bit.

Makes it a bit easier to read i think.
2022-08-09 18:09:41 +02:00
Mattias Wadman
502f451cc3 decode: Refactor to use scalar type assert helper 2022-08-08 18:09:49 +02:00