Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For #53
Usage;
which will use
jq
shellout with the split arg as the jq query (allowing you to use ANY jq functionand it produces the following files with each document in the
blah
subfolder:it does this by parsing into multidocs initially and running jq shellouts for each document so we can get both the key (for the filename) and the value in 2 jq calls (so 2*N shellouts currently), and at the end it would write the files.
it's not super efficient, 8 shellouts, but it only takes .1s with a release build with all serial IO, so if it gets annoying there's plenty of juice to squeeze out of it.
It's also a completely different mode that only happens when you pass
--split
, and need to fiddle with it some more, but the basic idea works well. Should work for all file formats, and is possibly a nicer step towards refactoring to smarter doc handling (as is it's a bit sprawling and duplicating fns).