X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fpod2x;h=6b7153f9676211a149d3b52b07069fbcf4c6c6dc;hb=781e704eb702673bfcad0690cc94032e4279d7e6;hp=4a3e800d8f734f0cfba9b8d532cd991f5bbf2faa;hpb=983359e82af73969459b80b74626af7f3341f3e4;p=freeside.git diff --git a/bin/pod2x b/bin/pod2x index 4a3e800d8..6b7153f96 100755 --- a/bin/pod2x +++ b/bin/pod2x @@ -34,6 +34,7 @@ foreach my $dir ( FS/part_event FS/part_event/Condition FS/part_event/Action FS/ClientAPI FS/Cron FS/Misc FS/Report FS/Report/Table FS/TicketSystem FS/UI + FS/SelfService ) ) { -d $dir or mkdir $dir; @@ -58,7 +59,7 @@ foreach my $file ( } my $mvs = WWW::Mediawiki::Client->new( - 'host' => 'www.sisd.com', + 'host' => 'www.freeside.biz', 'wiki_path' => 'mediawiki/index.php', 'username' => $mw_username, 'password' => $mw_password, @@ -67,15 +68,23 @@ my $mvs = WWW::Mediawiki::Client->new( $mvs->do_login; -foreach my $file ( - glob("$site_perl/*.pm"), - glob("$site_perl/*/*.pm"), - glob("$site_perl/*/*/*.pm"), - glob("$site_perl/*/*/*/*.pm"), - glob("$site_perl/bin/*.pod"), - glob("./fs_selfservice/FS-SelfService/*.pm"), - glob("./fs_selfservice/FS-SelfService/*/*.pm"), -) { +my @files; +if ( @ARGV ) { + @files = @ARGV; +} else { + @files = ( + glob("$site_perl/*.pm"), + glob("$site_perl/*/*.pm"), + glob("$site_perl/*/*/*.pm"), + glob("$site_perl/*/*/*/*.pm"), + glob("$site_perl/bin/*.pod"), + glob("./fs_selfservice/FS-SelfService/*.pm"), + glob("./fs_selfservice/FS-SelfService/*/*.pm"), + ); + +} + +foreach my $file (@files) { next if $file =~ /(^|\/)blib\//; next if $file =~ /(^|\/)CVS\//; #$file =~ /\/([\w\-]+)\.pm$/ or die "oops file $file"; @@ -106,7 +115,7 @@ foreach my $file ( open(RAW, "<$html/$name.rawwiki") or die $!; open(WIKI,">$html/$name.wiki" ) or die $!; while () { - s/\[\[([^#][^\]]*)\]\]/"[[$html\/". w_e($1). "|$1]]"/ge; + s/\[\[([^#p][^\]]*)\]\]/"[[$html\/". w_e($1). "|$1]]"/ge; print WIKI $_; } close RAW;