mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
add other shell info. clean up parser table
This commit is contained in:
17
README.md
17
README.md
@ -145,7 +145,7 @@ option.
|
|||||||
### Parsers
|
### Parsers
|
||||||
|
|
||||||
| Argument | Command or Filetype | Documentation |
|
| Argument | Command or Filetype | Documentation |
|
||||||
|--------------|-------------------------|-------------------|
|
|-------------------|---------------------------------------------------------|-------------------------------------------------------------------------|
|
||||||
| ` --acpi` | `acpi` command parser | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/acpi) |
|
| ` --acpi` | `acpi` command parser | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/acpi) |
|
||||||
| ` --airport` | `airport -I` command parser | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/airport) |
|
| ` --airport` | `airport -I` command parser | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/airport) |
|
||||||
| ` --airport-s` | `airport -s` command parser | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/airport_s) |
|
| ` --airport-s` | `airport -s` command parser | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/airport_s) |
|
||||||
@ -442,6 +442,21 @@ If a UTC timezone can be detected in the text of the command output, the
|
|||||||
timestamp will be timezone aware and have a `_utc` suffix on the key name.
|
timestamp will be timezone aware and have a `_utc` suffix on the key name.
|
||||||
(e.g. `epoch_utc`) No other timezones are supported for aware timestamps.
|
(e.g. `epoch_utc`) No other timezones are supported for aware timestamps.
|
||||||
|
|
||||||
|
## Use In Other Shells
|
||||||
|
`jc` can be used in most any shell. Some modern shells have JSON deserialization
|
||||||
|
capabilities built-in which makes using `jc` even more convenient.
|
||||||
|
|
||||||
|
For example, the following is possible in [NGS](https://ngs-lang.org/)
|
||||||
|
(Next Generation Shell):
|
||||||
|
```bash
|
||||||
|
myvar = ``jc dig www.google.com``[0].answer[0].data
|
||||||
|
```
|
||||||
|
This allows direct assignment of a JSON value to a variable in a single line
|
||||||
|
of code.
|
||||||
|
|
||||||
|
For more examples of how to use `jc` in other shells, see this
|
||||||
|
[WIKI article](https://github.com/kellyjonbrazil/jc/wiki/Using-jc-With-Different-Shells).
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
Some parsers like `dig`, `xml`, `csv`, etc. will work on any platform. Other
|
Some parsers like `dig`, `xml`, `csv`, etc. will work on any platform. Other
|
||||||
parsers that convert platform-specific output will generate a warning message if
|
parsers that convert platform-specific output will generate a warning message if
|
||||||
|
@ -145,8 +145,8 @@ option.
|
|||||||
### Parsers
|
### Parsers
|
||||||
|
|
||||||
| Argument | Command or Filetype | Documentation |
|
| Argument | Command or Filetype | Documentation |
|
||||||
|--------------|-------------------------|-------------------|{% for parser in jc.parsers %}
|
|-------------------|---------------------------------------------------------|-------------------------------------------------------------------------|{% for parser in jc.parsers %}
|
||||||
| `{{ parser.argument }}` | {{ parser.description }} | [📃](https://kellyjonbrazil.github.io/jc/docs/parsers/{{ parser.name }}) |{% endfor %}
|
| `{{ "{:>15}".format(parser.argument) }}` | {{ "{:<55}".format(parser.description) }} | {{ "{:<70}".format("[📃](https://kellyjonbrazil.github.io/jc/docs/parsers/" + parser.name + ")") }} |{% endfor %}
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
- `-a` about `jc`. Prints information about `jc` and the parsers (in JSON, of
|
- `-a` about `jc`. Prints information about `jc` and the parsers (in JSON, of
|
||||||
@ -343,6 +343,21 @@ If a UTC timezone can be detected in the text of the command output, the
|
|||||||
timestamp will be timezone aware and have a `_utc` suffix on the key name.
|
timestamp will be timezone aware and have a `_utc` suffix on the key name.
|
||||||
(e.g. `epoch_utc`) No other timezones are supported for aware timestamps.
|
(e.g. `epoch_utc`) No other timezones are supported for aware timestamps.
|
||||||
|
|
||||||
|
## Use In Other Shells
|
||||||
|
`jc` can be used in most any shell. Some modern shells have JSON deserialization
|
||||||
|
capabilities built-in which makes using `jc` even more convenient.
|
||||||
|
|
||||||
|
For example, the following is possible in [NGS](https://ngs-lang.org/)
|
||||||
|
(Next Generation Shell):
|
||||||
|
```bash
|
||||||
|
myvar = ``jc dig www.google.com``[0].answer[0].data
|
||||||
|
```
|
||||||
|
This allows direct assignment of a JSON value to a variable in a single line
|
||||||
|
of code.
|
||||||
|
|
||||||
|
For more examples of how to use `jc` in other shells, see this
|
||||||
|
[WIKI article](https://github.com/kellyjonbrazil/jc/wiki/Using-jc-With-Different-Shells).
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
Some parsers like `dig`, `xml`, `csv`, etc. will work on any platform. Other
|
Some parsers like `dig`, `xml`, `csv`, etc. will work on any platform. Other
|
||||||
parsers that convert platform-specific output will generate a warning message if
|
parsers that convert platform-specific output will generate a warning message if
|
||||||
|
Reference in New Issue
Block a user