mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-25 00:37:31 +02:00
add docs
This commit is contained in:
@ -5,11 +5,52 @@ Usage:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ hosts | jc --hosts -p
|
$ cat /etc/hosts | jc --hosts -p
|
||||||
[]
|
[
|
||||||
|
{
|
||||||
$ hosts | jc --hosts -p -r
|
"ip": "127.0.0.1",
|
||||||
[]
|
"hostname": [
|
||||||
|
"localhost"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip": "127.0.1.1",
|
||||||
|
"hostname": [
|
||||||
|
"kbrazil-ubuntu"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip": "::1",
|
||||||
|
"hostname": [
|
||||||
|
"ip6-localhost",
|
||||||
|
"ip6-loopback"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip": "fe00::0",
|
||||||
|
"hostname": [
|
||||||
|
"ip6-localnet"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip": "ff00::0",
|
||||||
|
"hostname": [
|
||||||
|
"ip6-mcastprefix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip": "ff02::1",
|
||||||
|
"hostname": [
|
||||||
|
"ip6-allnodes"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip": "ff02::2",
|
||||||
|
"hostname": [
|
||||||
|
"ip6-allrouters"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
"""
|
"""
|
||||||
import jc.utils
|
import jc.utils
|
||||||
|
|
||||||
@ -28,14 +69,15 @@ def process(proc_data):
|
|||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"hosts": string,
|
"ip": string,
|
||||||
"bar": boolean,
|
"hostname": [
|
||||||
"baz": integer
|
string
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# rebuild output for added semantic information
|
# no additional processing needed
|
||||||
return proc_data
|
return proc_data
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user