mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
6030b45735
commit
55698e637d
@ -25,8 +25,8 @@
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="tail">
|
||||
<p>Tails (watches for things to be added) to the configured file. (Linux/Mac ONLY)</p>
|
||||
<p>This will not work on Windows filesystems, as it relies on the <b>tail -F</b> command.</p>
|
||||
<p>Tails (watches for things to be added) to the configured file.</p>
|
||||
<p>Note: On Windows you may need to close the file between writes for any updates to be registered.</p>
|
||||
<h3>Outputs</h3>
|
||||
<ul>
|
||||
<li>Text (UTF-8) files will be returned as strings.</li>
|
||||
@ -40,7 +40,7 @@
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
filetype: {value:"text"},
|
||||
split: {value:"[\r]{0,1}\n"},
|
||||
split: {value:"[\\r]{0,1}\\n"},
|
||||
filename: {value:"",required:true}
|
||||
},
|
||||
color:"BurlyWood",
|
||||
|
@ -9,7 +9,7 @@ module.exports = function(RED) {
|
||||
|
||||
this.filename = n.filename;
|
||||
this.filetype = n.filetype || "text";
|
||||
this.split = new RegExp(n.split || "[\r]{0,1}\n");
|
||||
this.split = new RegExp(n.split.replace(/\\r/g,'\r').replace(/\\n/g,'\n').replace(/\\t/g,'\t') || "[\r]{0,1}\n");
|
||||
var node = this;
|
||||
|
||||
var fileTail = function() {
|
||||
@ -42,7 +42,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
else {
|
||||
node.tout = setTimeout(function() { fileTail(); },10000);
|
||||
node.warn(RED._("tail.errors.filenotfound") + node.filename);
|
||||
node.warn(RED._("tail.errors.filenotfound") + ": "+node.filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,7 @@
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="tail">
|
||||
<p>設定したファイルの末尾を出力(追加されたデータを監視)します。(Linux/Macのみ)</p>
|
||||
<p>このノードは<b>tail -F</b>コマンドを内部で利用しているため、Windowsファイルシステムでは動作しません。</p>
|
||||
<p>設定したファイルの末尾を出力(追加されたデータを監視)します.</p>
|
||||
<h3>出力</h3>
|
||||
<ul>
|
||||
<li>(UTF-8形式の)テキストファイルは文字列を返却。</li>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "node-red-node-tail",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "A node to tail files for Node-RED",
|
||||
"dependencies": {
|
||||
"tail": "^2.0.0"
|
||||
"tail": "^2.0.2"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user