mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
added i18n help files (#766)
This commit is contained in:
@@ -20,70 +20,6 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="annotate-image">
|
||||
<p>A node that can annotate JPEG images with simple shapes and labels.</p>
|
||||
<h3>Inputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload<span class="property-type">Buffer</span></dt>
|
||||
<dd>A Buffer containing a JPEG image. Support for PNG will come soon.</dd>
|
||||
<dt>annotations<span class="property-type">Array</span></dt>
|
||||
<dd>An array of annotations to apply to the image. See below for details
|
||||
of the annotation format.</dd>
|
||||
</dl>
|
||||
<h3>Outputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload<span class="property-type">Buffer</span></dt>
|
||||
<dd>The image with any annotations applied.</dd>
|
||||
</dl>
|
||||
<h3>Details</h3>
|
||||
<p>The annotations provided in <code>msg.annotations</code> are applied in order.
|
||||
Each annotation is an object with the following properties:</p>
|
||||
<dl class="message-properties">
|
||||
<dt>type<span class="property-type">string</span></dt>
|
||||
<dd><ul>
|
||||
<li><code>"rect"</code> - draws a rectangle</li>
|
||||
<li><code>"circle"</code> - draws a circle</li>
|
||||
</dd>
|
||||
<dt>x,y <span class="property-type">number</span></dt>
|
||||
<dd>The top-left corner of a <code>rect</code> annotation, or the center of a <code>circle</code> annotation.</dd>
|
||||
<dt>w,h <span class="property-type">number</span></dt>
|
||||
<dd>The width and height of a <code>rect</code> annotation.</dd>
|
||||
<dt>r <span class="property-type">number</span></dt>
|
||||
<dd>The radius of a <code>circle</code> annotation.</dd>
|
||||
<dt>bbox <span class="property-type">array</span></dt>
|
||||
<dd>This can be used instead of <code>x</code>,<code>y</code>,<code>w</code>,<code>h</code> and <code>r</code>. It should
|
||||
be an array of four values giving the bounding box of the annotation: <code>[x, y, w, h]</code>.<br>
|
||||
If this property is set and <code>type</code> is not set, it will default to <code>rect</code>.</dd>
|
||||
<dt>label <span class="property-type">string</span></dt>
|
||||
<dd>An optional piece of text to label the annotation with</dd>
|
||||
<dt>stroke <span class="property-type">string</span></dt>
|
||||
<dd>The line color of the annotation. Default: <code>"#ffC000"</code></dd>
|
||||
<dt>lineWidth <span class="property-type">number</span></dt>
|
||||
<dd>The stroke width used to draw the annotation. Default: <code>5</code></dd>
|
||||
<dt>fontSize <span class="property-type">number</span></dt>
|
||||
<dd>The font size to use for the label. Default: <code>24</code></dd>
|
||||
<dt>fontColor <span class="property-type">string</span></dt>
|
||||
<dd>The color of the font to use for the label. Default: <code>"#ffC000"</code></dd>
|
||||
<dt>labelLocation <span class="property-type">string</span></dt>
|
||||
<dd>The location to place the label. Can be set to <code>top</code> or <code>bottom</code>.
|
||||
Default: <code>"automatic"</code>.</dd>
|
||||
</dl>
|
||||
<h3>Examples</h3>
|
||||
<pre> msg.annotations = [ {
|
||||
type: "rect",
|
||||
x: 10, y: 10, w: 50, h: 50,
|
||||
label: "hello"
|
||||
}]</pre>
|
||||
<pre> msg.annotations = [ {
|
||||
type: "circle",
|
||||
x: 50, y: 50, r: 20
|
||||
}]</pre>
|
||||
<pre> msg.annotations = [ {
|
||||
type: "rect",
|
||||
bbox: [ 10, 10, 50, 50]
|
||||
}]</pre>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
(function() {
|
||||
|
64
utility/annotate-image/locales/en-US/annotate.html
Normal file
64
utility/annotate-image/locales/en-US/annotate.html
Normal file
@@ -0,0 +1,64 @@
|
||||
|
||||
<script type="text/html" data-help-name="annotate-image">
|
||||
<p>A node that can annotate JPEG images with simple shapes and labels.</p>
|
||||
<h3>Inputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload<span class="property-type">Buffer</span></dt>
|
||||
<dd>A Buffer containing a JPEG image. Support for PNG will come soon.</dd>
|
||||
<dt>annotations<span class="property-type">Array</span></dt>
|
||||
<dd>An array of annotations to apply to the image. See below for details
|
||||
of the annotation format.</dd>
|
||||
</dl>
|
||||
<h3>Outputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload<span class="property-type">Buffer</span></dt>
|
||||
<dd>The image with any annotations applied.</dd>
|
||||
</dl>
|
||||
<h3>Details</h3>
|
||||
<p>The annotations provided in <code>msg.annotations</code> are applied in order.
|
||||
Each annotation is an object with the following properties:</p>
|
||||
<dl class="message-properties">
|
||||
<dt>type<span class="property-type">string</span></dt>
|
||||
<dd><ul>
|
||||
<li><code>"rect"</code> - draws a rectangle</li>
|
||||
<li><code>"circle"</code> - draws a circle</li>
|
||||
</dd>
|
||||
<dt>x,y <span class="property-type">number</span></dt>
|
||||
<dd>The top-left corner of a <code>rect</code> annotation, or the center of a <code>circle</code> annotation.</dd>
|
||||
<dt>w,h <span class="property-type">number</span></dt>
|
||||
<dd>The width and height of a <code>rect</code> annotation.</dd>
|
||||
<dt>r <span class="property-type">number</span></dt>
|
||||
<dd>The radius of a <code>circle</code> annotation.</dd>
|
||||
<dt>bbox <span class="property-type">array</span></dt>
|
||||
<dd>This can be used instead of <code>x</code>,<code>y</code>,<code>w</code>,<code>h</code> and <code>r</code>. It should
|
||||
be an array of four values giving the bounding box of the annotation: <code>[x, y, w, h]</code>.<br>
|
||||
If this property is set and <code>type</code> is not set, it will default to <code>rect</code>.</dd>
|
||||
<dt>label <span class="property-type">string</span></dt>
|
||||
<dd>An optional piece of text to label the annotation with</dd>
|
||||
<dt>stroke <span class="property-type">string</span></dt>
|
||||
<dd>The line color of the annotation. Default: <code>"#ffC000"</code></dd>
|
||||
<dt>lineWidth <span class="property-type">number</span></dt>
|
||||
<dd>The stroke width used to draw the annotation. Default: <code>5</code></dd>
|
||||
<dt>fontSize <span class="property-type">number</span></dt>
|
||||
<dd>The font size to use for the label. Default: <code>24</code></dd>
|
||||
<dt>fontColor <span class="property-type">string</span></dt>
|
||||
<dd>The color of the font to use for the label. Default: <code>"#ffC000"</code></dd>
|
||||
<dt>labelLocation <span class="property-type">string</span></dt>
|
||||
<dd>The location to place the label. Can be set to <code>top</code> or <code>bottom</code>.
|
||||
Default: <code>"automatic"</code>.</dd>
|
||||
</dl>
|
||||
<h3>Examples</h3>
|
||||
<pre> msg.annotations = [ {
|
||||
type: "rect",
|
||||
x: 10, y: 10, w: 50, h: 50,
|
||||
label: "hello"
|
||||
}]</pre>
|
||||
<pre> msg.annotations = [ {
|
||||
type: "circle",
|
||||
x: 50, y: 50, r: 20
|
||||
}]</pre>
|
||||
<pre> msg.annotations = [ {
|
||||
type: "rect",
|
||||
bbox: [ 10, 10, 50, 50]
|
||||
}]</pre>
|
||||
</script>
|
@@ -49,17 +49,6 @@
|
||||
All parameters should be passed in as arguments.</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="daemon">
|
||||
<p>Calls out to a long running system command. Sends <code>msg.payload</code> to stdin of the process.</p>
|
||||
<p>Provides 3 outputs... stdout, stderr, and return code , from the running command.</p>
|
||||
<p>Parameters can be space separated, space separated with quotes, or a javascript array. For example `aa bb` or `"cc dd"` or `["aa","bb cc""]`.</p>
|
||||
<p>If the called program stops (i.e. a return code is produced), this node can attempt to restart the command.</p>
|
||||
<p>Setting <code>msg.kill</code> to a signal name (e.g. SIGINT, SIGHUP) will stop the process - but if the
|
||||
restart flag is set it will then auto restart. Sending <code>msg.start</code> will also re-start the process.</p>
|
||||
<p><b>Note:</b> Some applications will automatically buffer lines of output. It is advisable to turn off this behaviour.
|
||||
For example, if running a Python app, the <code>-u</code> parameter will stop the output being buffered.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('daemon',{
|
||||
category: 'function',
|
||||
|
10
utility/daemon/locales/en-US/daemon.html
Normal file
10
utility/daemon/locales/en-US/daemon.html
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
<script type="text/html" data-help-name="daemon">
|
||||
<p>Calls out to a long running system command. Sends <code>msg.payload</code> to stdin of the process.</p>
|
||||
<p>Provides 3 outputs... stdout, stderr, and return code , from the running command.</p>
|
||||
<p>If the called program stops (i.e. a return code is produced), this node can attempt to restart the command.</p>
|
||||
<p>Setting <code>msg.kill</code> to a signal name (e.g. SIGINT, SIGHUP) will stop the process - but if the
|
||||
restart flag is set it will then auto restart. Sending <code>msg.start</code> will also re-start the process.</p>
|
||||
<p><b>Note:</b> Some applications will automatically buffer lines of output. It is advisable to turn off this behaviour.
|
||||
For example, if running a Python app, the <code>-u</code> parameter will stop the output being buffered.</p>
|
||||
</script>
|
@@ -17,17 +17,6 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="exif">
|
||||
<p>Extract <a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format">Exif</a> information from JPEG images.</p>
|
||||
<p>This node expects an incoming JPEG image buffer in the selected property. If Exif data is present,
|
||||
it extracts the data into the <code>msg.exif</code> object.</p>
|
||||
<p>The node then adds location data as <code>msg.location</code>, should the Exif data carry this information.
|
||||
This also includes an icon, bearing and field of view arc suitable for use in the worldmap node.
|
||||
The selected input property retains the original, unmodified image buffer.</p>
|
||||
<p>If configured to use the worldmap in node then the existing image payload will be replaced by the location
|
||||
object so that it can be fed back to the map directly.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('exif',{
|
||||
category: 'utility',
|
||||
|
11
utility/exif/locales/en-US/94-exif.html
Normal file
11
utility/exif/locales/en-US/94-exif.html
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
<script type="text/html" data-help-name="exif">
|
||||
<p>Extract <a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format">Exif</a> information from JPEG images.</p>
|
||||
<p>This node expects an incoming JPEG image buffer in the selected property. If Exif data is present,
|
||||
it extracts the data into the <code>msg.exif</code> object.</p>
|
||||
<p>The node then adds location data as <code>msg.location</code>, should the Exif data carry this information.
|
||||
This also includes an icon, bearing and field of view arc suitable for use in the worldmap node.
|
||||
The selected input property retains the original, unmodified image buffer.</p>
|
||||
<p>If configured to use the worldmap in node then the existing image payload will be replaced by the location
|
||||
object so that it can be fed back to the map directly.</p>
|
||||
</script>
|
Reference in New Issue
Block a user