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

1010 Commits

Author SHA1 Message Date
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
Mattias Wadman
e59fe499fb
Merge pull request #276 from wader/gojq-update
gojq: Update rebased fq fork
2022-05-23 21:37:50 +02:00
Mattias Wadman
9a7ce14886 gojq: Update rebased fq fork
Use new gojq.TypeOf and gojq.Preview
2022-05-23 21:33:12 +02:00
Mattias Wadman
058dc03ac5
Merge pull request #275 from wader/gojq-update
gojq: Rebase fq fork
2022-05-23 11:31:12 +02:00
Mattias Wadman
59c7d0df6b gojq: Rebase fq fork 2022-05-23 11:26:09 +02:00
Mattias Wadman
67873ca944
Merge pull request #274 from wader/fqtest-paths
fqtest: Cleanup path usage
2022-05-21 20:09:28 +02:00
Mattias Wadman
377af133e0 fqtest: Cleanup path usage
Make cwd for a test script the directory where the script is.
Use relative paths
2022-05-21 20:03:25 +02:00
Mattias Wadman
b91788d550
Merge pull request #273 from wader/interp-is-type-refactor
interp: Add internal _is_<type> helpers
2022-05-20 16:55:23 +02:00
Mattias Wadman
95e619659b interp: Add internal _is_<type> helpers 2022-05-20 16:49:00 +02:00
Mattias Wadman
e1dc5c5737
Merge pull request #272 from wader/go-1.18
fq: Use go 1.18
2022-05-20 15:32:27 +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
7bfa88cdb5
Merge pull request #271 from wader/mp3-cleanup
mp3: Use d.FieldValueU and some cleanup
2022-05-20 13:15:31 +02:00
Mattias Wadman
3780375d76 mp3: Use d.FieldValueU and some cleanup 2022-05-20 12:50:40 +02:00
Mattias Wadman
ed42d23683
Merge pull request #270 from wader/dump-ctx-revert
interp: Refactor dump and revert #259 for now
2022-05-20 12:46:08 +02:00
Mattias Wadman
2dc509ab2f interp: Refactor dump and revert #259 for now
Causes address bar to not be shown in some cases.
Will have to rethink and redo the whole dump thing somehow.
2022-05-20 12:38:43 +02:00
Mattias Wadman
cc33bb1ee4
Merge pull request #269 from wader/readline-update
readline: Update fq fork
2022-05-19 17:06:22 +02:00
Mattias Wadman
54dcdce909 readline: Update fq fork
Rebase on master
Cherry-pick https://github.com/chzyer/readline/pull/202
2022-05-19 16:56:22 +02:00
Mattias Wadman
285109e4f3
Merge pull request #268 from wader/mp4-lpcm-skip-samples
mp4: Skip samples for lpcm tracks
2022-05-19 16:08:31 +02:00
Mattias Wadman
ba844eb06a mp4: Skip fields for pcm samples for now
Will produce one field per sample which is a bit too much.
Maybe in some future fq can have smart array types that could handle this better.

Also add data_format per track to make it easier to understand things.
2022-05-19 16:00:42 +02:00
Mattias Wadman
4c84f56e23
Merge pull request #265 from wader/bump-make-golangci-lint-1.46.2
Update make-golangci-lint from 1.46.1 to 1.46.2
2022-05-17 18:16:27 +02:00
Mattias Wadman
b885ffc55c
Merge pull request #266 from wader/bump-github-golangci-lint-1.46.2
Update github-golangci-lint from 1.46.1 to 1.46.2
2022-05-17 18:16:18 +02:00
Mattias Wadman
0d8fb8a97f
Merge pull request #267 from wader/include-rel-crash
interp: Fix crash when including relatve path when no search paths ar…
2022-05-17 18:15:46 +02:00
Mattias Wadman
8dde3ef5b1 interp: Fix crash when including relatve path when no search paths are set 2022-05-17 18:05:10 +02:00
bump
3ffa9efb23 Update github-golangci-lint from 1.46.1 to 1.46.2
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.46.2
2022-05-17 16:03:54 +00:00
bump
06757119c5 Update make-golangci-lint from 1.46.1 to 1.46.2 2022-05-17 16:03:52 +00:00
Mattias Wadman
877c3a1e9d
Merge pull request #263 from wader/bump-make-golangci-lint-1.46.1
Update make-golangci-lint from 1.46.0 to 1.46.1
2022-05-12 20:46:42 +02:00
Mattias Wadman
40fdb75b04
Merge pull request #264 from wader/bump-github-golangci-lint-1.46.1
Update github-golangci-lint from 1.46.0 to 1.46.1
2022-05-12 20:46:31 +02:00
bump
75b5946cca Update github-golangci-lint from 1.46.0 to 1.46.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.46.1
2022-05-12 16:08:48 +00:00
bump
456742ead6 Update make-golangci-lint from 1.46.0 to 1.46.1 2022-05-12 16:08:46 +00:00
Mattias Wadman
7b971c212e
Merge pull request #261 from wader/bump-docker-golang-1.18.2
Update docker-golang from 1.18.1 to 1.18.2
2022-05-11 18:26:58 +02:00
Mattias Wadman
72e4417c45
Merge pull request #262 from wader/bump-github-go-version-1.18.2
Update github-go-version from 1.18.1, 1.18.1, 1.18.1 to 1.18.2
2022-05-11 18:24:07 +02:00
bump
3017e8b4fd Update github-go-version from 1.18.1, 1.18.1, 1.18.1 to 1.18.2 2022-05-11 16:09:45 +00:00
bump
210940a432 Update docker-golang from 1.18.1 to 1.18.2 2022-05-11 16:09:41 +00:00
Mattias Wadman
469116f3b3
Merge pull request #260 from wader/mono-unicode-fix
interp: dump: Fix column truncate issue with unicode bars
2022-05-11 00:44:50 +02:00