Browse Source

Add special notes on our syntax

Ian Adam Naval 5 years ago
parent
commit
811d6fdca5
1 changed files with 54 additions and 0 deletions
  1. 54
    0
      syntax.txt

+ 54
- 0
syntax.txt View File

@@ -0,0 +1,54 @@
1
+example raw output:
2
+[{
3
+	"StdOut": [
4
+		{"processes": {"pid": 1, "name": "init"}}
5
+	]
6
+},
7
+{
8
+	"StdOut": [
9
+		{"processes": {"pid": 2, "name": "bash"}}
10
+	]
11
+}]
12
+
13
+example queries:
14
+$ destreamify "stdout"
15
+[
16
+	{"processes": {"pid": 1, "name": "init"},
17
+	{"processes": {"pid": 2, "name": "bash"}}
18
+]
19
+
20
+$ destreamify "stdout~processes"
21
+[
22
+	{"pid": 1", "name": "init"},
23
+	{"pid": 2", "name": "bash"},
24
+]
25
+
26
+
27
+if we had a specialls that output stdout like this:
28
+[
29
+	"weird_derp": {
30
+		"files": [{"name": ____}]
31
+	}
32
+]
33
+
34
+Then we would use
35
+$ specialls --json | tributary "stdout>weird_derp"
36
+[
37
+	{"files": [{"name": _____}, ...]},
38
+	{"files": [{"name": _____}, ...]},
39
+]
40
+
41
+Then we can do
42
+
43
+$ specialls --json | tributary "stdout>weird_derp" | cat --json
44
+
45
+
46
+
47
+also valid
48
+----------
49
+stdout>"file name">name
50
+stdout>"file>name">name
51
+
52
+not valid
53
+---------
54
+stdout>file name>name

Loading…
Cancel
Save