Add special notes on our syntax

This commit is contained in:
Ian Adam Naval 2014-09-12 10:22:38 -04:00
parent a9f53a39ec
commit 811d6fdca5

54
syntax.txt Normal file
View File

@ -0,0 +1,54 @@
example raw output:
[{
"StdOut": [
{"processes": {"pid": 1, "name": "init"}}
]
},
{
"StdOut": [
{"processes": {"pid": 2, "name": "bash"}}
]
}]
example queries:
$ destreamify "stdout"
[
{"processes": {"pid": 1, "name": "init"},
{"processes": {"pid": 2, "name": "bash"}}
]
$ destreamify "stdout~processes"
[
{"pid": 1", "name": "init"},
{"pid": 2", "name": "bash"},
]
if we had a specialls that output stdout like this:
[
"weird_derp": {
"files": [{"name": ____}]
}
]
Then we would use
$ specialls --json | tributary "stdout>weird_derp"
[
{"files": [{"name": _____}, ...]},
{"files": [{"name": _____}, ...]},
]
Then we can do
$ specialls --json | tributary "stdout>weird_derp" | cat --json
also valid
----------
stdout>"file name">name
stdout>"file>name">name
not valid
---------
stdout>file name>name