add gron + ripgrep-all
This commit is contained in:
parent
fe20f4396c
commit
b7286a509c
2 changed files with 170 additions and 0 deletions
51
technology/applications/cli/gron.md
Normal file
51
technology/applications/cli/gron.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
obj: application
|
||||
repo: https://github.com/tomnomnom/gron
|
||||
---
|
||||
|
||||
# gron
|
||||
gron transforms [JSON](../../files/JSON.md) into discrete assignments to make it easier to grep, [ripgrep](ripgrep.md) for what you want and see the absolute 'path' to it.
|
||||
|
||||
## Usage
|
||||
Transform [JSON](../../files/JSON.md) (from a file, URL, or stdin) into discrete assignments to make it greppable
|
||||
Usage: `gron [OPTIONS] [FILE|URL|-]`
|
||||
|
||||
### Options
|
||||
| Option | Description |
|
||||
| ------------------ | ------------------------------------------------------------------------------ |
|
||||
| `-u, --ungron` | Reverse the operation (turn assignments back into [JSON](../../files/JSON.md)) |
|
||||
| `-v, --values` | Print just the values of provided assignments |
|
||||
| `-c, --colorize` | Colorize output (default on tty) |
|
||||
| `-m, --monochrome` | Monochrome (don't colorize output) |
|
||||
| `-s, --stream` | Treat each line of input as a separate [JSON](../../files/JSON.md) object |
|
||||
| `-k, --insecure` | Disable certificate validation |
|
||||
| `-j, --json` | Represent gron data as [JSON](../../files/JSON.md) stream |
|
||||
| `--no-sort` | Don't sort output (faster) |
|
||||
|
||||
## Example
|
||||
Gron turns the following json file:
|
||||
```json
|
||||
{
|
||||
"key": "value",
|
||||
"num": 42,
|
||||
"b": true,
|
||||
"obj": {
|
||||
"sub": "key"
|
||||
},
|
||||
"lst": [1,2,3]
|
||||
}
|
||||
```
|
||||
|
||||
into this:
|
||||
```
|
||||
json = {};
|
||||
json.b = true;
|
||||
json.key = "value";
|
||||
json.lst = [];
|
||||
json.lst[0] = 1;
|
||||
json.lst[1] = 2;
|
||||
json.lst[2] = 3;
|
||||
json.num = 42;
|
||||
json.obj = {};
|
||||
json.obj.sub = "key";
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue