merge i18n-info-jp-parsers

This commit is contained in:
Hiroyasu Nishiyama
2018-02-15 22:47:05 +09:00
5 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<!--
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">オブジェクト | 配列 | 文字列</span></dt>
<dd>JavaScriptオブジェクト配列CSV文字列のいずれか</dd>
</dl>
<h3>出力</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">オブジェクト | 配列 | 文字列</span></dt>
<dd>
<ul>
<li>入力が文字列の場合CSVとして解釈しCSVの各行をキー/バリューとしたJavaScriptオブジェクトを生成します
各行毎にメッセージを送信するかオブジェクトの配列からなる一つのメッセージを送信するかを選択できます</li>
<li>入力がJavaScriptオブジェクトの場合CSV文字列への変換を行います</li>
<li>入力が基本型の配列の場合1行のCSV文字列へ変換します</li>
<li>入力が配列の配列もしくはオブジェクトの配列の場合複数行のCSV文字列へ変換します</li>
</ul>
</dd>
</dl>
<h3>詳細</h3>
<p>列名にカラム名のリストを指定することができますCSVからオブジェクトに変換を行う際カラム名をプロパティ名として使用します列名の代わりにCSVデータの1行目にカラム名を含めることもできます</p>
<p>CSVへの変換を行う際にはオブジェクトから取り出すべきプロパティとその順序を列名を参照して決めます</p>
<p>入力が配列の場合には列名はカラム名を表す行の出力指定がされた場合だけ用います</p>
<p>
<code>parts</code></p>
<p>CSVを複数のメッセージに変換して出力する場合出力がメッセージ列となるよう<code>parts</code></p>
<p><b>:</b> </p>
</script>

View File

@@ -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><code>msg.payload</code>HTMLCSS使</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">string</span></dt>
<dd>編集パネルでセレクタを指定していない場合メッセージのプロパティとして設定できます</dd>
</dl>
<h3>出力</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>

View File

@@ -0,0 +1,38 @@
<!--
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>Converts between a JSON string and its JavaScript object representation, in either direction.</p>
<h3>入力</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">オブジェクト | 文字列</span></dt>
<dd>JavaScriptオブジェクトもしくはJSON文字列</dd>
</dl>
<h3>出力</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">オブジェクト | 文字列</span></dt>
<dd>
<ul>
<li>入力が文字列の場合JSONとして解釈しJavaScriptオブジェクトに変換します</li>
<li>入力がJavaScriptオブジェクトの場合JSON文字列に変換しますJSON文字列は整形することも可能です</li>
</ul>
</dd>
</dl>
<h3>詳細</h3>
<p>デフォルトの変換対象は<code>msg.payload</code></p>
<p>双方向の変換を自動選択するのではなく特定の変換のみ行うように設定できますこの機能は例えば<code>HTTP In</code>content-typeJSONJavaScript</p>
<p>JSON文字列への変換が指定されている場合受信した文字列に対してさらなるチェックは行いませんすなわち文字列がJSONとして正しいかどうかの検査や整形オプションを指定していたとしても整形処理を実施しません</p>
</script>

View File

@@ -0,0 +1,49 @@
<!--
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">オブジェクト | 文字列</span></dt>
<dd>JavaScriptオブジェクトもしくはXML文字列</dd>
</dl>
<h3>出力</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">オブジェクト | 文字列</span></dt>
<dd>
<ul>
<li>入力が文字列の場合XMLとして解釈しJavaScriptオブジェクトに変換します</li>
<li>入力がJavaScriptオブジェクトの場合XML文字列に変換します</li>
</ul>
</dd>
<dt class="optional">options <span class="property-type">オブジェクト</span></dt>
<dd>内部で用いているXMLへの変換ライブラリに対してオプションを渡すことができます詳しくは<a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md#options" target="_blank">the xml2js docs</a></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>

View File

@@ -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">オブジェクト | 文字列</span></dt>
<dd>JavaScriptオブジェクトもしくはYAML形式文字列</dd>
</dl>
<h3>出力</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">オブジェクト | 文字列</span></dt>
<dd>
<ul>
<li>入力がYAML形式の文字列の場合JavaScriptオブジェクトに変換します</li>
<li>入力がJavaScriptオブジェクトの場合YAML形式の文字列に変換します</li>
</ul>
</dd>
</dl>
</script>