r72041 - in /trunk/libapache2-mod-perl2/debian: changelog control index.tmpl transform_pod2html.pl
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Tue Mar 29 21:27:22 UTC 2011
Author: periapt-guest
Date: Tue Mar 29 21:26:54 2011
New Revision: 72041
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=72041
Log:
Copied .png files and added them to the HTML index
Modified:
trunk/libapache2-mod-perl2/debian/changelog
trunk/libapache2-mod-perl2/debian/control
trunk/libapache2-mod-perl2/debian/index.tmpl
trunk/libapache2-mod-perl2/debian/transform_pod2html.pl
Modified: trunk/libapache2-mod-perl2/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/changelog?rev=72041&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/changelog (original)
+++ trunk/libapache2-mod-perl2/debian/changelog Tue Mar 29 21:26:54 2011
@@ -2,10 +2,6 @@
TODO:
- DEB_BUILD_OPTIONS does not seem to work
- - Resolve doc-base issues
- Check that there are as few broken links as possible
- Idea: pdf : Use libpdf-create-perl to convert .png -> .pdf
- Need to index HTML files
- Check dependencies
* Added myself to Uploaders
@@ -17,6 +13,7 @@
- Adding todo files to doc package
- Added dwww as a recommendation to doc package
- Transformed .pod files to indexed HTML files
+ - Copied .png files and added them to the HTML index
* New upstream release
* Reviewed patches
- Removed 009_allow_parallel_build.patch [applied upstream]
Modified: trunk/libapache2-mod-perl2/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/control?rev=72041&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/control (original)
+++ trunk/libapache2-mod-perl2/debian/control Tue Mar 29 21:26:54 2011
@@ -58,4 +58,5 @@
files and the famous Apache::Registry module for caching
compiled scripts.
.
- This package contains additional documentation for mod_perl.
+ This package contains additional documentation for mod_perl tailored
+ to be indexed by the doc-base system.
Modified: trunk/libapache2-mod-perl2/debian/index.tmpl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/index.tmpl?rev=72041&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/index.tmpl (original)
+++ trunk/libapache2-mod-perl2/debian/index.tmpl Tue Mar 29 21:26:54 2011
@@ -30,7 +30,7 @@
<!-- INDEX END -->
<ul>
-<TMPL_LOOP NAME="links">
+<TMPL_LOOP NAME="pod">
<li><a name="<TMPL_VAR NAME="href">"><TMPL_VAR NAME="text"></a></li>
</TMPL_LOOP>
</ul>
@@ -41,7 +41,7 @@
<TMPL_LOOP NAME="sections">
<h2><a name="<TMPL_VAR NAME="title">"><TMPL_VAR NAME="title"></a></h2>
<ul>
-<TMPL_LOOP NAME="links">
+<TMPL_LOOP NAME="pod">
<li><a name="<TMPL_VAR NAME="href">"><TMPL_VAR NAME="text"></a></li>
</TMPL_LOOP>
</ul>
@@ -49,10 +49,18 @@
<TMPL_LOOP NAME="sections">
<h3><a name="<TMPL_VAR NAME="title">"><TMPL_VAR NAME="title"></a></h3>
<ul>
-<TMPL_LOOP NAME="links">
+<TMPL_LOOP NAME="pod">
<li><a name="<TMPL_VAR NAME="href">"><TMPL_VAR NAME="text"></a></li>
</TMPL_LOOP>
</ul>
+<TMPL_IF NAME="png">
+<h4>Diagrams</h4>
+<ul>
+<TMPL_LOOP NAME="png">
+<li><a name="<TMPL_VAR NAME="href">"><TMPL_VAR NAME="text"></a></li>
+</TMPL_LOOP>
+</ul>
+</TMPL_IF>
</TMPL_LOOP>
</ul>
</TMPL_LOOP>
Modified: trunk/libapache2-mod-perl2/debian/transform_pod2html.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/transform_pod2html.pl?rev=72041&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/transform_pod2html.pl (original)
+++ trunk/libapache2-mod-perl2/debian/transform_pod2html.pl Tue Mar 29 21:26:54 2011
@@ -5,6 +5,7 @@
use File::Spec;
use Pod::Html;
use File::Path qw(make_path);
+use File::Copy;
# dependencies
use Readonly;
@@ -20,7 +21,7 @@
# This data structure will end up being
# a hierarchical index of the HTML formats of
# the pod in the form expected by HTML::Template.
-my %data = (links=>[],sections=>[]);
+my %data = (pod=>[],sections=>[]);
find( \&transform_pod2html, $SRC_DIR );
my $template = HTML::Template->new(filename=>"$CUR_DIR/debian/index.tmpl", die_on_bad_params=>0);
@@ -35,35 +36,45 @@
return if $File::Find::dir =~ m{/\.svn};
my $name = $_;
return if $name eq '.svn';
- return if $name !~ m{\.pod$};
+ return if $name !~ m{\.(\w{3})$};
+ my $ext = $1;
+ return if $ext ne 'pod' and $ext ne 'png';
my ($v, $directories, $file) = File::Spec->splitpath($File::Find::name);
- $name =~ s{\.pod$}{\.html};
my @dirs = File::Spec->splitdir($directories);
shift @dirs; # should be 'docs'
my $newdir = File::Spec->catdir($CUR_DIR, $DEST_DIR, @dirs);
make_path($newdir, {verbose=>1});
+ my $oldfile = File::Spec->catfile($CUR_DIR, $File::Find::name);
+ if ($ext eq 'pod') {
+ $name =~ s{\.pod$}{\.html};
+ }
my $newfile = File::Spec->catfile($newdir, $name);
- my $oldfile = File::Spec->catfile($CUR_DIR, $File::Find::name);
print "$File::Find::name -> $newfile\n";
- pod2html("--infile=$oldfile", "--outfile=$newfile");
+ if ($ext eq 'pod') {
+ pod2html("--infile=$oldfile", "--outfile=$newfile");
+ }
+ else {
+ copy($oldfile, $newfile);
+ }
my $new_url_dir = File::Spec->catdir(
'cgi-bin', 'dwww', 'usr', 'share', 'doc', 'libapache2-mod-perl2-doc',
@dirs
);
- index_file($name, "/$new_url_dir/$name", @dirs);
+ index_file($name, "/$new_url_dir/$name", $ext, @dirs);
return;
}
sub index_file {
my $name = shift;
my $newfile = shift;
+ my $ext = shift;
my @dirs = @_;
my $ptr = \%data;
foreach my $d (@dirs) {
last if $d eq '';
$ptr = find_section($ptr, $d);
}
- push @{$ptr->{links}}, {href=>$newfile,text=>$name};
+ push @{$ptr->{$ext}}, {href=>$newfile,text=>$name};
return;
}
@@ -74,7 +85,7 @@
foreach my $s (@sections) {
return $s if $s->{title} eq $dir;
}
- my %ldata = (title=>$dir,links=>[],sections=>[]);
+ my %ldata = (title=>$dir,pod=>[],sections=>[],png=>[]);
push @{$ptr->{sections}}, \%ldata;
return \%ldata;
}
More information about the Pkg-perl-cvs-commits
mailing list