1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 14:23:18 +03:00
Commit Graph

1043 Commits

Author SHA1 Message Date
Mattias Wadman
d4fe00d65c
Merge pull request #299 from wader/interp-add-group
interp: Add group/0
2022-06-30 12:31:37 +02:00
Mattias Wadman
f0f70a5f33
Merge pull request #303 from wader/doc-typos
doc: Typos and add note about Try* functions
2022-06-30 12:29:46 +02:00
Mattias Wadman
f96637fb83
Merge pull request #302 from wader/decode-cleanup-trymust
decode: Cleanup Try<f>/<f> pairs
2022-06-30 12:24:44 +02:00
Mattias Wadman
b10061196f doc: Typos and add note about Try* functions 2022-06-30 12:23:59 +02:00
Mattias Wadman
a6a97136b7 decode: Cleanup Try<f>/<f> pairs
Decode API design is that Try* returns error non-Try panics.
Also rename Must* as they should panic and introduce some new Try* functions
that were missing.
2022-06-30 12:13:46 +02:00
Mattias Wadman
53ca5f2511
Merge pull request #301 from ksa-real/patch-1
Update usage.md
2022-06-26 20:38:43 +02:00
Sergei Kuzmin
02f00be9a6
Update usage.md 2022-06-26 04:56:56 -07:00
Mattias Wadman
184701d215
Merge pull request #300 from wader/doc-add-more-related-tools
doc: Add more related tools
2022-06-21 19:01:55 +02:00
Mattias Wadman
3570f1f048 doc: Add more related tools 2022-06-21 18:10:23 +02:00
Mattias Wadman
a3c33fc1f4 interp: Add group/0
Also add tests for count, count_by, delta and delta_by
2022-06-21 15:18:12 +02:00
Mattias Wadman
6f92751690
Merge pull request #298 from wader/interp-extract-mapstruct
interp: Extract to/from map/struct to own package
2022-06-20 21:34:16 +02:00
Mattias Wadman
c7701851b0 interp: Extract to/from map/struct to own package 2022-06-20 21:24:59 +02:00
Mattias Wadman
854e37f479
Merge pull request #297 from wader/totype-cleanup
gojqextra: Cleanup gojq type cast code
2022-06-20 18:08:03 +02:00
Mattias Wadman
32361deefe gojqextra: Cleanup gojq type cast code 2022-06-20 18:02:35 +02:00
Mattias Wadman
f37ac864bd
Merge pull request #296 from wader/interp-finally-error-empty-fin
interp: Make empty _finally fin error on error
2022-06-18 00:12:59 +02:00
Mattias Wadman
81a014ce49 interp: Make empty _finally fin error on error
Ex: _finally(error(a); empty)
This is not used by fq atm
2022-06-18 00:00:54 +02:00
Mattias Wadman
13ce14dad6
Merge pull request #295 from wader/random-fixes
doc: Correct bencode spec URL
2022-06-13 19:31:13 +02:00
Mattias Wadman
0863374f8c doc: Correct bencode spec URL
Also rename _tojq value_sep to object_sep and fix formats_diagram.jq to use tomd5
2022-06-13 18:49:34 +02:00
Mattias Wadman
f46e7df7fd
Merge pull request #294 from wader/trun-data-offset
mp4: Properly use trun data offset
2022-06-07 18:40:55 +02:00
Mattias Wadman
7d25fbfdbb mp4: Properly use trun data offset
Each trun has it's own data offset, before the last offset was wrongly used
for all truns. Could also cause sample ranges to be beyond EOF.

tenc: Decode default constant iv

Fixes #292
2022-06-07 17:43:45 +02:00
Mattias Wadman
f7457ce893
Merge pull request #293 from wader/tovalue-fix-crash
dump: Skip JQValueEx if there are not options
2022-06-07 16:47:23 +02:00
Mattias Wadman
a64c28d927 dump: Skip JQValueEx if there are not options
I used to tojson and would crash in binary values are there were
not optins deciding how to format the strinh. Now just treat as utf8 string.
2022-06-07 16:39:45 +02:00
Mattias Wadman
068be0acf8
Merge pull request #291 from wader/matroska-allow-unknown
matroska: Update ebml_matroska.xml and allow unknown ids
2022-06-06 21:54:03 +02:00
Mattias Wadman
c92f4f13c1 matroska: Update ebml_matroska.xml and allow unknown ids
Update spec from https://raw.githubusercontent.com/ietf-wg-cellar/matroska-specification/master/ebml_matroska.xml
Allow unknown ids, decodeas "unknown" type with just binary data
Change "type" field to just a string, there is no type id number.
Make all type field symbols consistently lowercase
2022-06-06 21:43:42 +02:00
Mattias Wadman
5fbd54abf2
Merge pull request #290 from wader/mp4-refactor-trak-traf
mp4,senc: Refactor current track/moof tracking and add senc box support
2022-06-03 21:21:07 +02:00
Mattias Wadman
6b00297edd mp4,senc: Refactor current track/moof tracking and add senc box support
Keep track of curren using box data stack instead of refrences in the context.
2022-06-03 21:13:49 +02:00
Mattias Wadman
e58b4855eb
Merge pull request #288 from wader/bump-docker-golang-1.18.3
Update docker-golang from 1.18.2 to 1.18.3
2022-06-02 18:22:24 +02:00
Mattias Wadman
ff07baf5ee
Merge pull request #289 from wader/bump-github-go-version-1.18.3
Update github-go-version from 1.18.2, 1.18.2, 1.18.2 to 1.18.3
2022-06-02 18:22:11 +02:00
bump
c597f7f78d Update github-go-version from 1.18.2, 1.18.2, 1.18.2 to 1.18.3 2022-06-02 16:04:00 +00:00
bump
fbeabdc3e0 Update docker-golang from 1.18.2 to 1.18.3 2022-06-02 16:03:56 +00:00
Mattias Wadman
dbe84d3fb7
Merge pull request #287 from wader/gojq-rebase3
gojq: Update rebased fq fork
2022-06-01 17:35:58 +02:00
Mattias Wadman
c1a0cda5a8 gojq: Update rebased fq fork
Fix tostring for non-string JQValue:s, is now JSON
Update EOF error
2022-06-01 17:27:45 +02:00
Mattias Wadman
783387ed8a
Merge pull request #286 from wader/encoding-fix-incorrect-type
interp: Cast jq value to go value properly for encoding functions
2022-05-30 18:53:30 +02:00
Mattias Wadman
6b0880002d interp: Cast jq value to go value properly for encoding functions
Some encoding fuctions accept binary used string as input type, should be any.
Add cast helper functions, hopefully can be useful in future for even nicer
function bindings api.
2022-05-30 18:27:12 +02:00
Mattias Wadman
fd02df7efc
Merge pull request #285 from wader/toyaml-toml
interp: Improve type normalization and use it for toyaml and totoml
2022-05-28 20:58:20 +02:00
Mattias Wadman
735c443b37 interp: Improve type normalization and use it for toyaml and totoml
Use smallest int type for int64, uint6 and *big.Int

