This commit is contained in:
gongwenxin
2025-08-28 16:20:24 +08:00
parent 61e533cddf
commit 73e887ebf4
1539 changed files with 360926 additions and 0 deletions
@@ -0,0 +1,35 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="inject">
<p>手動或定期得將消息注入流程中消息的有效荷載可以為多種類型包括字符串JavaScript對象或當前時間</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">various</span></dt>
<dd>指定的消息的有效荷載</dd>
<dt class="optional">topic <span class="property-type">字符串</span></dt>
<dd>可以在節點中配置的可選屬性</dd>
</dl>
<h3>詳細</h3>
<p>通過使用特定的有效荷載注入節點可以啟動流程默認有效荷載是當前時間的時間戳以毫秒為單位自1970年1月1日起</p>
<p>該節點還支持注入字符串數字布林值JavaScript對象或流程/全局上下文值</p>
<p>默認情況下節點可以通過在編輯器中單擊節點按鈕來手動觸發同時也可以被設置為定期或按計劃注入</p>
<p>另一個可選的設置是在每次啟動流程時注入一次</p>
<p>可以指定的最大<i>間隔</i>596/24 使scheduler</p>
<p><b>注意</b>:選項<i>“時間間隔” </i><i>特定時間 </i>使用了標準cron系統。這意味著因此“20分鐘”並不表示在此之後20分鐘,而是每小時的20分鐘,40分鐘。如果您希望設定為從現在開始的每20分鐘,那麽請使用<i>“間隔” </i>選項</p>
<p><b>注意</b>: 使</p>
</script>
@@ -0,0 +1,25 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="debug">
<p>調試側邊欄選項卡和運行時日志中顯示選定的消息屬性 默認情況下它會顯示<code>msg.payload</code>JSONata</p>
<h3>詳細</h3>
<p>調試側邊欄會提供已發消息的結構化視圖方便您查詢消息的結構</p>
<p>JavaScript對象和數組可以根據需要來折疊或擴展緩衝區對象可以顯示爲原始數據也可以顯示爲字符串</p>
<p>對任意條消息調試側邊欄還會顯示接收消息的時間發送消息的節點以及消息類型等信息單擊源節點ID將在工作區中顯示該節點</p>
<p>節點上的按鈕可用于啓用或禁用其輸出建議禁用或刪除所有未使用的調試節點</p>
<p>還可以通過配置節點將所有消息發送到運行時的日志或將簡短的數據32個字符內在調試節點下的狀態文本上顯示</p>
</script>
@@ -0,0 +1,24 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="complete">
<p>當另一個節點完成對消息的處理時觸發流程</p>
<h3>詳細</h3>
<p>如果一個節點通知運行時它已完成消息的處理該節點可用于觸發第二個流程</p>
<p>這個節點可以與沒有輸出端口的節點一起使用例如在使用電子郵件發送節點來發送郵件後觸發一個流程</p>
<p>此節點只能被設置爲處理流程中某個所選節點的事件與Catch節點不同您不能指定所有節點模式並以流程中的所有節點爲目標</p>
<p>並非所有節點都會觸發此事件這取決于它們是否支持于Node-RED 1.0中引入的此功能</p>
</script>
@@ -0,0 +1,36 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="catch">
<p>捕獲由同一標簽頁上的節點引發的錯誤</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>error.message <span class="property-type">字符串</span></dt>
<dd>錯誤消息</dd>
<dt>error.source.id <span class="property-type">字符串</span></dt>
<dd>引發錯誤的節點的ID</dd>
<dt>error.source.type <span class="property-type">字符串</span></dt>
<dd>引發錯誤的節點的類型</dd>
<dt>error.source.name <span class="property-type">字符串</span></dt>
<dd>引發錯誤的節點的名稱如果已設置</dd>
</dl>
<h3>詳細</h3>
<p>如果節點在處理消息時抛出錯誤則流程通常會停止該節點可用于捕獲那些錯誤並通過專用流程進行處理</p>
<p>默認情況下該節點將捕獲同一標簽頁上任何節點抛出的錯誤或者它可以針對特定節點或配置爲僅捕獲另一個目標捕獲節點尚未捕獲的錯誤</p>
<p>當錯誤發生時所有匹配的catch節點都會收到錯誤消息</p>
<p>如果在子流程中發送了錯誤則該錯誤將由子流程中的任意捕獲節點處理如果子流程中不存在捕獲節點則那錯誤將被傳播到子流程實例所在的標簽頁</p>
<p>如果消息已經具有<code>error</code><code>error</code><code>_error</code></p>
</script>
@@ -0,0 +1,33 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="status">
<p>獲取在同一標簽頁上的其他節點的狀態消息</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>status.text <span class="property-type">字符串</span></dt>
<dd>狀態文本</dd>
<dt>status.source.type <span class="property-type">字符串</span></dt>
<dd>報告狀態的節點的類型</dd>
<dt>status.source.id <span class="property-type">字符串</span></dt>
<dd>報告狀態的節點的ID</dd>
<dt>status.source.name <span class="property-type">字符串</span></dt>
<dd>報告狀態的節點的名稱如果已設置</dd>
</dl>
<h3>詳細</h3>
<p>該節點不包含<code>有效荷載</code></p>
<p>默認情況下節點會獲取同一工作空間標簽頁上報告所有節點的狀態可以通過配置來設定目標節點</p>
</script>
@@ -0,0 +1,31 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="link in">
<p>在流程之間創建虛擬連線</p>
<h3>詳細</h3>
<p>該節點可以連接到任何標簽頁上存在的任何<code>link out</code></p>
<p>僅當選擇鏈接節點時才會顯示鏈接節點之間的鏈接如果有指向另一個選項卡的鏈接則顯示一個虛擬節點單擊該虛擬節點將帶您到相應的選項卡</p>
<p><b>注意</b></p>
</script>
<script type="text/x-red" data-help-name="link out">
<p>在流程之間創建虛擬連線</p>
<h3>詳細</h3>
<p>該節點可以連接到任何標簽頁上存在的任何<code>link in</code></p>
<p>僅當選擇鏈接節點時才會顯示鏈接節點之間的鏈接如果有指向另一個選項卡的鏈接則顯示一個虛擬節點單擊該虛擬節點將帶您到相應的選項卡</p>
<p><b>注意</b></p>
</script>
@@ -0,0 +1,21 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="comment">
<p>可用于向流程添加注釋的節點</p>
<h3>詳細</h3>
<p>編輯面板接受Markdown語法輸入的文本將在信息側面板中顯示</p>
</script>
@@ -0,0 +1,24 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="unknown">
<p>您安裝的Node-RED無法識別該節點的類型</p>
<h3>詳細</h3>
<p><i>如果在此狀態下部署節點其配置會被保存但是在安裝缺少的類型之前流程不會開始</i></p>
<p>使用<code> Menu-Manage Palette </code>使<b>npm install &lt;module&gt;</b>Node-Red</p>
<p>另一種可能是您已經安裝了此節點類型但是缺少必須的依賴項您應檢查Node-RED的啓動日志中是否有與缺少節點有關的錯誤消息</p>
<p>以上方法都不適用時您可以聯系該流程的作者以獲取缺少的節點類型的副本</p>
</script>
@@ -0,0 +1,51 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="function">
<p>定義對接收到的消息進行處理的JavaScript代碼函數的主體</p>
<p>輸入消息在名爲<code>msg</code>JavaScript</p>
<p>通常<code>msg</code><code>msg.payload</code></p>
<p>該函數一般會返回一個消息對象或多個消息對象但也可以爲了停止流程而什麽都不返回</p>
<h3>詳細</h3>
<p>請參見<a target="_blank" href="https://nodered.org/docs/writing-functions.html">在線文檔</a></p>
<h4>傳送消息</h4>
<p>要將消息傳遞到流程中的下一個節點請返回消息或調用<code>node.send(messages)</code></p>
<p>它將返回/send:</p>
<ul>
<li>單個消息對象 - 傳遞給連接到第一個輸出的節點</li>
<li>消息對象數組傳遞給連接到相應輸出的節點</li>
</ul>
<p>如果數組元素是數組則將多個消息發送到相應的輸出</p>
<p>無論return方法是單個值還是數組元素如果返回值爲null則不會發送任何消息</p>
<h4>日志輸出和錯誤處理</h4>
<p>使用以下功能輸出日志信息和輸出錯誤</p>
<ul>
<li><code>node.log("Log message")</code></li>
<li><code>node.warn("Warning")</code></li>
<li><code>node.error("Error")</code></li>
</ul>
</p>
<p>使用catch節點可以進行錯誤處理 要由catch節點處理請將<code>msg</code><code>node.error</code></p>
<pre>node.error("Error",msg);</pre>
<h4>訪問節點信息</h4>
<p>您可以使用以下屬性來在代碼中引用節點ID和名稱</p>
<ul>
<li><code>node.id</code> - ID</li>
<li><code>node.name</code> - </li>
</ul>
<h4>使用環境變量</h4>
<p>環境變量可以通過<code>env.get("MY_ENV_VAR")</code></p>
</script>
@@ -0,0 +1,37 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="switch">
<p>按屬性值來分配消息的傳送路線</p>
<h3>詳細</h3>
<p>根據接收到的消息評估指定的規則然後將消息發送到與匹配的規則相對應的輸出端口</p>
<p>可以將節點設置爲一旦發現一個匹配的規則則停止後續的匹配</p>
<p>對于評估規則可以使用消息屬性流程上下文/全局上下文屬性環境變量和JSONata表達式的評估結果</p>
<h4>規則</h4>
<p>有四種規則</p>
<ol>
<li><b></b></li>
<li><b>順序</b></li>
<li><b>JSONata表達式</b></li>
<li><b>其他</b></li>
</ol>
<h4>注釋</h4>
<p><code>is true/false</code><code>is null</code> </p>
<p><code>is empty</code><code>null</code><code>undefined</code></p>
<h4>處理消息序列</h4>
<p>默認情況下節點不會修改<code>msg.parts</code></p>
<p>可以啓用<b>重建消息序列</b><code>nodeMessageBufferMaxLength</code></p>
</script>
@@ -0,0 +1,33 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="change">
<p>設置更改刪除或移動消息流程上下文或全局上下文的屬性</p>
<p>如果指定了多個規則則將按定義的順序來應用它們</p>
<h3>詳細</h3>
<p>可用的操作有</p>
<dl class="message-properties">
<dt>設置</dt>
<dd>設置一個屬性該值可以是多種不同類型也可以從現有消息或上下文屬性中獲取</dd>
<dt>置換</dt>
<dd>搜索並替換屬性 如果啓用了正則表達式則可以爲replace with屬性指定捕獲組例如<code>$1</code> </dd>
<dt>刪除</dt>
<dd>刪除一個屬性</dd>
<dt>移動</dt>
<dd>移動或者重命名一個屬性</dd>
</dl>
<p>類型"expression"使用<a href="http://jsonata.org/" target="_new">JSONata</a></p>
</script>
@@ -0,0 +1,40 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="range">
<p>將數值映射爲另一個區間的數值</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">數值</span></dt>
<dd>有效荷載<i>一定</i>. </dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">數值</span></dt>
<dd>被映射到新區間的數值</dd>
</dl>
<h3>詳細</h3>
<p>該節點將線性縮放所接收到的數值在默認情況下結果不限于節點中定義的範圍</p>
<p><i>縮放並限制到目標範圍</i></p>
<p><i>在目標範圍內縮放並折疊</i></p>
<p>例如輸入0-10映射到0-100</p>
<table style="outline-width:#888 solid thin">
<tr><th width="80px">模式</th><th width="80px"></th><th width="80px"></th></tr>
<tr><td><center>scale</center></td><td><center>12</center></td><td><center>120</center></td></tr>
<tr><td><center>limit</center></td><td><center>12</center></td><td><center>100</center></td></tr>
<tr><td><center>wrap</center></td><td><center>12</center></td><td><center>20</center></td></tr>
</table>
</script>
@@ -0,0 +1,46 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="template">
<p>根據提供的模板設置屬性</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>msg <span class="property-type">object</span></dt>
<dd>一個msg對象其中包含著用于填充模板的信息</dd>
<dt class="optional">template <span class="property-type">string</span></dt>
<dd><code>msg.payload</code>msg</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>msg <span class="property-type">object</span></dt>
<dd>由來自傳入msg的屬性來填充已配置的模板後輸出的帶有屬性的msg</dd>
</dl>
<h3>詳細</h3>
<p>默認情況下使用<i><a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache</a></i>格式如有需要也可以切換其他格式</p>
<p>例如:
<pre>Hello {{payload.name}}. Today is {{date}}</pre>
<p>receives a message containing:
<pre>{
date: "Monday",
payload: {
name: "Fred"
}
}</pre>
<p>輸出的消息將會是:
<pre>Hello Fred. Today is Monday</pre>
<p>也可以使用流程上下文或全局上下文中的屬性<code>{{flow.name}}</code><code>{{global.name}}</code><code>store</code>使<code>{{flow[store].name}}</code><code>{{global[store].name}}</code>
<p><b>注意</b>默認情況下,<i>mustache</i>將在其替換的值中轉義任何非字母數字或HTML實體爲了防止這種情況請使用<code>{{{triple}}}</code>
</script>
@@ -0,0 +1,32 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="delay">
<p>對通過節點的消息進行延遲發送或限制</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">delay <span class="property-type">數值</span></dt>
<dd>設置要應用于消息的延遲以毫秒爲單位僅當節點配置爲允許消息去覆蓋配置的默認延遲間隔時此選項才適用</dd>
<dt class="optional">reset</dt>
<dd>如果接收到的消息將此屬性設置爲任何值則將清空該節點保留的所有的未發送消息</dd>
<dt class="optional">flush</dt>
<dd>如果接收到的消息的此屬性設置爲任何值則將立即發送該節點保留的所有未發送消息</dd>
</dl>
<h3>詳細</h3>
<p>當配置爲延遲發送消息時延遲間隔可以是一個固定值一個範圍內的隨機值或爲每個消息動態設置</p>
<p>當配置爲對消息進行限制時它們的傳遞將分散在配置的時間段內狀態顯示隊列中當前的消息數可以選擇在中間消息到達時丟棄它們</p>
<p>速率限制可以應用于所有消息也可以根據<code>msg.topic</code></p>
</script>
@@ -0,0 +1,36 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="trigger">
<p>触发后将会发送一条消息如果被拓展或重置则可以选择发送第二条消息</p>
<h3>输入</h3>
<dl class="message-properties">
<dt class="optional">delay <span class="property-type">数值</span></dt>
<dd>設置要應用於消息的延遲(以毫秒為單位)僅當節點配置為允許消息去覆蓋設置的的默認延遲間隔時此選項才適用</dd>
<dt class="optional">reset</dt>
<dd>如果收到带有此属性的消息则将清除当前正在进行的任何超时或重复且不会触发任何消息</dd>
</dl>
<h3>详细</h3>
<p>该节点可用于在流程中创建一个超时 默认情况下当它收到一条消息时它将发送一条带有<code>1</code>250<code>0</code>使Raspberry Pi GPIOLED</p>
<p>可以将发送的每个消息的有效荷载配置为各种值包括不发送任何内容的选项例如将初始消息设置为<i>nothing</i></p>
<p>如果设置为<i>字符串</i>类型,则该节点支持<i>mustache</i>模板语法</p>
<p>如果節點中啟用了該選項則可以通過<code> msg.delay </code></p>
<p>如果节点收到具有<code>reset</code><code></code></p>
<p>可以将节点配置为以固定的时间间隔重新发送消息直到被收到的消息重置为止</p>
<p>可选可以将节点配置为将带有<code>msg.topic</code></p>
</script>
@@ -0,0 +1,74 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="exec">
<p>運行系統命令並返回其輸出</p>
<p>可以將節點配置爲等待命令完成或者在命令生成時發送其輸出</p>
<p>運行的命令可以在節點中配置也可以由收到的消息提供</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">payload <span class="property-type">字符串</span></dt>
<dd>如果這樣配置則將被附加到執行命令中</dd>
<dt class="optional">kill <span class="property-type">字符串</span></dt>
<dd>指定發送到現有的exec節點進程的kill信號類型</dd>
<dt class="optional">pid <span class="property-type">數值|字符串</span></dt>
<dd>要殺死的現有exec節點進程的進程ID</dd>
</dl>
<h3>輸出</h3>
<ol class="node-ports">
<li>標准輸出(stdout)
<dl class="message-properties">
<dt>payload <span class="property-type">字符串</span></dt>
<dd>命令的標准輸出</dd>
</dl>
<dl class="message-properties">
<dt>rc <span class="property-type">object</span></dt>
<dd>僅執行模式一個返回代碼對象的副本在端口3上也可用</dd>
</dl>
</li>
<li>標准error輸出(stderr)
<dl class="message-properties">
<dt>payload <span class="property-type">字符串</span></dt>
<dd>命令的標准錯誤輸出</dd>
</dl>
<dl class="message-properties">
<dt>rc <span class="property-type">object</span></dt>
<dd>僅執行模式一個返回代碼對象的副本在端口3上也可用</dd>
</dl>
</li>
<li>返回代碼
<dl class="message-properties">
<dt>payload <span class="property-type">object</span></dt>
<dd>一個包含返回代碼以及<code>message</code><code>signal</code></dd>
</dl>
</li>
</ol>
<h3>詳細</h3>
<p>默認情況下使用<code>exec</code>調調<code>{code0}</code></p>
<p>可選可以選擇使用<code>spawn</code>stdoutstderr<code>{code0}</code></p>
<p>錯誤可能會在第三個端口<code>msg.payload</code><code>message</code><code>signal</code></p>
<p>運行的命令是在節點內定義的帶有附加<code>msg.payload</code></p>
<p>帶空格的命令或參數應該用引號引起來<code>這是一個參數</code></p>
<p>返回的<code>有效荷載</code>通常是<i>字符串</i>類型除非檢測到非UTF8字符在這種情況下它會是<i>buffer</i></p>
<p>節點處于活動狀態時該節點的狀態圖標和PID將可見對此更改可以通過<code>Status</code></p>
<h4>殺死進程</h4>
<p>發送<code>msg.kill</code><code>msg.kill</code><code>SIGINT</code><code>SIGQUIT</code><code>SIGHUP</code><code>SIGTERM</code></p>
<p>如果節點有多個進程在運行則還必須設置<code>msg.pid</code>PID</p>
<p>如果<code>超時</code></p>
<p>提示如果運行Python應用程序則可能需要使用<code>-u</code></p>
</script>
@@ -0,0 +1,965 @@
{
"common": {
"label": {
"payload": "內容",
"topic": "主題",
"name": "名稱",
"username": "使用者名稱",
"password": "密碼",
"property": "屬性",
"selectNodes": "選擇節點...",
"expand": "擴展"
},
"status": {
"connected": "已連接",
"not-connected": "未連接",
"disconnected": "已斷開",
"connecting": "連接中",
"error": "錯誤",
"ok": "確定"
},
"notification": {
"error": "<strong>錯誤</strong>: __message__",
"errors": {
"not-deployed": "節點未部署",
"no-response": "伺服器無反應",
"unexpected": "發生意外錯誤 (__status__) __message__"
}
},
"errors": {
"nooverride": "警告: 資訊的屬性已經不可以改寫節點的屬性. 詳情參考 bit.ly/nr-override-msg-props"
}
},
"inject": {
"inject": "注入",
"repeat": "重複 = __repeat__",
"crontab": "crontab = __crontab__",
"stopped": "停止",
"failed": "注入失敗: __error__",
"label": {
"properties": "屬性",
"repeat": "重複",
"flow": "流上下午",
"global": "全局上下文",
"str": "字符串",
"num": "數值",
"bool": "布爾值",
"json": "JSON對象",
"bin": "buffer",
"date": "時間戳",
"env": "環境變量",
"object": "對象",
"string": "字符串",
"boolean": "布爾值",
"number": "數值",
"Array": "數組",
"invalid": "無效的JSON對象"
},
"timestamp": "時間戳記",
"none": "無",
"interval": "週期性執行",
"interval-time": "指定時間段並週期性執行",
"time": "指定時間",
"seconds": "秒",
"minutes": "分鐘",
"hours": "小時",
"between": "介於",
"previous": "之前數值",
"at": "在",
"and": "至",
"every": "每隔",
"days": [
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期天"
],
"on": "在",
"onstart": "立刻執行於",
"onceDelay": "秒後, 此後",
"success": "成功注入: __label__",
"errors": {
"failed": "注入失敗, 請查看日誌",
"toolong": "週期過長",
"invalid-expr": "無效的JSONata表達式: __error__"
},
"tip": "<b>注意:</b> \"指定時間段並週期性執行\" 和 \"指定時間\" 會使用cron系統.<br/> 詳情查看信息頁."
},
"catch": {
"catch": "監測所有節點",
"catchNodes": "監測 __number__ 個節點",
"catchUncaught": "捕獲:未捕獲",
"label": {
"source": "監測範圍",
"selectAll": "全選",
"uncaught": "忽略其他捕獲節點處理的錯誤"
},
"scope": {
"all": "所有節點",
"selected": "指定節點"
}
},
"status": {
"status": "報告所有節點狀態",
"statusNodes": "報告 __number__ 個節點狀態",
"label": {
"source": "報告狀態範圍",
"sortByType": "按類型排序"
},
"scope": {
"all": "所有節點",
"selected": "指定節點"
}
},
"complete": {
"completeNodes": "完成: __number__ 個節點"
},
"debug": {
"output": "輸出",
"status": "狀態",
"none": "None",
"invalid-exp": "無效的JSONata表達式: __error__",
"msgprop": "資訊屬性",
"msgobj": "與調試輸出相同",
"autostatus": "自動的",
"to": "目標",
"debtab": "除錯窗口",
"tabcon": "除錯窗口及Console",
"toSidebar": "除錯窗口",
"toConsole": "Console",
"toStatus": "節點狀態 (32位元字元)",
"severity": "級別",
"notification": {
"activated": "成功啟動: __label__",
"deactivated": "成功取消: __label__"
},
"sidebar": {
"label": "除錯窗口",
"name": "名稱",
"filterAll": "所有節點",
"filterSelected": "已選節點",
"filterCurrent": "當前流程",
"debugNodes": "除錯節點",
"clearLog": "清空日誌",
"filterLog": "過濾日誌",
"openWindow": "在新視窗打開",
"copyPath": "復制路徑",
"copyPayload": "復制值",
"pinPath": "固定展開"
},
"messageMenu": {
"collapseAll": "折疊所有路徑",
"clearPinned": "清空已固定路徑",
"filterNode": "過濾此節點",
"clearFilter": "清空過濾條件"
}
},
"link": {
"linkIn": "輸入",
"linkOut": "輸出"
},
"tls": {
"tls": "TLS設置",
"label": {
"use-local-files": "使用本地密鑰及證書檔",
"upload": "上傳",
"cert": "證書",
"key": "私密金鑰",
"passphrase": "密碼",
"ca": "CA證書",
"verify-server-cert": "驗證伺服器憑證",
"servername": "服務器名"
},
"placeholder": {
"cert": "憑證路徑 (PEM 格式)",
"key": "私密金鑰路徑 (PEM 格式)",
"ca": "CA憑證路徑 (PEM 格式)",
"passphrase": "私密金鑰密碼 (可選)",
"servername": "用於SNI"
},
"error": {
"missing-file": "未提供證書/金鑰檔案"
}
},
"exec": {
"exec": "exec",
"spawn": "spawn",
"label": {
"command": "命令",
"append": "追加",
"timeout": "超時",
"timeoutplace": "可選填",
"return": "輸出",
"seconds": "秒",
"stdout": "標準輸出",
"stderr": "標準錯誤輸出",
"retcode": "返回碼"
},
"placeholder": {
"extraparams": "額外的輸入參數"
},
"opt": {
"exec": "當命令完成時 - exec模式",
"spawn": "當命令進行時 - spawn模式"
},
"oldrc": "使用舊式輸出 (相容模式)"
},
"function": {
"function": "函數",
"label": {
"function": "函數",
"initialize": "設置",
"finalize": "關閉",
"outputs": "輸出"
},
"text": {
"initialize": "// 部署節點後,此處添加的代碼將運行一次。 \n",
"finalize": "// 節點正在停止或重新部署時,將運行此處添加的代碼。 \n"
},
"error": {
"inputListener": "無法在函數中監聽對'注入'事件",
"non-message-returned": "函數節點嘗試返回類型為 __type__ 的資訊"
}
},
"template": {
"template": "模板",
"label": {
"template": "模版",
"property": "屬性",
"format": "語法高亮",
"syntax": "格式",
"output": "輸出為",
"mustache": "Mustache 模版",
"plain": "純文字",
"json": "JSON",
"yaml": "YAML",
"none": "無"
},
"templatevalue": "This is the payload: {{payload}} !"
},
"delay": {
"action": "行為設置",
"for": "時長",
"delaymsg": "延遲每一條資訊",
"delayfixed": "固定延遲時間",
"delayvarmsg": "允許msg.delay複寫延遲時長",
"randomdelay": "隨機延遲",
"limitrate": "限制資訊頻率",
"limitall": "所有資訊",
"limittopic": "每一個msg.topic",
"fairqueue": "依次發送每一個topic",
"timedqueue": "發所有topic",
"milisecs": "毫秒",
"secs": "秒",
"sec": "秒",
"mins": "分",
"min": "分",
"hours": "小時",
"hour": "小時",
"days": "天",
"day": "天",
"between": "介於",
"and": "至",
"rate": "速度",
"msgper": "信息 每",
"dropmsg": "不傳輸中間資訊",
"label": {
"delay": "延遲",
"variable": "變數",
"limit": "限制",
"limitTopic": "限制主題",
"random": "隨機",
"units": {
"second": {
"plural": "秒",
"singular": "秒"
},
"minute": {
"plural": "分鐘",
"singular": "分鐘"
},
"hour": {
"plural": "小時",
"singular": "小時"
},
"day": {
"plural": "天",
"singular": "天"
}
}
},
"error": {
"buffer": "緩衝了超過 1000 條資訊",
"buffer1": "緩衝了超過 10000 條資訊"
}
},
"trigger": {
"send": "發送",
"then": "然後",
"then-send": "然後發送",
"output": {
"string": "字串",
"number": "數字",
"existing": "現有資訊物件",
"original": "原本資訊物件",
"latest": "最新資訊物件",
"nothing": "無"
},
"wait-reset": "等待被重置",
"wait-for": "等待",
"wait-loop": "週期性重發",
"for": "處理",
"bytopics": "每個msg.topic",
"alltopics": "所有消息",
"duration": {
"ms": "毫秒",
"s": "秒",
"m": "分鐘",
"h": "小時"
},
"extend": " 如有新資訊,延長延遲",
"override": "使用msg.delay覆蓋延遲時間",
"second": " 發送第二條消息到單獨的輸出",
"label": {
"trigger": "觸發",
"trigger-block": "觸發並阻止",
"trigger-loop": "週期性重發",
"reset": "重置觸發節點條件 如果:",
"resetMessage": "msg.reset已設置",
"resetPayload": "msg.payload等於",
"resetprompt": "可選填"
}
},
"comment": {
"comment": "注釋"
},
"unknown": {
"label": {
"unknown": "未知"
},
"tip": "<p>此節點是您安裝,但Node-RED所不知道的類型。</p><p><i>如果在此狀態下部署節點,那麼它的配置將被保留,但是流程將不會啟動,直到安裝缺少的節點。</i></p><p>有關更多説明,請參閱資訊側欄</p>"
},
"mqtt": {
"label": {
"broker": "服務端",
"example": "e.g. localhost",
"output": "輸出",
"qos": "QoS",
"retain": "保持",
"clientid": "使用者端ID",
"port": "埠",
"keepalive": "Keepalive計時(秒)",
"cleansession": "使用新的會話",
"use-tls": "使用 TLS",
"tls-config": "TLS 設置",
"verify-server-cert": "驗證伺服器憑證",
"compatmode": "使用舊式MQTT 3.1支援"
},
"sections-label": {
"birth-message": "連接時發送的消息(出生消息)",
"will-message": "意外斷開連接時的發送消息(Will消息)",
"close-message": "斷開連接前發送的消息(關閉消息)"
},
"tabs-label": {
"connection": "連接",
"security": "安全",
"messages": "消息"
},
"placeholder": {
"clientid": "留白則自動隨機生成",
"clientid-nonclean": "如非新會話,必須設置使用者端ID",
"will-topic": "留白將禁止Will資訊",
"birth-topic": "留白將禁止Birth資訊",
"close-topic": "留白以禁用關閉消息"
},
"state": {
"connected": "已連接到服務端: __broker__",
"disconnected": "已斷開與服務端 __broker__ 的連結",
"connect-failed": "與服務端 __broker__ 的連接失敗"
},
"retain": "保留",
"output": {
"buffer": "Buffer",
"string": "字串",
"base64": "Base64編碼字串",
"auto": "自動檢測 (字符串或buffer)",
"auto-detect": "自动检测 (已解析的JSON对象、字符串或buffer)",
"json": "解析的JSON對象"
},
"true": "是",
"false": "否",
"tip": "提示: 若希望通過msg屬性對topic(資訊), qos及retain(保留)進行設置, 則將上述項留白",
"errors": {
"not-defined": "主題未設置",
"missing-config": "未設置服務端",
"invalid-topic": "主題無效",
"nonclean-missingclientid": "使用者端ID未設定,使用新會話",
"invalid-json-string": "無效的JSON字符串",
"invalid-json-parse": "無法解析JSON字符串"
}
},
"httpin": {
"label": {
"method": "請求方式",
"url": "URL",
"doc": "文字檔",
"return": "返回",
"upload": "接受檔案上傳?",
"status": "狀態碼",
"headers": "Header",
"other": "其他",
"paytoqs": "將msg.payload附加為查詢字符串參數",
"utf8String": "UTF8格式的字符串",
"binaryBuffer": "二進制buffer",
"jsonObject": "解析的JSON對象",
"authType": "類型",
"bearerToken": "Token"
},
"setby": "- 用 msg.method 設定 -",
"basicauth": "基本認證",
"use-tls": "使用安全連接 (SSL/TLS) ",
"tls-config": "TLS 設置",
"basic": "基本認證",
"digest": "摘要認證",
"bearer": "bearer認證",
"use-proxy": "使用代理服務器",
"persist": "對連接啟用keep-alive",
"proxy-config": "代理服務器設置",
"use-proxyauth": "使用代理身份驗證",
"noproxy-hosts": "代理例外",
"utf8": "UTF-8 字串",
"binary": "二進位資料",
"json": "JSON對象",
"tip": {
"in": "相對URL",
"res": "發送到此節點的消息<b>必須</b>來自<i>http input</i>節點",
"req": "提示:如果JSON解析失敗,則獲取的字串將按原樣返回."
},
"httpreq": "http 請求",
"errors": {
"not-created": "當httpNodeRoot為否時,無法創建http-in節點",
"missing-path": "無路徑",
"no-response": "無響應物件",
"json-error": "JSON 解析錯誤",
"no-url": "未設定 URL",
"deprecated-call": "__method__ 方法已棄用",
"invalid-transport": "非HTTP傳輸請求",
"timeout-isnan": "超時值不是有效數字,忽略",
"timeout-isnegative": "超時值為負,忽略",
"invalid-payload": "無效的有效載荷"
},
"status": {
"requesting": "請求中"
}
},
"websocket": {
"label": {
"type": "類型",
"path": "路徑",
"url": "URL",
"subprotocol": "子协议"
},
"listenon": "監聽",
"connectto": "連接",
"sendrec": "發送/接受",
"payload": "有效載荷",
"message": "完整資訊",
"tip": {
"path1": "預設情況下,<code>payload</code>將包含要發送或從Websocket接收的資料。偵聽器可以配置為以JSON格式的字串發送或接收整個消息物件.",
"path2": "這條路徑將相對於 <code>__path__</code>.",
"url1": "URL 應該使用ws:&#47;&#47;或者wss:&#47;&#47;方案並指向現有的websocket監聽器.",
"url2": "預設情況下,<code>payload</code> 將包含要發送或從Websocket接收的資料。可以將使用者端配置為以JSON格式的字串發送或接收整個消息物件.",
"headers": "標頭僅在協定升級機制期間提交,從 HTTP 到 WS/WSS 協定."
},
"status": {
"connected": "連接數 __count__",
"connected_plural": "連接數 __count__"
},
"errors": {
"connect-error": "ws連接發生了錯誤: ",
"send-error": "發送時發生了錯誤: ",
"missing-conf": "未設置伺服器",
"duplicate-path": "同一路徑上不能有兩個WebSocket偵聽器: __path__"
}
},
"watch": {
"watch": "watch",
"label": {
"files": "文件",
"recursive": "遞迴所有子資料夾"
},
"placeholder": {
"files": "逗號分開文件或資料夾"
},
"tip": "在Windows上,請務必使用雙斜杠 \\\\ 來隔開資料夾名字"
},
"tcpin": {
"label": {
"type": "類型",
"output": "輸出",
"port": "埠",
"host": "主機位址",
"payload": "的有效載荷",
"delimited": "分隔符號號",
"close-connection": "是否在成功發送每條資訊後斷開連接?",
"decode-base64": "用 Base64 解碼信息?",
"server": "伺服器",
"return": "返回",
"ms": "毫秒",
"chars": "字元"
},
"type": {
"listen": "監聽",
"connect": "連接",
"reply": "回應 TCP"
},
"output": {
"stream": "字串流",
"single": "單一",
"buffer": "Buffer",
"string": "字串",
"base64": "Base64 字串"
},
"return": {
"timeout": "指定時間後",
"character": "當收到某個字元為",
"number": "指定字元數",
"never": "永不 - 保持連接",
"immed": "馬上 - 不需要等待回復"
},
"status": {
"connecting": "正在連接到 __host__:__port__",
"connected": "已經連接到 __host__:__port__",
"listening-port": "監聽埠 __port__",
"stopped-listening": "已停止監聽埠",
"connection-from": "連接來自 __host__:__port__",
"connection-closed": "連接已關閉 __host__:__port__",
"connections": "__count__ 個連接",
"connections_plural": "__count__ 個連接"
},
"errors": {
"connection-lost": "連接中斷 __host__:__port__",
"timeout": "超時關閉通訊端連接,埠 __port__",
"cannot-listen": "無法監聽埠 __port__, 錯誤: __error__",
"error": "錯誤: __error__",
"socket-error": "通訊端連接錯誤來自 __host__:__port__",
"no-host": "主機位址或埠未設定",
"connect-timeout": "連接逾時",
"connect-fail": "連接失敗"
}
},
"udp": {
"label": {
"listen": "監聽",
"onport": "埠",
"using": "使用",
"output": "輸出",
"group": "組",
"interface": "本地IP",
"send": "發送一個",
"toport": "到埠",
"address": "地址",
"decode-base64": "是否解碼Base64編碼的資訊?",
"interfaceprompt": "(可選)本地 IP 綁定到"
},
"placeholder": {
"interface": "(可選)eth0的IP地址",
"interfaceprompt": "(可選) 要綁定的本地接口或地址",
"address": "目標IP位址"
},
"udpmsgs": "udp信息",
"mcmsgs": "群播信息",
"udpmsg": "udp信息",
"bcmsg": "廣播資訊",
"mcmsg": "群播信息",
"output": {
"buffer": "Buffer",
"string": "字串",
"base64": "Base64編碼字串"
},
"bind": {
"random": "綁定到任意本地埠",
"local": "綁定到本地埠",
"target": "綁定到目標埠"
},
"tip": {
"in": "提示:確保您的防火牆將允許資料進入",
"out": "提示:如果要使用<code>msg.ip</code>和<code>msg.port</code>設置,請將位址和埠留空",
"port": "正在使用埠: "
},
"status": {
"listener-at": "udp 監聽器正在監聽 __host__:__port__",
"mc-group": "udp 群播到 __group__",
"listener-stopped": "udp 監聽器已停止",
"output-stopped": "udp 輸出已停止",
"mc-ready": "udp 群播已準備好: __outport__ -> __host__:__port__",
"bc-ready": "udp 廣播已準備好: __outport__ -> __host__:__port__",
"ready": "udp 已準備好: __outport__ -> __host__:__port__",
"ready-nolocal": "udp 已準備好: __host__:__port__",
"re-use": "udp 重用通訊端: __outport__ -> __host__:__port__"
},
"errors": {
"access-error": "UDP 訪問錯誤, 你可能需要root許可權才能接入1024以下的埠",
"error": "錯誤: __error__",
"bad-mcaddress": "無效的群播地址",
"interface": "必須是指定介面的IP位址",
"ip-notset": "udp: IP地址未設定",
"port-notset": "udp: 埠未設定",
"port-invalid": "udp: 無效埠號碼",
"alreadyused": "udp: 埠已被佔用",
"ifnotfound": "udp: 接口 __iface__ 未發現"
}
},
"switch": {
"switch": "switch",
"label": {
"property": "屬性",
"rule": "規則",
"repair": "重建資訊佇列"
},
"previous": "先前值",
"and": "與",
"checkall": "全選所有規則",
"stopfirst": "接受第一條匹配資訊後停止",
"ignorecase": "忽略大小寫",
"rules": {
"btwn": "在之間",
"cont": "包含",
"regex": "匹配規則運算式",
"true": "為真",
"false": "為假",
"null": "為空",
"nnull": "非空",
"istype": "類型是",
"empty": "為空",
"nempty": "非空",
"head": "head",
"tail": "tail",
"index": "index between",
"exp": "JSONata運算式",
"else": "除此以外",
"hask": "擁有鍵"
},
"errors": {
"invalid-expr": "無效的JSONata運算式: __error__",
"too-many": "Switch節點中有太多待定信息"
}
},
"change": {
"label": {
"rules": "規則",
"rule": "規則",
"set": "設定 __property__",
"change": "修改 __property__",
"delete": "刪除 __property__",
"move": "移動 __property__",
"changeCount": "修改: __count__ 條規矩",
"regex": "使用規則運算式"
},
"action": {
"set": "設定",
"change": "修改",
"delete": "刪除",
"move": "轉移",
"to": "到",
"search": "搜索",
"replace": "替代為"
},
"errors": {
"invalid-from": "無效的'from'屬性: __error__",
"invalid-json": "無效的'to'JSON 屬性",
"invalid-expr": "無效的JSONata運算式: __error__",
"no-override": "無法設置非對象類型的屬性: __property__"
}
},
"range": {
"range": "range",
"label": {
"action": "操作",
"inputrange": "映射輸入資料",
"resultrange": "至目標範圍",
"from": "從",
"to": "到",
"roundresult": "取最接近整數?"
},
"placeholder": {
"min": "e.g. 0",
"maxin": "e.g. 99",
"maxout": "e.g. 255"
},
"scale": {
"payload": "按比例msg.payload",
"limit": "按比例並設定界限至目標範圍",
"wrap": "按比例並包含在目標範圍內"
},
"tip": "提示: 此節點僅對數字有效",
"errors": {
"notnumber": "不是一個數字"
}
},
"csv": {
"label": {
"columns": "列",
"separator": "分隔符號",
"c2o": "CSV至對象",
"o2c": "對象至CSV",
"input": "輸入",
"skip-s": "忽略前",
"skip-e": "行",
"firstrow": "第一行包含列名",
"output": "輸出",
"includerow": "包含列名行",
"newline": "分行符號",
"usestrings": "解析數值",
"include_empty_strings": "包含空字符串",
"include_null_values": "包含空值"
},
"placeholder": {
"columns": "用逗號分割列名"
},
"separator": {
"comma": "逗號",
"tab": "Tab",
"space": "空格",
"semicolon": "分號",
"colon": "冒號",
"hashtag": "井號",
"other": "其他..."
},
"output": {
"row": "每行一條信息",
"array": "僅一條資訊 [陣列]"
},
"newline": {
"linux": "Linux (\\n)",
"mac": "Mac (\\r)",
"windows": "Windows (\\r\\n)"
},
"hdrout": {
"none": "從不發送列標題",
"all": "總是發送列標題",
"once": "發送頭一次,直到 msg.reset"
},
"errors": {
"csv_js": "此節點僅處理CSV字串或JS物件",
"obj_csv": "對象->CSV轉換未設定列模版",
"bad_csv": "CSV數據格式錯誤-輸出可能已損壞。"
}
},
"html": {
"label": {
"select": "選取項",
"output": "輸出",
"in": "in"
},
"output": {
"html": "選定元素的html內容",
"text": "選定元素的純文字內容",
"attr": "包含選定元素的所有屬性的物件"
},
"format": {
"single": "一條資訊 [陣列]",
"multi": "多條資訊,每條一個元素"
}
},
"json": {
"errors": {
"dropped-object": "忽略非物件格式的有效負載",
"dropped": "忽略不支援格式的有效負載類型",
"dropped-error": "轉換有效負載失敗",
"schema-error": "JSON架構錯誤",
"schema-error-compile": "JSON架構錯誤: 未能編譯架構"
},
"label": {
"o2j": "對象至JSON",
"pretty": "格式化JSON字串",
"action": "操作",
"property": "屬性",
"actions": {
"toggle": "JSON字串與物件互轉",
"str": "總是轉為JSON字串",
"obj": "總是轉為JS對象"
}
}
},
"yaml": {
"errors": {
"dropped-object": "忽略非物件格式的有效負載",
"dropped": "忽略不支援格式的有效負載類型",
"dropped-error": "轉換有效負載失敗"
}
},
"xml": {
"label": {
"represent": "XML標籤屬性的屬性名稱",
"prefix": "標籤文本內容的屬性名稱",
"advanced": "高級選項",
"x2o": "XML到物件選項"
},
"errors": {
"xml_js": "此節點僅處理XML字串或JS物件."
}
},
"file": {
"label": {
"filename": "檔案名",
"action": "行為",
"addnewline": "向每個有效載荷添加分行符號(\\n)?",
"createdir": "創建目錄(如果不存在)?",
"outputas": "輸出",
"breakchunks": "分拆成塊",
"breaklines": "分拆成行",
"sendError": "發生錯誤時發送消息(傳統模式)",
"encoding": "編碼",
"deletelabel": "刪除 __file__",
"utf8String": "UTF8字符串",
"binaryBuffer": "二進制buffer"
},
"action": {
"append": "追加至文件",
"overwrite": "複寫文件",
"delete": "刪除檔"
},
"output": {
"utf8": "一個utf8字串",
"buffer": "一個Buffer物件",
"lines": "每行一條信息",
"stream": "一個Buffer流"
},
"status": {
"wrotefile": "寫入至文件: __file__",
"deletedfile": "刪除檔: __file__",
"appendedfile": "追加至文件: __file__"
},
"encoding": {
"none": "默認",
"native": "Native",
"unicode": "Unicode",
"japanese": "日本",
"chinese": "中國",
"korean": "韓國",
"taiwan": "臺灣/香港",
"windows": "Windows代碼頁",
"iso": "ISO代碼頁",
"ibm": "IBM代碼頁",
"mac": "Mac代碼頁",
"koi8": "KOI8代碼頁",
"misc": "其它"
},
"errors": {
"nofilename": "未指定檔案名",
"invaliddelete": "警告:無效刪除。請在配置對話方塊中使用特定的刪除選項",
"deletefail": "無法刪除檔: __error__",
"writefail": "無法寫入文件: __error__",
"appendfail": "無法追加到文件: __error__",
"createfail": "檔創建失敗: __error__"
},
"tip": "提示: 檔案名應該是絕對路徑,否則它將相對於Node-RED進程的工作目錄。"
},
"split": {
"split": "split",
"intro": "基於以下類型拆分<code>msg.payload</code>:",
"object": "<b>對象</b>",
"objectSend": "每個鍵值對作為單個消息發送",
"strBuff": "<b>字串</b> / <b>Buffer</b>",
"array": "<b>陣列</b>",
"splitThe": "Split",
"splitUsing": "拆分使用",
"splitLength": "固定長度",
"stream": "作為消息流處理",
"addname": " 複製鍵到 "
},
"join": {
"join": "join",
"mode": {
"mode": "模式",
"auto": "自動",
"merge": "合併序列",
"reduce": "縮減序列",
"custom": "手動"
},
"combine": "合併每個",
"completeMessage": "完整的消息",
"create": "輸出為",
"type": {
"string": "字串",
"array": "陣列",
"buffer": "Buffer",
"object": "鍵值對對象",
"merged": "合併對象"
},
"using": "使用此值",
"key": "作為鍵",
"joinedUsing": "合併符號",
"send": "發送資訊:",
"afterCount": "達到一定數量的資訊時",
"count": "數量",
"subsequent": "和每個後續的消息",
"afterTimeout": "第一條消息的若幹時間後",
"seconds": "秒",
"complete": "在收到存在<code>msg.complete</code>的消息後",
"tip": "此模式假定此節點與<i>split</i>相連, 或者接收到的消息有正確配置的<code>msg.parts</code>屬性.",
"too-many": "join節點中有太多待定信息",
"merge": {
"topics-label": "合併主題",
"topics": "主題",
"topic": "主題",
"on-change": "當收到一個新主題時發送已合併資訊"
},
"reduce": {
"exp": "Reduce運算式",
"exp-value": "exp",
"init": "初始值",
"right": "反向求值(從後往前)",
"fixup": "Fix-up exp"
},
"errors": {
"invalid-expr": "無效的JSONata運算式: __error__",
"invalid-type": "無法添加 __error__ 至buffer"
}
},
"sort": {
"sort": "排序",
"target": "排序屬性",
"seq": "資訊佇列",
"key": "鍵值",
"elem": "元素值",
"order": "順序",
"ascending": "昇冪",
"descending": "降冪",
"as-number": "作為數值",
"invalid-exp": "排序節點中存在無效的JSONata運算式",
"too-many": "排序節點中有太多待定信息",
"clear": "清空排序節點中的待定資訊"
},
"batch": {
"batch": "batch",
"mode": {
"label": "模式",
"num-msgs": "按指定數量分組",
"interval": "按時間間隔分組",
"concat": "按主題分組"
},
"count": {
"label": "分組數量",
"overlap": "隊末隊首重疊數量",
"count": "數量",
"invalid": "無效的分組數量或重疊數量"
},
"interval": {
"label": "時間間隔",
"seconds": "秒",
"empty": "無數據到達時發送空資訊"
},
"concat": {
"topics-label": "主題",
"topic": "主題"
},
"too-many": "batch節點中有太多待定信息",
"unexpected": "未知模式",
"no-parts": "資訊中沒有parts屬性"
}
}
@@ -0,0 +1,19 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="tls-config">
<p>TLS連接的配置選項</p>
</script>
@@ -0,0 +1,22 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="http proxy">
<p>HTTP代理的配置選項</p>
<h3>詳細</h3>
<p>訪問代理例外列表中的主機時將不使用任何代理</p>
</script>
@@ -0,0 +1,70 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="mqtt in">
<p>連接到MQTT代理並訂閱來自指定主題的消息</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
<dd>如果不是二進制buffer的話就是字符串</dd>
<dt>topic <span class="property-type">字符串</span></dt>
<dd>MQTT主題使用<code>/</code></dd>
<dt>qos <span class="property-type">數值</span> </dt>
<dd>QoS服務質量0, 最多一次 1, 最少一次 2, 只一次</dd>
<dt>retain <span class="property-type">布爾值</span></dt>
<dd>值爲true時表示消息已保留且可能是舊的</dd>
</dl>
<h3>詳細</h3>
<p>訂閱主題可以包括MQTT通配符+一個級別多個級別</p>
<p>使用該節點您首先需要建立與MQTT代理的連接通過單擊鉛筆圖標來進行配置</p>
<p>如有需要幾個MQTT節點輸入或輸出可以共享相同的代理連接</p>
</script>
<script type="text/x-red" data-help-name="mqtt out">
<p>連接到MQTT代理並發布消息</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
<dd>要發布的有效負載如果未設置此屬性則不會發送任何消息要發送空白消息請將此屬性設置爲空字符串</dd>
<dt class="optional">topic <span class="property-type">字符串</span></dt>
<dd>要發布的MQTT主題</dd>
<dt class="optional">qos <span class="property-type">number</span></dt>
<dd>QoS服務質量0, 最多一次 1, 最少一次 2, 只一次默認值爲0</dd>
<dt class="optional">retain <span class="property-type">布爾值</span></dt>
<dd>設置爲<code>true</code><code>false</code></dd>
</dl>
<h3>詳細</h3>
<p><code>msg.payload</code>ObjectJSONbuffer</p>
<p>可以在節點中配置所使用的主題或者如果留爲空白則可以通過<code>msg.topic</code></p>
<p>同樣可以在節點中配置QoS和保留值或者如果保留空白則分別由<code>msg.qos</code><code>msg.retain</code></p>
<p>該節點需要與要配置的MQTT代理的連接通過單擊鉛筆圖標進行配置</p>
<p>如果需要幾個MQTT節點輸入或輸出可以共享相同的代理連接</p>
</script>
<script type="text/x-red" data-help-name="mqtt-broker">
<p>與MQTT代理的連接設置</p>
<p>創建與代理的連接設置可以在<code>MQTT In</code><code>MQTT Out</code></p>
<p>如果未爲該節點設置客戶端ID並且設置了會話初始化則將生成一個隨機客戶端ID設置客戶端ID時請確保它對于連接目標處的代理是唯一的</p>
<h4>Birth Message</h4>
<p>建立連接後發布在以配置主題中的消息</p>
<h4>Close Message</h4>
<p>在連接正常結束之前重新部署或者關閉了節點時發布在以配置主題中的消息</p>
<h4>Will Message</h4>
<p>當節點意外丟失連接時由代理發布的消息</p>
<h4>WebSockets</h4>
<p>可以將節點配置成使用WebSocket連接使用WebSocket時請在服務器字段中以完整格式描述連接目標的URI 例如</p>
<pre>ws://example.com:4000/mqtt</pre>
</script>
@@ -0,0 +1,81 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="http in">
<p>創建用于創建Web服務的HTTP端點</p>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload</dt>
<dd>GET請求包含任何查詢字符串參數的對象或者包含HTTP請求正文</dd>
<dt>req<span class="property-type">object</span></dt>
<dd>HTTP請求對象該對象包含有關請求信息的多個屬性
<ul>
<li><code>body</code> - </li>
<li><code>headers</code> - HTTP</li>
<li><code>query</code> - </li>
<li><code>params</code> - </li>
<li><code>cookies</code> - cookie</li>
<li><code>files</code> - </li>
</ul>
</dd>
<dt>res<span class="property-type">object</span></dt>
<dd>HTTP響應對象此屬性不應直接使用<code>HTTP Response</code></dd>
</dl>
<h3>詳細</h3>
<p>節點將在配置的路徑上監聽特定類型的請求路徑可以完全指定例如<code>/user</code><code>/user/:name</code> 使<code>msg.req.params</code></p>
<p>對于包含正文的請求例如POST或PUT請求的內容將作爲<code>msg.payload</code></p>
<p>如果可以確定請求的內容類型則正文將被解析爲任何適當的類型例如<code>application/json</code>JavaScript</p>
<p><b>注意</b>HTTP</p>
</script>
<script type="text/x-red" data-help-name="http response">
<p>將響應發送回從HTTP輸入節點接收的請求</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>響應的正文</dd>
<dt class="optional">statusCode <span class="property-type">數值</span></dt>
<dd>如果設置則用作響應狀態代碼默認值200</dd>
<dt class="optional">headers <span class="property-type">object</span></dt>
<dd>如果設置則提供HTTP頭以包含在響應中</dd>
<dt class="optional">cookies <span class="property-type">object</span></dt>
<dd>如果設置則可用于設置或刪除cookie</dd>
</dl>
<h3>詳細</h3>
<p>還可以在節點本身內設置<code>statusCode</code><code>headers</code>message</p>
<h4>Cookie處理</h4>
<p><code>cookies</code>/使cookieoptions<p>
<p>下面的示例設置兩個cookie-一個名爲<code>name</code><code>nick</code><code>session</code><code>1234</code>15</p>
<pre>
msg.cookies = {
name: 'nick',
session: {
value: '1234',
maxAge: 900000
}
}</pre>
<p>有效選項包括</p>
<ul>
<li><code>domain</code> - () Cookie</li>
<li><code>expires</code> - () GMT0cookie</li>
<li><code>maxAge</code> - () </li>
<li><code>path</code> - (字符串) Cookie的路徑。默認爲/</li>
<li><code>value</code> - () Cookie使</li>
</ul>
<p>要刪除Cookie請將其<code>value</code><code>null</code></p>
</script>
@@ -0,0 +1,78 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="http request">
<p>發送HTTP請求並返回響應</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">url <span class="property-type">字符串</span></dt>
<dd>如果未在節點中配置則此可選屬性設置請求的url</dd>
<dt class="optional">method <span class="property-type">字符串</span></dt>
<dd>如果未在節點中配置則此可選屬性設置請求的HTTP方法必須是<code>GET</code>,<code>PUT</code>,<code>POST</code>,<code>PATCH</code><code>DELETE</code></dd>
<dt class="optional">headers <span class="property-type">object</span></dt>
<dd>設置請求的HTTP頭</dd>
<dt class="optional">cookies <span class="property-type">object</span></dt>
<dd>如果設置則可用于發送帶有請求的cookie</dd>
<dt class="optional">payload</dt>
<dd>發送爲請求的正文</dd>
<dt class="optional">rejectUnauthorized</dt>
<dd>如果設置爲<code>false</code>使https</dd>
<dt class="optional">followRedirects</dt>
<dd>如果設置爲<code>false</code>HTTP 301<code>true</code></dd>
<dt class="optional">requestTimeout</dt>
<dd>如果設置爲正數毫秒將覆蓋全局設置的<code>httpRequestTimeout</code></dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | object | buffer</span></dt>
<dd>響應的正文可以將節點配置爲以字符串形式返回主體嘗試將其解析爲JSON字符串或將其保留爲二進制buffer</dd>
<dt>statusCode <span class="property-type">數值</span></dt>
<dd>響應的狀態碼如果請求無法完成則返回錯誤碼</dd>
<dt>headers <span class="property-type">object</span></dt>
<dd>包含響應頭的對象</dd>
<dt>responseUrl <span class="property-type">字符串</span></dt>
<dd>如果在處理請求時發生任何重定向則此屬性爲最終重定向的URL否則則爲原始請求的URL</dd>
<dt>responseCookies <span class="property-type">object</span></dt>
<dd>如果響應包含cookie則此屬性是每個cookie的名稱/鍵值對的對象</dd>
<dt>redirectList <span class="property-type">數組</span></dt>
<dd>如果請求被重定向了一次或多次則累積的信息將被添加到此屬性location是下一個重定向目標cookie是從重定向源返回的cookie</dd>
</dl>
<h3>詳細</h3>
<p>在節點內配置後URL屬性可以包含<a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache樣式</a>標簽。 這些標簽允許使用傳入消息的值來構造url。例如,如果url設置爲<code>example.com/{{{{topic}}}</code><code>msg.topic</code>使{{{...}}}mustache/ &</p>
<p>節點可以選擇自動將<code>msg.payload</code>GET<code>msg.payload</code></p>
<p><b>注意</b>使<code>http_proxy=...</code>Node-RED使</p>
<h4>使用多個HTTP請求節點</h4>
<p>爲了在一個流程中多次使用該節點必須要注意<code>msg.headers</code>使<code>msg.headers</code><code>msg.headers</code><code>{}</code></p>
<h4>Cookie處理</h4>
<p>傳遞給節點的<code>cookies</code>/cookie<code>value</code></p>
<p>請求返回的所有cookie都將在<code>responseCookies</code></p>
<h4>內容類型處理</h4>
<p>如果<code>msg.payload</code><code>application/json</code></p>
<p>要將請求編碼爲表單數據應將<code>msg.headers[content-type]</code><code>application/x-www-form-urlencoded</code></p>
<h4>文件上傳</h4>
<p>要執行文件上傳應將<code>msg.headers["content-type"]</code><code>multipart/form-data</code><code>msg.payload</code></p>
<pre><code>{
"KEY": {
"value": FILE_CONTENTS,
"options": {
"filename": "FILENAME"
}
}
}</code></pre>
<p><code>KEY</code>,<code>FILE_CONTENTS</code><code>FILENAME</code></p>
</script>
@@ -0,0 +1,35 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="websocket in">
<p>WebSocket輸入節點</p>
<p>默認情況下從WebSocket接收的數據將位于<code>msg.payload</code>JSONJSON</p>
</script>
<script type="text/x-red" data-help-name="websocket out">
<p>WebSocket輸出節點</p>
<p>默認情況下<code>msg.payload</code>WebSocket<code>msg</code>JSONWebSocket</p>
<p>如果到達此節點的消息是從WebSocket In節點開始的則該消息將發送回觸發流程的客戶端否則消息將廣播給所有連接的客戶端</p>
<p>如果要廣播從WebSocket輸入節點開始的消息則可以應該刪除流中的<code>msg._session</code></p>
</script>
<script type="text/x-red" data-help-name="websocket-listener">
<p>此配置節點使用指定的路徑創建WebSocket服務器端點</p>
</script>
<script type="text/x-red" data-help-name="websocket-client">
<p>此配置節點將WebSocket客戶端連接到指定的URL</p>
</script>
@@ -0,0 +1,35 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="tcp in">
<p>提供TCP輸入選擇可以連接到遠程TCP端口或接受傳入連接</p>
<p><b>注意</b>root1024</p>
</script>
<script type="text/x-red" data-help-name="tcp out">
<p>提供TCP輸出的選擇可以連接到遠程TCP端口接受傳入的連接或回複從TCP In節點收到的消息</p>
<p>僅發送<code>msg.payload</code></p>
<p>如果<code>msg.payload</code>Base64Base64</p>
<p>如果不存在<code>msg._session</code><b></b></p>
<p><b>注意</b>root1024</p>
</script>
<script type="text/x-red" data-help-name="tcp request">
<p>一個簡單的TCP請求節點<code>msg.payload</code>tcp</p>
<p>連接到服務器發送請求並接收響應 可以從固定數量的字符與指定字符匹配的字符中選擇操作從第一個答複到達起等待指定的時間等待數據到達發送數據並立即取消連接而無需等待答複等操作中進行選擇</p>
<p>響應將在<code>msg.payload</code>buffer<code>.toString()</code></p>
<p>如果將tcp主機或端口留空則必須使用<code>msg.host</code><code>msg.port</code></p>
</script>
@@ -0,0 +1,28 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="udp in">
<p>UDP輸入節點<code>msg.payload</code>BufferBase64</p>
<p><code>msg.ip</code><code>msg.port</code>IP</p>
<p><b>注意</b>root使1024</p>
</script>
<script type="text/x-red" data-help-name="udp out">
<p>該節點將<code>msg.payload</code>UDP</p>
<p>您也可以使用<code>msg.ip</code><code>msg.port</code></p>
<p>如果選擇廣播則將地址設置爲本地廣播IP地址或者也可以嘗試使用全局廣播地址255.255.255.255</p>
<p><b>注意</b>root使1024</p>
</script>
@@ -0,0 +1,43 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="csv">
<p>在CSV格式的字符串及其JavaScript對象表示形式之間進行相互轉換</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 數組 | 字符串</span></dt>
<dd>JavaScript對象數組或CSV字符串</dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 數組 | 字符串</span></dt>
<dd>
<ul>
<li>如果輸入是字符串它將嘗試將其解析爲CSV並爲每行創建鍵/值對的JavaScript對象然後該節點將爲每行發送一條消息或者發送一條包含對象數組的消息</li>
<li>如果輸入是JavaScript對象它將嘗試構建CSV字符串</li>
<li>如果輸入是簡單值的數組則將構建單行CSV字符串</li>
<li>如果輸入是數組數組或對象數組則會創建多行CSV字符串</li>
</ul>
</dd>
</dl>
<h3>詳細</h3>
<p>列模板可以包含列名稱的有序列表將CSV轉換爲對象時列名將用作屬性名稱或者也可以從CSV的第一行中獲取列名稱</p>
<p>轉換爲CSV時列模板用于標識從對象中提取的屬性以及提取的順序</p>
<p>如果輸入是數組則列模板僅用于有選擇地生成一行列標題</p>
<p>只要正確設置<code>parts</code></p>
<p>如果輸出多個消息則將設置其<code>parts</code></p>
<p><b>注意</b>使</p>
</script>
@@ -0,0 +1,33 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="html">
<p>使用CSS選擇器從<code>msg.payload</code>html</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串</span></dt>
<dd>從中提取元素的html字符串</dd>
<dt class="optional">select <span class="property-type">字符串</span></dt>
<dd>如果未在編輯面板中配置則可以將選擇器設置爲msg的屬性</dd>
</dl>
<h3>Output</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">數組 | 字符串</span></dt>
<dd>結果可以是有效載荷中包含匹配元素的數組的單個消息也可以是多條消息每條消息都包含匹配元素發送多條消息時需要爲消息設置<code>parts</code></dd>
</dl>
<h3>詳細</h3>
<p>該節點支持CSS和jQuery選擇器的組合查看<a href="https://github.com/fb55/CSSselect#user-content-supported-selectors" target="_blank">css-select documentation</a> </p>
</script>
@@ -0,0 +1,43 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="json">
<p>在JSON字符串及其JavaScript對象表示形式之間相互轉換</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串</span></dt>
<dd>JavaScript對象或JSON字符串</dd>
<dt>schema<span class="property-type">object</span></dt>
<dd>可選的JSON Schema對象用于驗證有效負載在將<code>msg</code></dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串</span></dt>
<dd>
<ul>
<li>如果輸入是JSON字符串它將嘗試將其解析爲JavaScript對象</li>
<li>如果輸入是JavaScript對象它將創建一個JSON字符串並可以選擇對此JSON字符串進行整形</li>
</ul>
</dd>
<dt>schemaError<span class="property-type">數組</span></dt>
<dd>如果JSON模式驗證失敗則catch節點將具有包含錯誤數組的<code>schemaError</code></dd>
</dl>
<h3>詳細</h3>
<p>默認的轉換目標是<code>msg.payload</code></p>
<p>您可以將其設置爲僅執行特定的轉換而不是自動選擇雙向轉換例如即使對<code>HTTP In</code>content-type使JSONJavaScript</p>
<p>如果指定了轉換爲JSON字符串則不會對收到的字符串進行進一步的檢查也就是說即使指定了格式化選項它也不會檢查字符串是否正確爲JSON或對JSON執行整形</p>
<p>有關JSON模式的更多詳細信息請查閱<a href="http://json-schema.org/latest/json-schema-validation.html">規範</a>.</p>
</script>
@@ -0,0 +1,48 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="xml">
<p>在XML字符串及其JavaScript對象表示形式之間進行相互轉換</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串</span></dt>
<dd>JavaScript對象或XML字符串</dd>
<dt class="optional">options <span class="property-type">object</span></dt>
<dd>可以將選項傳遞給內部使用的XML轉換庫請參見<a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md#options" target="_blank"> xml2js文檔</a> </dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串</span></dt>
<dd>
<ul>
<li>如果輸入是字符串它將嘗試將其解析爲XML並創建一個JavaScript對象</li>
<li>如果輸入是JavaScript對象它將嘗試構建XML字符串</li>
</ul>
</dd>
</dl>
<h3>詳細</h3>
<p>在XML和對象之間進行轉換時默認情況下XML屬性會添加到名爲<code>$</code><code>_</code></p>
<p>例如將如下所示轉換以下XML</p>
<pre>&lt;p class="tag"&gt;Hello World&lt;/p&gt;</pre>
<pre>{
"p": {
"$": {
"class": "tag"
},
"_": "Hello World"
}
}</pre>
</script>
@@ -0,0 +1,34 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="yaml">
<p>在YAML格式的字符串及其JavaScript對象表示形式之間相互轉換</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串</span></dt>
<dd>JavaScript對象或YAML字符串</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串</span></dt>
<dd>
<ul>
<li>如果輸入是YAML字符串它將嘗試將其解析爲JavaScript對象</li>
<li>如果輸入是JavaScript對象它將創建一個YAML字符串</li>
</ul>
</dd>
</dl>
</script>
@@ -0,0 +1,133 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="split">
<p>將一條消息拆分爲一系列消息</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object | 字符串 | 數組 | buffer</span></dt>
<dd>節點的行爲由<code>msg.payload</code>:
<ul>
<li><b>字符串</b>/<b>buffer</b> - 使<code>\n</code></li>
<li><b>數組</b> - </li>
<li><b>object</b> - /</li>
</ul>
</dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>parts<span class="property-type">object</span></dt>
<dd>此屬性包含有關如何將消息與原始消息分開的信息如果傳遞給<b>join</b>
<ul>
<li><code>id</code> - </li>
<li><code>index</code> - </li>
<li><code>count</code> - </li>
<li><code>type</code> - -///buffer</li>
<li><code>ch</code> - buffer</li>
<li><code>key</code> - <code>msg.topic</code></li>
<li><code>len</code> - 使</li>
</ul>
</dd>
</dl>
<h3>詳細</h3>
<p>在使用<b>join</b>使</p>
<p>它使用<code>msg.parts</code></p>
<h4>流媒體模式</h4>
<p>該節點還可以用于重排消息流例如發送換行符終止命令的串行設備可能會傳遞一條消息並在其末尾帶有部分命令 流模式此節點將拆分一條消息並發送每個完整的段如果末尾有部分片段則該節點將保留該片段並將其添加到收到的下一條消息之前</p>
<p>在此模式下運行時該節點將不會設置<code>msg.parts.count</code><b>join</b>使</p>
</script>
<script type="text/x-red" data-help-name="join">
<p>將消息序列合並爲一條消息.</p>
<p>共有三種模式</p>
<dl>
<dt>自動模式</dt>
<dd><b>split</b></dd>
<dt>手動模式</dt>
<dd>手動地以各種方式合並消息序列</dd>
<dt>列聚合模式</dt>
<dd>對消息列中的所有消息應用表達式以將其簡化爲單個消息</dd>
</dl>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">parts<span class="property-type">object</span></dt>
<dd>使用自動模式時所有的消息都應包含此屬性<b>split</b>
<ul>
<li><code>id</code> - </li>
<li><code>index</code> - </li>
<li><code>count</code> - </li>
<li><code>type</code> - -///buffer</li>
<li><code>ch</code> - buffer</li>
<li><code>key</code> - <code>msg.topic</code>/li>
<li><code>len</code> - 使</li>
</ul>
</dd>
<dt class="optional">complete</dt>
<dd>如果設置則節點將以其當前狀態發送其輸出消息</dd>
</dl>
<h3>詳細</h3>
<h4>自動模式</h4>
<p>自動模式使用傳入消息的<code>parts</code>使<b>split</b></p>
<h4>手動模式</h4>
<p>設置爲以手動模式時該節點能以各種不同的方法來處理消息</p>
<ul>
<li><b>字符串</b><b></b>-</li>
<li><b>數組</b> - </li>
<li><b>/值對象</b> - 使</li>
<li><b>merged object</b> - </li>
</ul>
<p>輸出消息的其他屬性都取自發送結果前的最後一條消息</p>
<p>可以用<i>計數</i></p>
<p>可以用<i>超時</i></p>
<p>如果收到設置了<code>msg.complete</code></p>
<p>如果收到設置了<code>msg.reset</code></p>
<h4>列聚合模式</h4>
<p>選擇列聚合模式時將表達式應用于組成消息列的每條消息並使用聚合值組成一條消息</p>
<dl class="message-properties">
<dt>初始值</dt>
<dd>累積值的初始值(<code>$A</code>)</dd>
<dt>聚合表達式</dt>
<dd>序列中的每個消息調用的JSONata表達式結果將作爲累加值傳遞到表達式的下一個調用在表達式中可以使用以下特殊變量
<ul>
<li><code>$A</code>: </li>
<li><code>$I</code>: </li>
<li><code>$N</code>: </li>
</ul>
</dd>
<dt>最終調整式子</dt>
<dd>可選的JSONata表達式在將聚合表達式應用于序列中的所有消息之後應用在表達式中可以使用以下特殊變量
<ul>
<li><code>$A</code>: </li>
<li><code>$N</code>: </li>
</ul>
</dd>
<p>默認情況下按順序從序列的第一條消息到最後一條消息應用聚合表達式也可以選擇以相反的順序應用聚合表達式</p>
</dl>
<p><b>例子</b>
<ul>
<li><b>聚合表達式</b>: <code>$A+payload</code></li>
<li><b>初始值</b>: <code>0</code></li>
<li><b>最終調整式</b>: <code>$A/$N</code></li>
</ul>
</p>
<h4>儲存訊息</h4>
<p>該節點將在內部緩存消息以便跨序列工作運行時設置<code>nodeMessageBufferMaxLength</code></p>
</script>
@@ -0,0 +1,41 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="sort">
<p>對消息屬性或消息序列進行排序的函數</p>
<p>當配置爲對消息屬性進行排序時節點將對指定消息屬性所指向的數組數據進行排序</p>
<p>當配置爲對消息序列排序時它將對消息重新排序</p>
<p>排序順序可以是</p>
<ul>
<li><b>升序</b></li>
<li><b>降序</b></li>
</ul>
<p>對于數字可以通過複選框指定數字順序</p>
<p>排序鍵可以是元素值也可以是JSONata表達式來對屬性值進行排序還可以是message屬性或JSONata表達式來對消息序列進行排序<p>
<p>在對消息序列進行排序時排序節點依賴于接收到的消息來設置<code>msg.parts</code></p>
<p>
<ul>
<li><code>id</code> - </li>
<li><code>index</code> - </li>
<li><code>count</code> - </li>
</ul>
</p>
<p><b>注意</b>使
<ul>
<li><code>nodeMessageBufferMaxLength</code><b>settings.js</b></li>
</ul>
</p>
</script>
@@ -0,0 +1,34 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="batch">
<p>根據各種規則創建消息序列</p>
<h3>詳細</h3>
<p>有三種創建消息序列的模式</p>
<dl>
<dt>訊息數</dt>
<dd>將消息分組爲給定長度的序列 <b>overlap</b></dd>
<dt>時間間隔</dt>
<dd>對在指定時間間隔內到達的郵件進行分組如果在該時間間隔內沒有消息到達則該節點可以選擇發送空消息</dd>
<dt>串聯序列</dt>
<dd>通過串聯輸入序列來創建消息序列每條消息必須具有<code>msg.topic</code><code>msg.parts</code><code>topic</code>
</dd>
</dl>
<h4>儲存訊息</h4>
<p>該節點將在內部緩衝消息以便跨序列工作運行時設置<code>nodeMessageBufferMaxLength</code></p>
</script>
@@ -0,0 +1,55 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/html" data-help-name="file">
<p><code>msg.payload</code></p>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">filename<span class="property-type">字符串</span></dt>
<dd>如果未在節點中配置則此可選屬性可以設置文件名</dd>
</dl>
<h3>輸出</h3>
<p>寫入完成後輸入消息將發送到輸出端口</p>
<h3>詳細</h3>
<p>每個消息的有效荷載將添加到文件的末尾可以選擇在每個消息之間添加一個換行符\n</p>
<p>如果使用<code>msg.filename</code>使</p>
<p>可以將其配置爲覆蓋整個文件而不是在文件後添加段落例如在將二進制數據寫入文件例如圖像應使用此選項並且應禁用添加換行符的選項</p>
<p>可以從編碼列表中指定寫入文件的數據的編碼</p>
<p>您可以將此節點配置爲刪除文件</p>
</script>
<script type="text/html" data-help-name="file in">
<p>以字符串或二進制緩衝區的形式讀取文件的內容</p>
<h3>輸入</h3>
<dl class="message-properties">
<dt class="optional">filename<span class="property-type">字符串</span></dt>
<dd>如果未在節點配置中設置該屬性可以選擇要讀取的文件名</dd>
</dl>
<h3>輸出</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
<dd>文件的內容可以是字符串也可以是二進制的buffer</dd>
<dt class="optional">filename <span class="property-type">字符串</span></dt>
<dd>如果未在節點配置中設置該屬性可以選擇要讀取的文件名</dd>
</dl>
<h3>詳細</h3>
<p>文件名應該是絕對路徑否則將相對于Node-RED進程的工作目錄</p>
<p>在Windows上可能需要使用轉義路徑分隔符例如<code>\\Users\\myUser</code></p>
<p>可以選擇將文本文件拆分爲幾行每行輸出一條消息或者將二進制文件拆分爲較小的buffer塊-塊大小取決于操作系統但通常爲64kLinux/Mac或41kWindows</p>
<p>當拆分爲多條消息時每條消息將具有<code>parts</code></p>
<p>如果輸出格式爲字符串則可以從編碼列表中指定輸入數據的編碼</p>
<p>應該使用Catch節點來捕獲並處理錯誤</p>
</script>
@@ -0,0 +1,25 @@
<!--
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-help-name="watch">
<p>監視目錄或文件中的更改</p>
<p>您可以輸入用逗號分隔的目錄和/或文件的列表您需要在所有帶有空格的地方加上引號...</p>
<p>在Windows上必須在任何目錄名稱中使用雙反斜杠<code>\\</code></p>
<p>實際更改的文件的完整文件名將放入<code>msg.payload</code><code>msg.filename</code><code>msg.topic</code></p>
<p><code>msg.file</code><code>msg.type</code><i>file</i><i>directory</i><code>msg.size</code></p>
<p>當然在Linux中<i>everything</i></p>
<p><b>注意</b>使</p>
</script>