10 my $input_path = 'C:/SDL_perl/lib/pods';
11 $input_path = $ARGV[0] unless !$ARGV[0];
12 my $output_path = 'F:/htdocs/SDL-Site/pages';
13 $output_path = $ARGV[0] unless !$ARGV[1];
14 my $parser = Pod::Xhtml->new(FragmentOnly => 1);
15 my %module_names = ();
18 read_file($input_path);
21 open($fh, '>', File::Spec->catfile($output_path, 'documentation.html-inc'));
22 binmode($fh, ":utf8");
23 print($fh "<div class=\"pod\">\n<h1>Documentation (latest development branch)</h1>");
24 for my $module_name (sort keys %module_names)
26 print($fh '<a href="' . $module_names{$module_name} . '">',
31 print($fh "</div>\n");
37 my @files = <$path/*>;
41 read_file($_) if(-d $_);
46 $file_name =~ s/^$input_path\/*//;
47 my $module_name = $file_name;
48 $module_name =~ s/\//::/g;
49 $module_name =~ s/(\.pm|\.pod)$//i;
50 $file_name =~ s/\//-/g;
51 $file_name =~ s/(\.pm|\.pod)$/.html-inc/i;
52 my $file_path = $file_name;
53 $file_path =~ s/\-inc$//;
54 $module_names{$module_name} = $file_path;
55 $file_name = File::Spec->catfile($output_path, $file_name);
57 $parser->parse_from_file($_, $file_name);