r71957 - in /trunk/libapache2-mod-perl2/debian: changelog transform_pod2html.pl
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Fri Mar 25 11:59:02 UTC 2011
Author: periapt-guest
Date: Fri Mar 25 11:58:49 2011
New Revision: 71957
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71957
Log:
Need to index HTML files
Check that there are as few broken links as possible
- doc package should recommend dwww
- Experimental script to transform pod files to HTML
Added:
trunk/libapache2-mod-perl2/debian/transform_pod2html.pl
Modified:
trunk/libapache2-mod-perl2/debian/changelog
Modified: trunk/libapache2-mod-perl2/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapache2-mod-perl2/debian/changelog?rev=71957&op=diff
==============================================================================
--- trunk/libapache2-mod-perl2/debian/changelog (original)
+++ trunk/libapache2-mod-perl2/debian/changelog Fri Mar 25 11:58:49 2011
@@ -7,7 +7,9 @@
text: pod2text
html: pod2html
pdf : Use libpdf-create-perl to convert .png -> .pdf
- How to recognize what is a raw text file
+ Need to index HTML files
+ Check that there are as few broken links as possible
+ - doc package should recommend dwww
- Check dependencies
* Added myself to Uploaders
@@ -17,6 +19,7 @@
* Added versioning of depdendency between dev and core packages
* Registered documents with doc-base (in progress)
- Adding todo files to doc package
+ - Experimental script to transform pod files to HTML
* New upstream release
* Reviewed patches
- Removed 009_allow_parallel_build.patch [applied upstream]
Added: 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=71957&op=file
==============================================================================
--- trunk/libapache2-mod-perl2/debian/transform_pod2html.pl (added)
+++ trunk/libapache2-mod-perl2/debian/transform_pod2html.pl Fri Mar 25 11:58:49 2011
@@ -1,0 +1,35 @@
+#!/usr/bin/perl
+use strict;
+use Carp;
+use File::Find;
+use File::Spec;
+use Pod::Html;
+use File::Path qw(make_path);
+
+# dependencies: libreadonly-perl
+use Readonly;
+
+Readonly my $CUR_DIR => $ARGV[0];
+Readonly my $SRC_DIR => $ARGV[1];
+Readonly my $DEST_DIR => $ARGV[2];
+croak "No source directory: $SRC_DIR" if not -d $SRC_DIR;
+croak "No destination directory: $DEST_DIR" if not -d $DEST_DIR;
+
+find( \&transform_pod2html, $SRC_DIR );
+
+sub transform_pod2html {
+ return if $File::Find::dir =~ m{/\.svn};
+ my $name = $_;
+ return if $name eq '.svn';
+ return if $name !~ m{\.pod$};
+ 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 $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");
+}
More information about the Pkg-perl-cvs-commits
mailing list