2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

98_help.pm: support help for internal commands

attributes
command
commands
devspec
global
perl

git-svn-id: https://svn.fhem.de/fhem/trunk@8046 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-02-20 17:40:25 +00:00
parent 6a2c2a8af3
commit 4804dda5d4
3 changed files with 18 additions and 23 deletions

View File

@ -22,11 +22,12 @@ sub CommandHelp {
if($mod) { if($mod) {
my $internals = "attributes command commands devspec global perl";
$mod = lc($mod); $mod = lc($mod);
my $modPath = AttrVal('global','modpath','.'); my $modPath = AttrVal('global','modpath','.');
my $output = ""; my $output = "";
if($mod ne 'global') { if($internals !~ m/$mod/) {
my %mods; my %mods;
my @modDir = ("$modPath/FHEM"); my @modDir = ("$modPath/FHEM");
@ -66,9 +67,9 @@ sub CommandHelp {
return $err if $err; return $err if $err;
foreach my $l (@text) { foreach my $l (@text) {
if($l =~ m/name=.global./) { if($l =~ m/name=\"$mod\"/) {
$skip = 0; $skip = 0;
} elsif($l =~ m/^<!-- global.end/) { } elsif($l =~ m/^<!-- $mod.end/) {
$skip = 1; $skip = 1;
} elsif (!$skip) { } elsif (!$skip) {
$output .= $l; $output .= $l;

View File

@ -210,6 +210,7 @@ telnet) or single client command (via fhem.pl). Example:
<code>fhem.pl &lt;fhemhost&gt;:7072 "&lt;fhem-command&gt" "..."</code> <code>fhem.pl &lt;fhemhost&gt;:7072 "&lt;fhem-command&gt" "..."</code>
</ul> </ul>
</ul> </ul>
<!-- intro end - diese Zeile nicht entfernen! -->
<a name="command"></a> <a name="command"></a>
@ -273,6 +274,7 @@ A line ending with \ will be concatenated with the next one, so long lines
(e.g. webpgm2) make editing of multiline commands transparent for you (i.e. there is no need for \) .<br> (e.g. webpgm2) make editing of multiline commands transparent for you (i.e. there is no need for \) .<br>
<br> <br>
</ul> </ul>
<!-- command end - diese Zeile nicht entfernen! -->
<a name="devspec"></a> <a name="devspec"></a>
@ -325,6 +327,7 @@ A line ending with \ will be concatenated with the next one, so long lines
structure</a> device. structure</a> device.
</ul> </ul>
</ul> </ul>
<!-- devspec end - diese Zeile nicht entfernen! -->
<a name="attributes"></a> <a name="attributes"></a>
@ -628,10 +631,11 @@ The following local attributes are used by a wider range of devices:
<br/> <br/>
Attribute "disable" must be offered by the corresponding module</li> Attribute "disable" must be offered by the corresponding module</li>
</ul> </ul>
<!-- attributes end - diese Zeile nicht entfernen! -->
<br><br> <br><br>
<a name="commands"></a>
<a name="help"></a> <a name="help"></a>
<h3>?, help</h3> <h3>?, help</h3>
<ul> <ul>
@ -703,7 +707,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="define"></a> <a name="define"></a>
<h3>define</h3> <h3>define</h3>
<ul> <ul>
@ -722,7 +725,6 @@ The following local attributes are used by a wider range of devices:
<br> <br>
</ul> </ul>
<a name="delete"></a> <a name="delete"></a>
<h3>delete</h3> <h3>delete</h3>
<ul> <ul>
@ -760,7 +762,6 @@ The following local attributes are used by a wider range of devices:
<br> <br>
</ul> </ul>
<a name="deletereading"></a> <a name="deletereading"></a>
<h3>deletereading</h3> <h3>deletereading</h3>
<ul> <ul>
@ -781,7 +782,6 @@ The following local attributes are used by a wider range of devices:
<br> <br>
</ul> </ul>
<a name="displayattr"></a> <a name="displayattr"></a>
<h3>displayattr</h3> <h3>displayattr</h3>
<ul> <ul>
@ -827,7 +827,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
<a name="getstate"></a> <a name="getstate"></a>
<h3>getstate</h3> <h3>getstate</h3>
<ul> <ul>
@ -849,7 +848,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
<a name="include"></a> <a name="include"></a>
<h3>include</h3> <h3>include</h3>
<ul> <ul>
@ -941,7 +939,6 @@ The following local attributes are used by a wider range of devices:
</code></pre> </code></pre>
</ul> </ul>
<a name="modify"></a> <a name="modify"></a>
<h3>modify</h3> <h3>modify</h3>
<ul> <ul>
@ -977,7 +974,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="reload"></a> <a name="reload"></a>
<h3>reload</h3> <h3>reload</h3>
<ul> <ul>
@ -1007,7 +1003,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="rereadcfg"></a> <a name="rereadcfg"></a>
<h3>rereadcfg</h3> <h3>rereadcfg</h3>
<ul> <ul>
@ -1051,7 +1046,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="set"></a> <a name="set"></a>
<h3>set</h3> <h3>set</h3>
<ul> <ul>
@ -1109,7 +1103,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="setreading"></a> <a name="setreading"></a>
<h3>setreading</h3> <h3>setreading</h3>
<ul> <ul>
@ -1146,7 +1139,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="shutdown"></a> <a name="shutdown"></a>
<h3>shutdown</h3> <h3>shutdown</h3>
<ul> <ul>
@ -1163,7 +1155,6 @@ The following local attributes are used by a wider range of devices:
</ul> </ul>
</ul> </ul>
<a name="trigger"></a> <a name="trigger"></a>
<h3>trigger</h3> <h3>trigger</h3>
<ul> <ul>
@ -1221,6 +1212,7 @@ The following local attributes are used by a wider range of devices:
</code> </code>
</ul> </ul>
</ul> </ul>
<!-- commands end - diese Zeile nicht entfernen! -->
<a name="global"></a> <a name="global"></a>
<h3>global</h3> <h3>global</h3>
@ -1559,6 +1551,7 @@ The following local attributes are used by a wider range of devices:
<br> <br>
<br> <br>
<!-- perl end - diese Zeile nicht entfernen! -->
<a name="gnuplot-syntax"></a> <a name="gnuplot-syntax"></a>
<h3>gnuplot file syntax</h3> <h3>gnuplot file syntax</h3>

View File

@ -208,6 +208,7 @@ Die Kommunikation mit FHEM kann entweder in einer "session" (&uuml;ber telnet) o
</ul> </ul>
</ul> </ul>
<br> <br>
<!-- intro end - diese Zeile nicht entfernen! -->
<a name="command"></a> <a name="command"></a>
@ -277,6 +278,7 @@ Web-Frontends (z.B. webpgm2) erleichtern die Eingabe von sich &uuml;ber mehrere
Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p> Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p>
<p>&nbsp;</p> <p>&nbsp;</p>
</ul> </ul>
<!-- command end - diese Zeile nicht entfernen! -->
<a name="devspec"></a> <a name="devspec"></a>
@ -336,7 +338,7 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p>
bitte den Abschnitt zu <a href="#structure"> structure</a>. bitte den Abschnitt zu <a href="#structure"> structure</a>.
</ul> </ul>
</ul> </ul>
<!-- devspec end - diese Zeile nicht entfernen! -->
<a name="attributes"></a> <a name="attributes"></a>
@ -649,13 +651,10 @@ Die folgenden lokalen Attribute werden von mehreren Ger&auml;ten verwendet:
<code>attr &lt;device&gt; disable toggle</code><br/> <code>attr &lt;device&gt; disable toggle</code><br/>
</li> </li>
</ul> </ul>
<!-- attributes end - diese Zeile nicht entfernen! -->
<br><br> <br><br>
<a name="commands"></a>
<a name="help"></a> <a name="help"></a>
<h3>?, help</h3> <h3>?, help</h3>
<ul> <ul>
@ -1291,6 +1290,7 @@ Die folgenden lokalen Attribute werden von mehreren Ger&auml;ten verwendet:
</code> </code>
</ul> </ul>
</ul> </ul>
<!-- commands end - diese Zeile nicht entfernen! -->
<a name="global"></a> <a name="global"></a>
@ -1665,6 +1665,7 @@ Die folgenden lokalen Attribute werden von mehreren Ger&auml;ten verwendet:
<br> <br>
<br> <br>
<!-- perl end - diese Zeile nicht entfernen! -->
<a name="gnuplot-syntax"></a> <a name="gnuplot-syntax"></a>
<h3>gnuplot file syntax</h3> <h3>gnuplot file syntax</h3>