mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
doc update for pip show
This commit is contained in:
31
README.md
31
README.md
@ -86,6 +86,7 @@ jc PARSER [OPTIONS]
|
||||
- `--mount` enables the `mount` parser
|
||||
- `--netstat` enables the `netstat` parser
|
||||
- `--pip-list` enables the `pip list` parser
|
||||
- `--pip-show` enables the `pip show` parser
|
||||
- `--ps` enables the `ps` parser
|
||||
- `--route` enables the `route` parser
|
||||
- `--ss` enables the `ss` parser
|
||||
@ -1121,6 +1122,36 @@ $ pip list | jc --pip-list -p
|
||||
...
|
||||
]
|
||||
|
||||
```
|
||||
### pip show
|
||||
```
|
||||
$ pip show wrapt wheel | jc --pip-show -p
|
||||
[
|
||||
{
|
||||
"name": "wrapt",
|
||||
"version": "1.11.2",
|
||||
"summary": "Module for decorators, wrappers and monkey patching.",
|
||||
"home_page": "https://github.com/GrahamDumpleton/wrapt",
|
||||
"author": "Graham Dumpleton",
|
||||
"author_email": "Graham.Dumpleton@gmail.com",
|
||||
"license": "BSD",
|
||||
"location": "/usr/local/lib/python3.7/site-packages",
|
||||
"requires": null,
|
||||
"required_by": "astroid"
|
||||
},
|
||||
{
|
||||
"name": "wheel",
|
||||
"version": "0.33.4",
|
||||
"summary": "A built-package format for Python.",
|
||||
"home_page": "https://github.com/pypa/wheel",
|
||||
"author": "Daniel Holth",
|
||||
"author_email": "dholth@fastmail.fm",
|
||||
"license": "MIT",
|
||||
"location": "/usr/local/lib/python3.7/site-packages",
|
||||
"requires": null,
|
||||
"required_by": null
|
||||
}
|
||||
]
|
||||
```
|
||||
### ps
|
||||
```
|
||||
|
@ -24,6 +24,7 @@ pydocmd simple jc.parsers.lsof+ > ../docs/parsers/lsof.md
|
||||
pydocmd simple jc.parsers.mount+ > ../docs/parsers/mount.md
|
||||
pydocmd simple jc.parsers.netstat+ > ../docs/parsers/netstat.md
|
||||
pydocmd simple jc.parsers.pip_list+ > ../docs/parsers/pip_list.md
|
||||
pydocmd simple jc.parsers.pip_show+ > ../docs/parsers/pip_show.md
|
||||
pydocmd simple jc.parsers.ps+ > ../docs/parsers/ps.md
|
||||
pydocmd simple jc.parsers.route+ > ../docs/parsers/route.md
|
||||
pydocmd simple jc.parsers.ss+ > ../docs/parsers/ss.md
|
||||
|
94
docs/parsers/pip_show.md
Normal file
94
docs/parsers/pip_show.md
Normal file
@ -0,0 +1,94 @@
|
||||
# jc.parsers.pip_show
|
||||
jc - JSON CLI output utility pip-show Parser
|
||||
|
||||
Usage:
|
||||
|
||||
specify --pip-show as the first argument if the piped input is coming from pip show
|
||||
|
||||
Compatibility:
|
||||
|
||||
'linux', 'darwin', 'cygwin', 'win32', 'aix', 'freebsd'
|
||||
|
||||
Examples:
|
||||
|
||||
$ pip show wrapt jc wheel | jc --pip-show -p
|
||||
[
|
||||
{
|
||||
"name": "wrapt",
|
||||
"version": "1.11.2",
|
||||
"summary": "Module for decorators, wrappers and monkey patching.",
|
||||
"home_page": "https://github.com/GrahamDumpleton/wrapt",
|
||||
"author": "Graham Dumpleton",
|
||||
"author_email": "Graham.Dumpleton@gmail.com",
|
||||
"license": "BSD",
|
||||
"location": "/usr/local/lib/python3.7/site-packages",
|
||||
"requires": null,
|
||||
"required_by": "astroid"
|
||||
},
|
||||
{
|
||||
"name": "wheel",
|
||||
"version": "0.33.4",
|
||||
"summary": "A built-package format for Python.",
|
||||
"home_page": "https://github.com/pypa/wheel",
|
||||
"author": "Daniel Holth",
|
||||
"author_email": "dholth@fastmail.fm",
|
||||
"license": "MIT",
|
||||
"location": "/usr/local/lib/python3.7/site-packages",
|
||||
"requires": null,
|
||||
"required_by": null
|
||||
}
|
||||
]
|
||||
|
||||
## info
|
||||
```python
|
||||
info(self, /, *args, **kwargs)
|
||||
```
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (dictionary) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
dictionary structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"version": string,
|
||||
"summary": string,
|
||||
"home_page": string,
|
||||
"author": string,
|
||||
"author_email": string,
|
||||
"license": string,
|
||||
"location": string,
|
||||
"requires": string,
|
||||
"required_by": string
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
```
|
||||
|
||||
Main text parsing function
|
||||
|
||||
Parameters:
|
||||
|
||||
data: (string) text data to parse
|
||||
raw: (boolean) output preprocessed JSON if True
|
||||
quiet: (boolean) suppress warning messages if True
|
||||
|
||||
Returns:
|
||||
|
||||
dictionary raw or processed structured data
|
||||
|
@ -24,18 +24,6 @@ Examples:
|
||||
"requires": null,
|
||||
"required_by": "astroid"
|
||||
},
|
||||
{
|
||||
"name": "jc",
|
||||
"version": "1.1.1",
|
||||
"summary": "This tool serializes the output of popular command line tools to structured JSON output.",
|
||||
"home_page": "https://github.com/kellyjonbrazil/jc",
|
||||
"author": "Kelly Brazil",
|
||||
"author_email": "kellyjonbrazil@gmail.com",
|
||||
"license": "MIT",
|
||||
"location": "/Users/kbrazil/git/jc",
|
||||
"requires": "ifconfig-parser",
|
||||
"required_by": null
|
||||
},
|
||||
{
|
||||
"name": "wheel",
|
||||
"version": "0.33.4",
|
||||
|
Reference in New Issue
Block a user