mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-04 17:08:43 +00:00
contrib/commandref_join.pl: allow for =item helper type tags (Forum #47550)
git-svn-id: https://svn.fhem.de/fhem/trunk@10530 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c6db6ef17b
commit
d7f2b3fb55
@ -2889,6 +2889,7 @@ FW_widgetOverride($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="FHEMWEB"></a>
|
||||
|
@ -371,6 +371,7 @@ EOF
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="at"></a>
|
||||
|
@ -217,6 +217,7 @@ eventTypes_Get($@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="eventTypes"></a>
|
||||
|
@ -243,6 +243,7 @@ notify_fhemwebFn($$$$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="notify"></a>
|
||||
|
@ -130,6 +130,7 @@ sequence_Undef($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="sequence"></a>
|
||||
|
@ -196,6 +196,7 @@ watchdog_Attr(@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="watchdog"></a>
|
||||
|
@ -1050,6 +1050,7 @@ FileLog_regexpFn($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="FileLog"></a>
|
||||
|
@ -327,6 +327,7 @@ FHEM2FHEM_Set($@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="FHEM2FHEM"></a>
|
||||
|
@ -267,6 +267,7 @@ western_easter($)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="holiday"></a>
|
||||
|
@ -203,6 +203,7 @@ allowed_Attr(@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="allowed"></a>
|
||||
|
@ -96,6 +96,7 @@ CommandCULflash($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item command
|
||||
=begin html
|
||||
|
||||
<a name="CULflash"></a>
|
||||
|
@ -127,7 +127,7 @@ CommandJsonList2($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=item command
|
||||
=begin html
|
||||
|
||||
<a name="JsonList2"></a>
|
||||
|
@ -2274,6 +2274,7 @@ plotAsPng(@)
|
||||
##################
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="SVG"></a>
|
||||
|
@ -107,6 +107,7 @@ CommandXmlList($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item command
|
||||
=begin html
|
||||
|
||||
<a name="XmlList"></a>
|
||||
|
@ -653,6 +653,7 @@ autocreate_Attr(@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="autocreate"></a>
|
||||
|
@ -190,6 +190,7 @@ average_Notify($$)
|
||||
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="average"></a>
|
||||
|
@ -210,6 +210,7 @@ createArchiv($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item command
|
||||
=begin html
|
||||
|
||||
<a name="backup"></a>
|
||||
|
@ -96,6 +96,7 @@ CommandCmdAlias($$$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item command
|
||||
=begin html
|
||||
|
||||
<a name="cmdalias"></a>
|
||||
|
@ -53,6 +53,7 @@ dummy_Define($$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="dummy"></a>
|
||||
|
@ -509,6 +509,7 @@ structure_Attr($@)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="structure"></a>
|
||||
|
@ -364,6 +364,7 @@ telnet_ActivateInform($;$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="telnet"></a>
|
||||
|
@ -609,6 +609,7 @@ upd_initRestoreDirs($)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item command
|
||||
=begin html
|
||||
|
||||
<a name="update"></a>
|
||||
|
@ -137,6 +137,7 @@ weblink_FwFn($$$$)
|
||||
1;
|
||||
|
||||
=pod
|
||||
=item helper
|
||||
=begin html
|
||||
|
||||
<a name="weblink"></a>
|
||||
|
@ -17,6 +17,7 @@ use constant TAGS => qw{ul li code b i u table tr td};
|
||||
sub generateModuleCommandref($$;$);
|
||||
|
||||
my %mods;
|
||||
my %modIdx;
|
||||
my @modDir = ("FHEM");
|
||||
my @lang = ("EN", "DE");
|
||||
|
||||
@ -29,6 +30,12 @@ if(!$verify) {
|
||||
$l =~ s/.pm$//;
|
||||
$l =~ s/^[0-9][0-9]_//;
|
||||
$mods{$l} = "$modDir/$of";
|
||||
$modIdx{$l} = "device";
|
||||
open(MOD, "$modDir/$of") || die("Cant open $modDir/$l");
|
||||
while(my $cl = <MOD>) {
|
||||
$modIdx{$l} = $1 if($cl =~ m/^=item\s*(helper|command|device)/);
|
||||
}
|
||||
close(MOD);
|
||||
}
|
||||
}
|
||||
$mods{configDB} = "configDB.pm" if(-f "configDB.pm");
|
||||
@ -42,7 +49,19 @@ if(!$verify) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
sub
|
||||
printList($)
|
||||
{
|
||||
for my $i (sort { "\L$a" cmp "\L$b" } keys %modIdx) {
|
||||
print OUT " <a href=\"#$i\">$i</a> \n"
|
||||
if($modIdx{$i} eq $_[0]);
|
||||
}
|
||||
while(my $l = <IN>) {
|
||||
next if($l =~ m/href=/);
|
||||
print OUT $l;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $lang (@lang) {
|
||||
my $suffix = ($lang eq "EN" ? "" : "_$lang");
|
||||
@ -52,32 +71,23 @@ foreach my $lang (@lang) {
|
||||
open(IN, "$docIn") || die "Cant open $docIn: $!\n";
|
||||
open(OUT, ">$docOut") || die "Cant open $docOut: $!\n";
|
||||
|
||||
# First run: check what is a command and what is a helper module
|
||||
my $status;
|
||||
my %noindex;
|
||||
while(my $l = <IN>) {
|
||||
last if($l =~ m/<h3>Introduction/);
|
||||
$noindex{$1} = 1 if($l =~ m/href="#(.*)"/);
|
||||
if(!$suffix) { # First run: remember commands/helper module
|
||||
my $modType;
|
||||
while(my $l = <IN>) {
|
||||
$modType = "command" if($l =~ m/>Fhem commands</);
|
||||
$modType = "device" if($l =~ m/>Devices</);
|
||||
$modType = "helper" if($l =~ m/>Helper modules</);
|
||||
$modIdx{$1} = $modType if($modType && $l =~ m/href="#(.*?)">/);
|
||||
last if($l =~ m/<!-- header end -->/);
|
||||
}
|
||||
seek(IN,0,0);
|
||||
}
|
||||
seek(IN,0,0);
|
||||
|
||||
# Second run: create the file
|
||||
# Header
|
||||
while(my $l = <IN>) {
|
||||
print OUT $l;
|
||||
last if($l =~ m/#global/);
|
||||
}
|
||||
|
||||
# index for devices.
|
||||
foreach my $mod (sort keys %mods) {
|
||||
next if($noindex{$mod});
|
||||
print OUT " <a href='#$mod'>$mod</a> \n";
|
||||
}
|
||||
|
||||
# Copy the middle part
|
||||
while(my $l = <IN>) {
|
||||
while(my $l = <IN>) { # Header
|
||||
last if($l =~ m/name="perl"/);
|
||||
print OUT $l;
|
||||
printList($1) if($l =~ m/<!-- header:(.*) -->/);
|
||||
}
|
||||
|
||||
# Copy the doc part from the module
|
||||
|
@ -34,10 +34,9 @@
|
||||
<br>
|
||||
<b>Fhem commands</b>
|
||||
<ul>
|
||||
<!-- header:command -->
|
||||
<a href="#apptime">apptime</a>
|
||||
<a href="#attr">attr</a>
|
||||
<a href="#backup">backup</a>
|
||||
<a href="#CULflash">CULflash</a>
|
||||
<a href="#cancel">cancel</a>
|
||||
<a href="#cmdalias">cmdalias</a>
|
||||
<a href="#configdb">configdb</a>
|
||||
@ -58,7 +57,6 @@
|
||||
<a href="#include">include</a>
|
||||
<a href="#inform">inform</a>
|
||||
<a href="#JsonList">JsonList</a>
|
||||
<a href="#JsonList2">JsonList2</a>
|
||||
<a href="#list">list</a>
|
||||
<a href="#modify">modify</a>
|
||||
<a href="#MSG">msg</a>
|
||||
@ -87,16 +85,14 @@
|
||||
<b>Devices</b>
|
||||
<ul>
|
||||
<a href="#global">global</a><br>
|
||||
<!-- header:device -->
|
||||
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<b>Helper modules</b>
|
||||
<ul>
|
||||
<a href="#at">at</a>
|
||||
<a href="#allowed">allowed</a>
|
||||
<a href="#autocreate">autocreate</a>
|
||||
<a href="#average">average</a>
|
||||
<!-- header:helper -->
|
||||
<a href="#Calendar">Calendar</a>
|
||||
<a href="#configDB">configDB</a>
|
||||
<a href="#CustomReadings">CustomReadings</a>
|
||||
@ -104,13 +100,8 @@
|
||||
<a href="#Dashboard">Dashboard</a>
|
||||
<a href="#DbLog">DbLog</a>
|
||||
<a href="#dewpoint">dewpoint</a>
|
||||
<a href="#dummy">dummy</a>
|
||||
<a href="#eventTypes">eventTypes</a>
|
||||
<a href="#FHEM2FHEM">FHEM2FHEM</a>
|
||||
<a href="#FHEMWEB">FHEMWEB</a>
|
||||
<a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>
|
||||
<a href="#FB_CALLLIST">FB_CALLLIST</a>
|
||||
<a href="#FileLog">FileLog</a>
|
||||
<a href="#FLOORPLAN">FLOORPLAN</a>
|
||||
<a href="#GEOFANCY">GEOFANCY</a>
|
||||
<a href="#GUEST">GUEST</a>
|
||||
@ -118,7 +109,6 @@
|
||||
<a href="#HTTPSRV">HTTPSRV</a>
|
||||
<a href="#Heating_Control">Heating_Control</a>
|
||||
<a href="#HMinfo">HMinfo</a>
|
||||
<a href="#holiday">holiday</a>
|
||||
<a href="#HourCounter">HourCounter</a>
|
||||
<a href="#InfoPanel">InfoPanel</a>
|
||||
<a href="#LightScene">LightScene</a>
|
||||
@ -126,7 +116,6 @@
|
||||
<a href="#mailcheck">mailcheck</a>
|
||||
<a href="#MaxScanner">MaxScanner</a>
|
||||
<a href="#msgConfig">msgConfig</a>
|
||||
<a href="#notify">notify</a>
|
||||
<a href="#PRESENCE">PRESENCE</a>
|
||||
<a href="#PachLog">PachLog</a>
|
||||
<a href="#RSS">RSS</a>
|
||||
@ -141,20 +130,15 @@
|
||||
<a href="#ROOMMATE">ROOMMATE</a>
|
||||
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
||||
<a href="#SYSSTAT">SYSSTAT</a>
|
||||
<a href="#sequence">sequence</a>
|
||||
<a href="#speedtest">speedtest</a>
|
||||
<a href="#statistics">statistics</a>
|
||||
<a href="#structure">structure</a>
|
||||
<a href="#SVG">SVG</a>
|
||||
<a href="#telnet">telnet</a>
|
||||
<a href="#Twilight">Twilight</a>
|
||||
<a href="#THRESHOLD">THRESHOLD</a>
|
||||
<a href="#Utils">Utils</a>
|
||||
<a href="#WeekdayTimer">WeekdayTimer</a>
|
||||
<a href="#watchdog">watchdog</a>
|
||||
<a href="#weblink">weblink</a>
|
||||
<a href="#weco">weco</a>
|
||||
<a href="#WOL">WOL</a>
|
||||
<!-- header end -->
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
|
@ -34,52 +34,7 @@
|
||||
<br>
|
||||
<b>FHEM-Befehle</b>
|
||||
<ul>
|
||||
<a href="#apptime">apptime</a>
|
||||
<a href="#attr">attr</a>
|
||||
<a href="#backup">backup</a>
|
||||
<a href="#CULflash">CULflash</a>
|
||||
<a href="#cancel">cancel</a>
|
||||
<a href="#cmdalias">cmdalias</a>
|
||||
<a href="#configdb">configdb</a>
|
||||
<a href="#copy">copy</a>
|
||||
<a href="#count">count</a>
|
||||
<a href="#createlog">createlog</a>
|
||||
<a href="#define">define</a>
|
||||
<a href="#defmod">defmod</a>
|
||||
<a href="#delete">delete</a>
|
||||
<a href="#deleteattr">deleteattr</a>
|
||||
<a href="#deletereading">deletereading</a>
|
||||
<a href="#displayattr">displayattr</a>
|
||||
<a href="#fheminfo">fheminfo</a>
|
||||
<a href="#get">get</a>
|
||||
<a href="#getstate">getstate</a>
|
||||
<a href="#help">?,help</a>
|
||||
<a href="#IF">IF</a>
|
||||
<a href="#include">include</a>
|
||||
<a href="#inform">inform</a>
|
||||
<a href="#JsonList">JsonList</a>
|
||||
<a href="#JsonList2">JsonList2</a>
|
||||
<a href="#list">list</a>
|
||||
<a href="#modify">modify</a>
|
||||
<a href="#MSG">msg</a>
|
||||
<a href="#notice">notice</a>
|
||||
<a href="#quit">quit</a>
|
||||
<a href="#reload">reload</a>
|
||||
<a href="#rename">rename</a>
|
||||
<a href="#rereadcfg">rereadcfg</a>
|
||||
<a href="#restore">restore</a>
|
||||
<a href="#save">save</a>
|
||||
<a href="#set">set</a>
|
||||
<a href="#setdefaultattr">setdefaultattr</a>
|
||||
<a href="#setreading">setreading</a>
|
||||
<a href="#setstate">setstate</a>
|
||||
<a href="#shutdown">shutdown</a>
|
||||
<a href="#sleep">sleep</a>
|
||||
<a href="#trigger">trigger</a>
|
||||
<a href="#update">update</a>
|
||||
<a href="#usb">usb</a>
|
||||
<a href="#version">version</a>
|
||||
<a href="#XmlList">xmllist</a>
|
||||
<!-- header:command -->
|
||||
|
||||
</ul>
|
||||
|
||||
@ -87,73 +42,15 @@
|
||||
<b>Geräte</b>
|
||||
<ul>
|
||||
<a href="#global">global</a><br>
|
||||
<!-- header:device -->
|
||||
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<b>Hilfs (Erweiterungs-) Module</b>
|
||||
<ul>
|
||||
<a href="#at">at</a>
|
||||
<a href="#allowed">allowed</a>
|
||||
<a href="#autocreate">autocreate</a>
|
||||
<a href="#average">average</a>
|
||||
<a href="#Calendar">Calendar</a>
|
||||
<a href="#configDB">configDB</a>
|
||||
<a href="#CustomReadings">CustomReadings</a>
|
||||
<a href="#DOIF">DOIF</a>
|
||||
<a href="#Dashboard">Dashboard</a>
|
||||
<a href="#DbLog">DbLog</a>
|
||||
<a href="#dewpoint">dewpoint</a>
|
||||
<a href="#dummy">dummy</a>
|
||||
<a href="#eventTypes">eventTypes</a>
|
||||
<a href="#FHEM2FHEM">FHEM2FHEM</a>
|
||||
<a href="#FHEMWEB">FHEMWEB</a>
|
||||
<a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>
|
||||
<a href="#FB_CALLLIST">FB_CALLLIST</a>
|
||||
<a href="#FileLog">FileLog</a>
|
||||
<a href="#FLOORPLAN">FLOORPLAN</a>
|
||||
<a href="#GEOFANCY">GEOFANCY</a>
|
||||
<a href="#GUEST">GUEST</a>
|
||||
<a href="#HCS">HCS</a>
|
||||
<a href="#HTTPSRV">HTTPSRV</a>
|
||||
<a href="#Heating_Control">Heating_Control</a>
|
||||
<a href="#HMinfo">HMinfo</a>
|
||||
<a href="#holiday">holiday</a>
|
||||
<a href="#HourCounter">HourCounter</a>
|
||||
<a href="#InfoPanel">InfoPanel</a>
|
||||
<a href="#LightScene">LightScene</a>
|
||||
<a href="#logProxy">logProxy</a>
|
||||
<a href="#mailcheck">mailcheck</a>
|
||||
<a href="#msgConfig">msgConfig</a>
|
||||
<a href="#notify">notify</a>
|
||||
<a href="#PRESENCE">PRESENCE</a>
|
||||
<a href="#PachLog">PachLog</a>
|
||||
<a href="#RSS">RSS</a>
|
||||
<a href="#RandomTimer">RandomTimer</a>
|
||||
<a href="#rain">rain</a>
|
||||
<a href="#readingsGroup">readingsGroup</a>
|
||||
<a href="#readingsHistory">readingsHistory</a>
|
||||
<a href="#readingsProxy">readingsProxy</a>
|
||||
<a href="#remotecontrol">remotecontrol</a>
|
||||
<a href="#rssFeed">rssFeed</a>
|
||||
<a href="#RESIDENTS">RESIDENTS</a>
|
||||
<a href="#ROOMMATE">ROOMMATE</a>
|
||||
<a href="#SUNRISE_EL">SUNRISE_EL</a>
|
||||
<a href="#SYSSTAT">SYSSTAT</a>
|
||||
<a href="#sequence">sequence</a>
|
||||
<a href="#speedtest">speedtest</a>
|
||||
<a href="#statistics">statistics</a>
|
||||
<a href="#structure">structure</a>
|
||||
<a href="#SVG">SVG</a>
|
||||
<a href="#telnet">telnet</a>
|
||||
<a href="#Twilight">Twilight</a>
|
||||
<a href="#THRESHOLD">THRESHOLD</a>
|
||||
<a href="#Utils">Utils</a>
|
||||
<a href="#WeekdayTimer">WeekdayTimer</a>
|
||||
<a href="#watchdog">watchdog</a>
|
||||
<a href="#weblink">weblink</a>
|
||||
<a href="#weco">weco</a>
|
||||
<a href="#WOL">WOL</a>
|
||||
<!-- header:helper -->
|
||||
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user