Fixes integer serialization for yaml and toml for small integers, othweise
they will end up as strings.
2022-05-28 20:33:37 +02:00
Mattias Wadman
c8a9cf9d6d
Merge pull request #284 from wader/tofromencodings
interp: Add to/from<encoding> for some common serialzations, encoding…
2022-05-28 16:39:15 +02:00
Mattias Wadman
3b717c3ba4 interp: Add to/from<encoding> for some common serialzations, encodings and hashes
Add toxml/fromxml for XML encoding, mighe be lossy on ordering
fromxml has {seq:bool} to add #seq attributes to improve ordering
toxml has {indent:number} to choose space indent depth

Add tojson, same as in jq but also has {indent:number} options

Add toyaml/fromyaml for YAML

Add totoml/fromtoml for TOML

Add tojq/fromjq for jq-flavored JSON (optional quotes for keys, comments and trailing commas support)

Add tocsv/fromcsv for CSV
formcvs takes {comma:string, comment:string} for custom separtor and comment character

Rename/split hex into tohex/fromhex
Rename/split base64 into tobase64/frombase64
tobase64/frombase64 takes {encoding:string} option for base64 flavour (std, url, rawstd, rawurl)

Add to/from<format> urlpath, urlquery, url, xmlentities, base64, hex

Add to<hash> md4, md5, sha1, sha256, sha512, sha3_224, sha3_256, sha3_384, sha3_512

Add to/from<encoding> iso8859-1, utf8, utf16, utf16le, utf16be
2022-05-28 16:31:20 +02:00
Mattias Wadman
3f9f6b817b
Merge pull request #283 from wader/pssh
mp4,bitio: Fix broken pssh decoding and add proper reader cloning to …
2022-05-28 13:50:30 +02:00
Mattias Wadman
7b27e506f1 mp4,bitio: Fix broken pssh decoding and add proper reader cloning to bitio
PSSH decoding probably got broken in some refactoring. system id is 16 bytes,
also scalar mapper should use cloned reader to not affect reader which in the case
broke reading system id bytes.

Add test with playread and widevine pssh boxes

Related to #282
2022-05-28 13:42:38 +02:00
Mattias Wadman
bba1e57942
Merge pull request #281 from wader/zip-fix-options-doc
zip: s/Decompress/Uncompress/
2022-05-26 20:00:49 +02:00
Mattias Wadman
aa694e3f20 zip: s/Decompress/Uncompress/ 2022-05-26 19:36:06 +02:00
Mattias Wadman
d07a8520b3
Merge pull request #280 from wader/zip-tests-cleanup
zip: Add uncompress=false test and some docs
2022-05-26 16:46:24 +02:00
Mattias Wadman
47350e46a6 zip: Add uncompress=false test and some docs 2022-05-26 16:39:01 +02:00
Mattias Wadman
32c74dad71
Merge pull request #279 from wader/intepr-help-example-fix
interp: help: Fix incorrect options example
2022-05-26 13:01:23 +02:00
Mattias Wadman
8021492197 interp: help: Fix incorrect options example 2022-05-26 12:52:51 +02:00
Mattias Wadman
d74fed3ab9
Merge pull request #278 from wader/zip-zip64-uncompress-option
zip: Add zip64 support and uncompress option
2022-05-26 12:52:09 +02:00
Mattias Wadman
e641274487 zip: Add zip64 support and uncompress option
{uncompress:boolean} uncompress and probe, default true
2022-05-26 12:46:50 +02:00
Mattias Wadman
537801997b
Merge pull request #277 from wader/readme-go118
doc: go 1.18 and improve intro text a bit
2022-05-23 22:03:44 +02:00
Mattias Wadman
a980656c15 doc: go 1.18 and improve intro text a bit 2022-05-23 21:57:45 +02:00