mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
commandref_static: add FHEMWEB includes
git-svn-id: https://svn.fhem.de/fhem/trunk@16775 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c7dc1b067b
commit
4fc6613955
@ -86,7 +86,10 @@ for my $lang (@lang) {
|
|||||||
if($l =~ m/<a\s+name=['"]([^ '"]+)['"]>/);
|
if($l =~ m/<a\s+name=['"]([^ '"]+)['"]>/);
|
||||||
}
|
}
|
||||||
close(FH);
|
close(FH);
|
||||||
my $output = _cref_search("$modDir/$fName",$mName,$sfx);
|
my $output = _cref_search("$modDir/$fName",$sfx);
|
||||||
|
my $outFile = "docs/cref$sfx/$mName.cref";
|
||||||
|
_cref_write($outFile,$output) if $output;
|
||||||
|
|
||||||
# }
|
# }
|
||||||
}
|
}
|
||||||
closedir(DH);
|
closedir(DH);
|
||||||
@ -150,11 +153,11 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub _cref_search($$$) {
|
sub _cref_search {
|
||||||
my ($mod,$modShort,$sfx) = @_;
|
my ($fileName,$sfx) = @_;
|
||||||
my $output = "";
|
my $output = "";
|
||||||
my $skip = 1;
|
my $skip = 1;
|
||||||
my ($err,@text) = _cref_read($mod);
|
my ($err,@text) = _cref_read($fileName);
|
||||||
return $err if $err;
|
return $err if $err;
|
||||||
foreach my $l (@text) {
|
foreach my $l (@text) {
|
||||||
if($l =~ m/^=begin html$sfx$/) {
|
if($l =~ m/^=begin html$sfx$/) {
|
||||||
@ -167,7 +170,7 @@ sub _cref_search($$$) {
|
|||||||
my ($dir, $re) = ($1, $2);
|
my ($dir, $re) = ($1, $2);
|
||||||
if(opendir(DD, $dir)) {
|
if(opendir(DD, $dir)) {
|
||||||
foreach my $file (grep { m/^$2$/ } readdir(DD)) {
|
foreach my $file (grep { m/^$2$/ } readdir(DD)) {
|
||||||
my $o2 = _cref_search("$dir/$file", "", $sfx);
|
my $o2 = _cref_search("$dir/$file", $sfx);
|
||||||
$output .= $o2 if $o2;
|
$output .= $o2 if $o2;
|
||||||
}
|
}
|
||||||
closedir(DD);
|
closedir(DD);
|
||||||
@ -175,10 +178,7 @@ sub _cref_search($$$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $fileName = "docs/cref$sfx/$modShort.cref";
|
return $output;
|
||||||
# print "$fileName\n";
|
|
||||||
_cref_write($fileName,$output) if $output;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _cref_read {
|
sub _cref_read {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user