r62966 - in /trunk/libhtml-parser-perl/debian: changelog patches/example_selfdocs.patch
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Sun Sep 26 00:21:31 UTC 2010
Author: periapt-guest
Date: Sun Sep 26 00:18:31 2010
New Revision: 62966
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62966
Log:
* Added patch to address example issues: (Closes: #584088)
- Added comments to several scripts in eg directory.
- Added README to eg directory.
- Encoding text in certain scripts to ensure clean run on wide chars.
- Adding rule to examples install
Modified:
trunk/libhtml-parser-perl/debian/changelog
trunk/libhtml-parser-perl/debian/patches/example_selfdocs.patch
Modified: trunk/libhtml-parser-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/debian/changelog?rev=62966&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/debian/changelog (original)
+++ trunk/libhtml-parser-perl/debian/changelog Sun Sep 26 00:18:31 2010
@@ -1,17 +1,17 @@
libhtml-parser-perl (3.68-1) UNRELEASED; urgency=low
[ Salvatore Bonaccorso ]
- # no need to upload, only changes in POD and
- # for specific case of bleadperl
- IGNORE-VERSION: 3.68-1
-
* New upstream release
* Bump Standards-Version to 3.9.1.
* Refresh debian/copyright file.
[ Nicholas Bamber ]
* Added myself to Uploaders
- * Started working on #584088
+ * Added patch to address example issues: (Closes: #584088)
+ - Added comments to several scripts in eg directory.
+ - Added README to eg directory.
+ - Encoding text in certain scripts to ensure clean run on wide chars.
+ - Adding rule to examples install
-- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Thu, 02 Sep 2010 07:49:31 +0200
Modified: trunk/libhtml-parser-perl/debian/patches/example_selfdocs.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/debian/patches/example_selfdocs.patch?rev=62966&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/debian/patches/example_selfdocs.patch (original)
+++ trunk/libhtml-parser-perl/debian/patches/example_selfdocs.patch Sun Sep 26 00:18:31 2010
@@ -1,3 +1,10 @@
+Author: Nicholas Bamber <nicholas at periapt.co.uk>
+Subject: Fix issues with example scripts
+ - Make sure all the scripts have some explanatory comment
+ - Add a README file in the eg directory
+ - Make sure the scripts run cleanly
+Bug: http://rt.cpan.org/Public/Bug/Display.html?id=58016
+Last-Update: 2010-09-26
--- a/eg/hanchors
+++ b/eg/hanchors
@@ -6,6 +6,7 @@
@@ -19,9 +26,11 @@
$text =~ s/\s+/ /g;
--- /dev/null
+++ b/eg/README
-@@ -0,0 +1,11 @@
-+For all of these scripts if you run them with a file argument, where the file
-+contains some HTML, you should get some output.
+@@ -0,0 +1,23 @@
++For most of these scripts if you run them with a file argument, where the file
++contains some HTML, you should get some output. The 'h*sub' scripts take two
++arguments the first of which is a perl expression and the second an HTML file.
++In any case all of the files have an exlanatory comment.
+
+For example try running:
+
@@ -30,6 +39,16 @@
+
+Of course if http://www.debian.org is not your favourite web site you can
+make the appropriate substitution.
++
++hanchors - List all anchors in the HTML
++hlc - Correct any upper case tags to lower case
++hstrip - Removes deprecated scripting and styling tags and attributes
++htextsub - Apply arbirary perl expression to all text within HTML
++hrefsub - Apply arbirary perl expression to all hrefs within HTML
++htitle - Print title of the HTML document
++hdump - Output event information whilst parsing HTML document
++hform - Print analysis of form controls present in HTML
++htext - Print all the text from the HTML
+
--- a/eg/hlc
+++ b/eg/hlc
@@ -43,3 +62,65 @@
use strict;
use HTML::Parser ();
+--- a/eg/hstrip
++++ b/eg/hstrip
+@@ -1,6 +1,7 @@
+ #!/usr/bin/perl -w
+
+-# This script cleans up an HTML document
++# This script cleans up an HTML document.
++# Specifically it removes deprecated styling and scripting tags.
+
+ use strict;
+ use HTML::Parser ();
+--- a/eg/hdump
++++ b/eg/hdump
+@@ -1,5 +1,8 @@
+ #!/usr/bin/perl -w
+
++# This script will output event information as it parses the HTML document.
++# This gives the user a "Parser's eye view" of an HTML document.
++
+ use HTML::Parser ();
+ use Data::Dump ();
+
+--- a/eg/hform
++++ b/eg/hform
+@@ -1,5 +1,6 @@
+ #!/usr/bin/perl -w
+
++# Print information about forms and their controls present in the HTML.
+ # See also HTML::Form module
+
+ use HTML::PullParser ();
+--- a/eg/htext
++++ b/eg/htext
+@@ -4,6 +4,7 @@
+
+ use strict;
+ use HTML::Parser 3.00 ();
++use Encode;
+
+ my %inside;
+
+@@ -17,7 +18,7 @@
+ sub text
+ {
+ return if $inside{script} || $inside{style};
+- print $_[0];
++ print encode('utf8',$_[0]);
+ }
+
+ HTML::Parser->new(api_version => 3,
+--- a/eg/htextsub
++++ b/eg/htextsub
+@@ -3,6 +3,9 @@
+ # Shows how to mangle all plain text in an HTML document, using an arbitrary
+ # Perl expression. Plain text is all text not within a tag declaration, i.e.
+ # not in <p ...>, but possibly between <p> and </p>
++# Example (Reverse 'Debian' in all text) :
++# lynx -dump -source -raw http://www/debian.org > /tmp/a.txt
++# ./htextsub '$_ =~ s/Debian/Naibed/gi' /tmp/a.txt
+
+ use strict;
+ my $code = shift || usage();
More information about the Pkg-perl-cvs-commits
mailing list