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

299 Commits

Author SHA1 Message Date
Mattias Wadman
776a6b3136 decode: Reuse read buffer per decode to speed things up 2021-09-14 18:54:59 +02:00
Mattias Wadman
c770a754dc funcs: make in_bytes/bits_range more generic 2021-09-14 12:55:53 +02:00
Mattias Wadman
26c594feb1 input: make -R mimic jq on io error 2021-09-13 12:12:34 +02:00
Mattias Wadman
dcceaa4b35 repl: Fix help and error message a bit 2021-09-12 13:08:56 +02:00
Mattias Wadman
7423f450ef interp: Cleanup output types 2021-09-12 13:08:56 +02:00
Mattias Wadman
3d90b6d4b3 Remove fixed comment 2021-09-12 13:08:56 +02:00
Mattias Wadman
c9777aaded repl: completion in jq 2021-09-12 13:08:56 +02:00
Mattias Wadman
44d8b66a8e repl: Give error if repl is used in non-repl mode 2021-09-12 13:08:56 +02:00
Mattias Wadman
ec98fd315a cli: Make --argjson and --decode-file error similar 2021-09-12 13:08:56 +02:00
Mattias Wadman
1d15c1d0f2 gojq: Update fq fork 2021-09-12 13:08:56 +02:00
Mattias Wadman
4344b621da mp3: Only look for supported mp3 sync headers 2021-09-12 13:08:55 +02:00
Mattias Wadman
da386ea282 mp3: Be more relaxed with zero padding, just warn 2021-09-12 13:08:55 +02:00
Mattias Wadman
d350971fa2 cli: Add --decode-file VAR PATH support 2021-09-12 13:08:55 +02:00
Mattias Wadman
f5ffd32096 cli: Implement --arg, --argjson and --rawfile 2021-09-12 13:08:55 +02:00
Mattias Wadman
962d84dc68 funcs: Make intdiv truncate to int 2021-09-12 13:08:55 +02:00
Mattias Wadman
48517c7c60 cli: Unbreak part of completion 2021-09-12 13:08:55 +02:00
Mattias Wadman
f8e5944f91 dump,json: Properly figure if compound or not 2021-09-12 13:08:55 +02:00
Mattias Wadman
0a97f86f32 doc: Cleanup and note about repl limit 2021-09-12 13:08:55 +02:00
Mattias Wadman
a49e924d5f decode: Use golang.org/x/text for text decoding 2021-09-12 13:08:55 +02:00
Mattias Wadman
85d17199de cli: jq compat, multiple -L 2021-09-12 13:08:55 +02:00
Mattias Wadman
c8f0264682 cli: more jq compat 2021-09-12 13:08:55 +02:00
Mattias Wadman
ccf6cab491 repl: use map in _query_slurp_wrap 2021-09-12 13:08:55 +02:00
Mattias Wadman
538f4ffe71 cli: add -nul-output compat 2021-09-12 13:08:55 +02:00
Mattias Wadman
8cb380e7d9 fq: Generate decode alises code 2021-09-12 13:08:55 +02:00
Mattias Wadman
834f4a5893 fq: use jq functions for all display alises 2021-09-12 13:08:55 +02:00
Mattias Wadman
905c0ab74e fq: Add chunk/1 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
285356d21e fqtest: Cleanup and dont assert when WRITE_ACTUAL 2021-09-12 13:08:55 +02:00
Mattias Wadman
1d0ebb55e4 repl: Handle directives, add tests 2021-09-12 13:08:55 +02:00
Mattias Wadman
49f541c317 cli: Add proper repl iterator support 2021-09-12 13:08:54 +02:00
Mattias Wadman
c14c29a4a9 cli: Cleanup and more commens 2021-09-12 13:08:54 +02:00
Mattias Wadman
184df0a11b cli: A bit clearner array and iter prompt 2021-09-12 13:08:54 +02:00
Mattias Wadman
c7d45ff1e0 mp4: add pssh_playready format 2021-09-12 13:08:54 +02:00
Mattias Wadman
10d7ed7806 cli: Fix error filename on script error 2021-09-12 13:08:54 +02:00
Mattias Wadman
ac8cfca500 cli: Make --raw-string work with input/0 and inputs/0
Also lots of refactor
2021-09-12 13:08:54 +02:00
Mattias Wadman
2010caccd5 cli: Add error test 2021-09-12 13:08:54 +02:00
Mattias Wadman
569b631904 cli: Add output join tests 2021-09-12 13:08:54 +02:00
Mattias Wadman
3304f2956a cli: Add string_input options test 2021-09-12 13:08:54 +02:00
Mattias Wadman
17104f02d3 cli: Add --options to make help a bit nicer 2021-09-12 13:08:54 +02:00
Mattias Wadman
6356a84f15 cli: Add --raw-string 2021-09-12 13:08:54 +02:00
Mattias Wadman
4242bf6013 *_annexb: Refactor into avc/hevc_annexb 2021-09-12 13:08:54 +02:00
Mattias Wadman
9f55b6e619 decode: Refactor and add symbol struct and mapping 2021-09-12 13:08:53 +02:00
Mattias Wadman
f4b11b4be2 mpeg_annexb: Add format 2021-09-12 13:08:53 +02:00
Mattias Wadman
b33f2cd678 cli: Make profile build optional and move it to cli 2021-09-12 13:08:53 +02:00
Mattias Wadman
b849895970 fq: Add truncate array support to dump/display 2021-09-12 13:08:53 +02:00
Mattias Wadman
ba273be71e fq: Make relative include work with @builtin etc 2021-09-12 13:08:53 +02:00
Mattias Wadman
f828ae1319 gojq: Update gojq fq fork
Removed some unneeded error changes in fork
2021-09-12 13:08:53 +02:00
Mattias Wadman
dfcefc1b55 fq: Make format/0 native for performance 2021-09-12 13:08:53 +02:00
Mattias Wadman
45afbe6201 wip 2021-09-12 13:08:53 +02:00
Mattias Wadman
08ec4f0eeb funcs: Remove unsued string function 2021-09-12 13:08:53 +02:00
Mattias Wadman
dee10dbb78 fqtest: No need to escape empty stdout 2021-09-12 13:08:53 +02:00
Mattias Wadman
e2ff2a277a cli: Move help/0 to inter.jq, better help for -n 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
518b7250e5 cli: Use format/0 to check if value is a format 2021-09-12 13:08:53 +02:00
Mattias Wadman
01d8a902eb funcs: Add delta/0 delta_by/0 2021-09-12 13:08:53 +02:00
Mattias Wadman
96f7a750b9 funcs: Fix typo add count/0 2021-09-12 13:08:53 +02:00
Mattias Wadman
2874bc7995 cli: Unbreak colors in windows 2021-09-12 13:08:53 +02:00
Mattias Wadman
75cf46f8f4 cli: Refactor options code
Make nearly all options be just options and cli arguments
just sets various options.
2021-09-12 13:08:53 +02:00
Mattias Wadman
5c8fb5f97a cli: Revert accidental history path change 2021-09-12 13:08:52 +02:00
Mattias Wadman
22eb53d5f6 cli: Cleanup MaybeLogFile 2021-09-12 13:08:52 +02:00
Mattias Wadman
6a8ba315fa number_to_bytes: Force int to make it work with bigint 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
e374b427f2 test: Less verbose 2021-09-12 13:08:52 +02:00
Mattias Wadman
b9b0326009 doc: fq - jq for files 2021-09-12 13:08:52 +02:00
Mattias Wadman
f600f2e54f build: Require go 1.17 2021-09-12 13:08:52 +02:00
Mattias Wadman
d9b45ba1ec internal: _global_var returns new value instead of _global_state 2021-09-12 13:08:52 +02:00
Mattias Wadman
80eaa4637e funcs: format helper 2021-09-12 13:08:52 +02:00
Mattias Wadman
d5c084c54a funcs: chunk_by comment 2021-09-12 13:08:52 +02:00
Mattias Wadman
54e121c72b interp: Refactor repl inputs a bit 2021-09-12 13:08:51 +02:00
Mattias Wadman
86b34a3f41 fqtest: Fix section regexp 2021-09-12 13:08:51 +02:00
Mattias Wadman
2684ed2561 cli: Prepare completion for better variables support 2021-09-12 13:08:51 +02:00
Mattias Wadman
e666380c4f cli: REPL and multiple files 2021-09-12 13:08:51 +02:00
Mattias Wadman
0dd848de6c cli: Better filenames in errors 2021-09-12 13:08:51 +02:00
Mattias Wadman
394e2b3837 cli: Only compelete at end or whitespace 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
f1507f7f65 mod: Use proper path and dont use replace 2021-09-12 13:08:50 +02:00
Mattias Wadman
1436fdc8ba completion: Better and _internal handling 2021-09-12 13:08:50 +02:00
Mattias Wadman
c155c89ba3 decode: Rename format *Decode to *Format 2021-09-12 13:08:50 +02:00
Mattias Wadman
2d4eb9ccc7 cli: Fix non-string variables and var(; f) variant to delete etc 2021-09-12 13:08:50 +02:00
Mattias Wadman
21bef18666 cli: User defined global vars 2021-09-12 13:08:50 +02:00
Mattias Wadman
0c7fa090b0 gojq: Initial update support
decode value give no updateable error
JQValue json value tries to replicate behaveior
2021-09-12 13:08:50 +02:00
Mattias Wadman
f8ab00eb84 cli: Remove unused eval debug arg 2021-09-12 13:08:50 +02:00
Mattias Wadman
f89329568a cli: rename fq.jq to interp.jq 2021-09-12 13:08:50 +02:00
Mattias Wadman
ae5566a6ce cli: Include paths and some refactor 2021-09-12 13:08:50 +02:00
Mattias Wadman
706b2f28e5 cli: Add exit 2 (like jq) for no args 2021-09-12 13:08:50 +02:00
Mattias Wadman
8d1fafe4b8 cli: Only show fq info for --help 2021-09-12 13:08:50 +02:00
Mattias Wadman
55cd45f675 cli: Simplify code 2021-09-12 13:08:49 +02:00
Mattias Wadman
8dc0f06b62 cli: Add completion tests 2021-09-12 13:08:49 +02:00
Mattias Wadman
2b8d11db20 cli: Fix indent 2021-09-12 13:08:49 +02:00
Mattias Wadman
78eb73724a cli: Nicer usage and indent input iteration 2021-09-12 13:08:49 +02:00
Mattias Wadman
3693667df4 Start of configurable json bit buffer formats 2021-09-12 13:08:49 +02:00
Mattias Wadman
f33b31049d Refactor decode.Value gojq bindings 2021-09-12 13:08:48 +02:00
Mattias Wadman
d0bb9a59f6 cli: Nicer grammar for --null-input help 2021-09-12 13:08:48 +02:00
Mattias Wadman
57f0ec1856 Improve cli help a bit 2021-09-12 13:08:48 +02:00
Mattias Wadman
d1be16784b Add decode struct each order test 2021-09-12 13:08:48 +02:00
Mattias Wadman
74bad2dca5 Fix broken value.fqtest 2021-09-12 13:08:48 +02:00
Mattias Wadman
1bd34bffc8 Same args error behavior as jq 2021-09-12 13:08:48 +02:00
Mattias Wadman
514739a149 Give proper error on missing short flag 2021-09-12 13:08:48 +02:00
Mattias Wadman
970465996c Init 2021-09-12 13:08:42 +02:00