Skip to content

Commit

Permalink
gen_html_help.pl: fixes some broken html links and whitespace
Browse files Browse the repository at this point in the history
Signed-off-by: Jed Reynolds <[email protected]>
  • Loading branch information
memnochproxy committed Mar 26, 2024
1 parent 9d04ba9 commit 6855cbb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions gen_html_help.pl
Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,43 @@
my $exe = $script;
my $cd = 0;
if ($exe =~ /^py-scripts\/(.*)/) {
$exe = $1;
$cd = 1;
chdir("py-scripts");
$exe = $1;
$cd = 1;
chdir("py-scripts");
}
my $script_help_content = `./$exe --help`;
$script_help_content =~ s/</&lt;/g;
$script_help_content =~ s/>/&gt;/g;

my $summary = `./$exe --help_summary`;
if ($summary =~ /unrecognized arguments/) {
$summary = "";
$summary = "";
}
$summary =~ s/\n\n/<P>/g;

if ($cd) {
chdir("..");
chdir("..");
}

my $rpt = $reports{$script};
#print("rpt: $rpt script: $script\n");
if ($rpt eq undef) {
$rpt = "";
$rpt = "";
}
else {
$rpt = "<a href=\"examples/script_results/$rpt\">Example report: $rpt</a><br>";
$rpt = "<a href=\"examples/script_results/$rpt\">Example report: $rpt</a><br>";
}
#print("rpt2: $rpt script: $script\n");

$toc .= "<dt><a href=\"#$script_printable\"</a>$script</a></dt><dd>$rpt " . "$summary</dd>\n";
$script_help .= "<dt><a name=\"$script_printable\">$script</dt>\n";
$toc .= "<dt><a href=\"#$script_printable\">$script</a></dt><dd>$rpt " . "$summary</dd>\n";
$script_help .= "<dt><a name=\"$script_printable\">$script</a></dt>\n";
$script_help .= "<dd>$rpt<pre>$script_help_content</pre></dd>\n";
}

print "Script Table of Contents<br><dl>
$toc
</dl>
<P>\n\n";
<br/>\n\n";

print "Script Information<br><dl>
$script_help
Expand Down

0 comments on commit 6855cbb

Please sign in to comment.