forgotten files
This commit is contained in:
parent
ed3bd3764f
commit
accad7381e
6
lang/en
6
lang/en
@ -327,5 +327,9 @@ wsearch_hcgis=References
|
||||
wsearch_type_mod=Module name
|
||||
wsearch_type_config=Configuration
|
||||
wsearch_type_help=Help page
|
||||
wsearch_type_text=UI text
|
||||
wsearch_type_text=User interface
|
||||
wsearch_type_dir=Module URL
|
||||
wsearch_hmod=Module
|
||||
wsearch_moddir=URL path /$1/
|
||||
wsearch_searching=Searching for $1 . .
|
||||
wsearch_found=found $1 results :
|
||||
|
@ -148,7 +148,7 @@ close(COPY);
|
||||
|
||||
# Create the config files file, for those we don't want to replace
|
||||
open(CONF, ">$conffiles_file");
|
||||
print CONF $pam_file,"\n";
|
||||
print CONF "/etc/pam.d/$baseproduct\n";
|
||||
close(CONF);
|
||||
|
||||
# Get the changes for each module and version
|
||||
@ -415,7 +415,7 @@ system("gpg --output deb/${product}_$ver.dsc --clearsign deb/${product}_$ver.pla
|
||||
unlink("deb/${product}_$ver.plain");
|
||||
print "Wrote source deb/${product}_$ver.dsc\n";
|
||||
|
||||
if (!$webmail && -d "/usr/local/webadmin/deb/repository") {
|
||||
if (-d "/usr/local/webadmin/deb/repository") {
|
||||
# Add to our repository
|
||||
chdir("/usr/local/webadmin/deb/repository");
|
||||
system("reprepro -Vb . remove sarge $product");
|
||||
|
@ -178,6 +178,7 @@ return "CIPE" if ($_[0] =~ /^cip/);
|
||||
return "VmWare" if ($_[0] =~ /^vmnet/);
|
||||
return "Wireless" if ($_[0] =~ /^wlan/);
|
||||
return "Bonded" if ($_[0] =~ /^bond/);
|
||||
return "OpenVZ" if ($_[0] =~ /^venet/);
|
||||
return $text{'ifcs_unknown'};
|
||||
}
|
||||
|
||||
|
@ -14,9 +14,9 @@ chop($pwd = `pwd`);
|
||||
|
||||
# Build list of modules
|
||||
@mods = ( [ "WebminCore", ".",
|
||||
[ "web-lib-funcs.pl", "web-lib.pl", "ui-lib.pl" ] ] );
|
||||
[ "web-lib-funcs.pl", "web-lib.pl", "ui-lib.pl" ],
|
||||
"Core Webmin API" ] );
|
||||
foreach my $mi (glob("*/module.info")) {
|
||||
# XXX add non-core modules
|
||||
my $mod;
|
||||
($mod = $mi) =~ s/\/module.info//;
|
||||
next if (-l $mod);
|
||||
@ -28,6 +28,8 @@ foreach my $mi (glob("*/module.info")) {
|
||||
else {
|
||||
@modlibs = ( $mod."-lib.pl" );
|
||||
}
|
||||
my $desc = $midata =~ /desc=(.*)/ ? $1 : $mod;
|
||||
$desc .= " module";
|
||||
my @podlibs;
|
||||
foreach my $f (@modlibs) {
|
||||
if (-r "$mod/$f") {
|
||||
@ -38,7 +40,7 @@ foreach my $mi (glob("*/module.info")) {
|
||||
}
|
||||
}
|
||||
if (@podlibs) {
|
||||
push(@mods, [ "Module $mod", $mod, \@podlibs ]);
|
||||
push(@mods, [ "Module $mod", $mod, \@podlibs, $desc ]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,25 +48,17 @@ foreach my $mi (glob("*/module.info")) {
|
||||
system("rm -rf $temp_pod_dir ; mkdir $temp_pod_dir");
|
||||
foreach $m (@mods) {
|
||||
print STDERR "Doing module $m->[0]\n";
|
||||
my $parser = Pod::Simple::Wiki->new('twiki');
|
||||
my $wikiname = $m->[1] eq "." ? "ApiWebminCore"
|
||||
: "Api".join("", map { ucfirst($_) }
|
||||
split(/\-/, $m->[1]));
|
||||
my $outfile = "$temp_pod_dir/$wikiname.txt";
|
||||
open(OUTFILE, ">$outfile");
|
||||
if ($m->[1] eq ".") {
|
||||
print OUTFILE "---+ Core Webmin API\n\n";
|
||||
}
|
||||
else {
|
||||
print OUTFILE "---+ Functions from module $m->[1]\n\n";
|
||||
}
|
||||
push(@$m, $wikiname);
|
||||
my $infile = "/tmp/pod2twiki.in";
|
||||
open(INFILE, ">$infile");
|
||||
foreach $f (@{$m->[2]}) {
|
||||
# Replace un-decorated =item with =item *
|
||||
# This is kosher according to the POD docs, but Pod2wiki doesn't
|
||||
# seem to like it
|
||||
print STDERR "Doing file $f\n";
|
||||
my $infile = "/tmp/pod2twiki.in";
|
||||
open(INFILE, ">$infile");
|
||||
open(ORIGFILE, "$m->[1]/$f");
|
||||
while(<ORIGFILE>) {
|
||||
if (/^=item\s+([^\*].*)/) {
|
||||
@ -75,14 +69,24 @@ foreach $m (@mods) {
|
||||
}
|
||||
}
|
||||
close(ORIGFILE);
|
||||
close(INFILE);
|
||||
|
||||
# Do the conversion
|
||||
open(INFILE, $infile);
|
||||
$parser->output_fh(*OUTFILE);
|
||||
$parser->parse_file(*INFILE);
|
||||
close(INFILE);
|
||||
}
|
||||
close(INFILE);
|
||||
|
||||
# Do the conversion
|
||||
my $outfile = "$temp_pod_dir/$wikiname.txt";
|
||||
open(OUTFILE, ">$outfile");
|
||||
print OUTFILE "%TOC%\n\n";
|
||||
if ($m->[1] eq ".") {
|
||||
print OUTFILE "---+ Core Webmin API\n\n";
|
||||
}
|
||||
else {
|
||||
print OUTFILE "---+ Functions from module $m->[1]\n\n";
|
||||
}
|
||||
open(INFILE, $infile);
|
||||
my $parser = Pod::Simple::Wiki->new('twiki');
|
||||
$parser->output_fh(*OUTFILE);
|
||||
$parser->parse_file(*INFILE);
|
||||
close(INFILE);
|
||||
close(OUTFILE);
|
||||
|
||||
# Remove errors block
|
||||
@ -90,14 +94,52 @@ foreach $m (@mods) {
|
||||
my @lines = <OUT>;
|
||||
close(OUT);
|
||||
open(OUT, ">$outfile");
|
||||
my $verbatim = 0;
|
||||
foreach my $l (@lines) {
|
||||
last if ($l =~ /POD\s+ERRORS/);
|
||||
if ($l =~ /<verbatim>/) {
|
||||
$verbatim = 1;
|
||||
}
|
||||
elsif ($l =~ /<\/verbatim>/) {
|
||||
$verbatim = 0;
|
||||
}
|
||||
elsif (!$verbatim) {
|
||||
$l = &html_escape($l);
|
||||
}
|
||||
print OUT $l;
|
||||
}
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
# Create summary page
|
||||
open(SUMM, ">$temp_pod_dir/TheWebminAPI.txt");
|
||||
print SUMM "---+ The Webmin API\n\n";
|
||||
print SUMM <<EOF;
|
||||
The Webmin API has a set of core functions that are available to all modules,
|
||||
and functions exported by other modules that yours can optionally use. The APIs
|
||||
for which documentation is available are linked to below :
|
||||
|
||||
EOF
|
||||
foreach my $m (@mods) {
|
||||
print SUMM " * [[$m->[4]][$m->[3]]]\n";
|
||||
}
|
||||
close(SUMM);
|
||||
|
||||
# Upload to doxfer
|
||||
print STDERR "Uploading to $doxfer_host\n";
|
||||
system("scp $temp_pod_dir/*.txt doxfer\@$doxfer_host:/home/doxfer/public_html/twiki/data/Webmin/");
|
||||
print STDERR "done\n";
|
||||
|
||||
sub html_escape
|
||||
{
|
||||
my ($tmp) = @_;
|
||||
$tmp =~ s/&/&/g;
|
||||
$tmp =~ s/</</g;
|
||||
$tmp =~ s/>/>/g;
|
||||
$tmp =~ s/\"/"/g;
|
||||
$tmp =~ s/\'/'/g;
|
||||
$tmp =~ s/=/=/g;
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user