201 lines
No EOL
4.5 KiB
JSON
201 lines
No EOL
4.5 KiB
JSON
[
|
|
{
|
|
"id": "bdd57acc.2edc48",
|
|
"type": "inject",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "",
|
|
"props": [
|
|
{
|
|
"p": "payload"
|
|
},
|
|
{
|
|
"p": "topic",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"repeat": "",
|
|
"crontab": "",
|
|
"once": false,
|
|
"onceDelay": 0.1,
|
|
"topic": "",
|
|
"payload": "",
|
|
"payloadType": "date",
|
|
"x": 180,
|
|
"y": 220,
|
|
"wires": [
|
|
[
|
|
"7a069b01.0c2324"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "1fd12220.33953e",
|
|
"type": "comment",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "Creating a message stream from lines of data",
|
|
"info": "Read file node can break read text into messages with individual lines. The messages creates a stream of messages.",
|
|
"x": 230,
|
|
"y": 140,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "ab6eb213.2a08d",
|
|
"type": "file",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "",
|
|
"filename": "/tmp/hello.txt",
|
|
"appendNewline": true,
|
|
"createDir": false,
|
|
"overwriteFile": "true",
|
|
"encoding": "none",
|
|
"x": 500,
|
|
"y": 220,
|
|
"wires": [
|
|
[
|
|
"b7ed49b0.649fb8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "c48d8ae0.9ff3a8",
|
|
"type": "debug",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "",
|
|
"active": true,
|
|
"tosidebar": true,
|
|
"console": false,
|
|
"tostatus": false,
|
|
"complete": "false",
|
|
"statusVal": "",
|
|
"statusType": "auto",
|
|
"x": 770,
|
|
"y": 320,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "b7ed49b0.649fb8",
|
|
"type": "file in",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "",
|
|
"filename": "/tmp/hello.txt",
|
|
"format": "lines",
|
|
"chunk": false,
|
|
"sendError": false,
|
|
"encoding": "none",
|
|
"x": 240,
|
|
"y": 320,
|
|
"wires": [
|
|
[
|
|
"83073ebe.fcce4"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "3c33e69f.6a04ba",
|
|
"type": "comment",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "↑read data from file breaking lines into messages",
|
|
"info": "",
|
|
"x": 340,
|
|
"y": 360,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "3598bf7d.5712a",
|
|
"type": "comment",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "↓write to /tmp/hello.txt",
|
|
"info": "",
|
|
"x": 520,
|
|
"y": 180,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "7a069b01.0c2324",
|
|
"type": "template",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "data",
|
|
"field": "payload",
|
|
"fieldType": "msg",
|
|
"format": "handlebars",
|
|
"syntax": "plain",
|
|
"template": "Apple\nBanana\nGrape\nOrange",
|
|
"output": "str",
|
|
"x": 330,
|
|
"y": 220,
|
|
"wires": [
|
|
[
|
|
"ab6eb213.2a08d"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "8d4ed1d0.821fe",
|
|
"type": "join",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "",
|
|
"mode": "auto",
|
|
"build": "string",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"key": "topic",
|
|
"joiner": "\\n",
|
|
"joinerType": "str",
|
|
"accumulate": "false",
|
|
"timeout": "",
|
|
"count": "",
|
|
"reduceRight": false,
|
|
"x": 590,
|
|
"y": 320,
|
|
"wires": [
|
|
[
|
|
"c48d8ae0.9ff3a8"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "83073ebe.fcce4",
|
|
"type": "switch",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "< D",
|
|
"property": "payload",
|
|
"propertyType": "msg",
|
|
"rules": [
|
|
{
|
|
"t": "lt",
|
|
"v": "D",
|
|
"vt": "str"
|
|
}
|
|
],
|
|
"checkall": "true",
|
|
"repair": true,
|
|
"outputs": 1,
|
|
"x": 430,
|
|
"y": 320,
|
|
"wires": [
|
|
[
|
|
"8d4ed1d0.821fe"
|
|
]
|
|
]
|
|
},
|
|
{
|
|
"id": "2088e195.f7aebe",
|
|
"type": "comment",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "↓filter data before \"D\"",
|
|
"info": "",
|
|
"x": 480,
|
|
"y": 280,
|
|
"wires": []
|
|
},
|
|
{
|
|
"id": "b848cdc7.61e06",
|
|
"type": "comment",
|
|
"z": "6312c0588348b2d4",
|
|
"name": "↑join to single string",
|
|
"info": "",
|
|
"x": 630,
|
|
"y": 360,
|
|
"wires": []
|
|
}
|
|
] |