[xml/sgml-commit] r1861 - in /packages/w3c-markup-validator/trunk/debian: changelog validate.pl w3c-markup-validator.examples
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Thu Mar 17 12:31:04 UTC 2011
Author: periapt-guest
Date: Thu Mar 17 12:30:55 2011
New Revision: 1861
URL: http://svn.debian.org/wsvn/debian-xml-sgml/?sc=1&rev=1861
Log:
Added example perl script that uses WebService::Validator::HTML::W3C
Added:
packages/w3c-markup-validator/trunk/debian/validate.pl (with props)
Modified:
packages/w3c-markup-validator/trunk/debian/changelog
packages/w3c-markup-validator/trunk/debian/w3c-markup-validator.examples
Modified: packages/w3c-markup-validator/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/changelog?rev=1861&op=diff
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/changelog (original)
+++ packages/w3c-markup-validator/trunk/debian/changelog Thu Mar 17 12:30:55 2011
@@ -16,6 +16,7 @@
* Add apache config ensuring directory access (Closes: #608225)
* Change rules to rebuild htdocs/scripts/combined.js
* Added Suggests clause and reviewed the long description
+ * Added example perl script that uses WebService::Validator::HTML::W3C
-- Nicholas Bamber <nicholas at periapt.co.uk> Mon, 14 Mar 2011 10:30:01 +0000
Added: packages/w3c-markup-validator/trunk/debian/validate.pl
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/validate.pl?rev=1861&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/validate.pl (added)
+++ packages/w3c-markup-validator/trunk/debian/validate.pl Thu Mar 17 12:30:55 2011
@@ -1,0 +1,24 @@
+#!/usr/bin/perl
+use WebService::Validator::HTML::W3C;
+
+my $v = WebService::Validator::HTML::W3C->new(
+ detailed => 1,
+ validator_uri => 'http://localhost/w3c-validator/check',
+);
+
+if ($v->validate($ARGV[0])) {
+ if ($v->is_valid) {
+ printf "%s is valid\n", $v->uri;
+ }
+ else {
+ printf "%s is not valid\n", $v->uri;
+ foreach my $error (@{$v->errors}) {
+ printf "%s at line %d\n", $error->msg, $error->line;
+ }
+ }
+}
+else {
+ printf "Failed to validate the website: %s\n", $v->validator_error;
+}
+
+# copyright 2003-2008, Struan Donald
Propchange: packages/w3c-markup-validator/trunk/debian/validate.pl
------------------------------------------------------------------------------
svn:executable = *
Modified: packages/w3c-markup-validator/trunk/debian/w3c-markup-validator.examples
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/w3c-markup-validator.examples?rev=1861&op=diff
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/w3c-markup-validator.examples (original)
+++ packages/w3c-markup-validator/trunk/debian/w3c-markup-validator.examples Thu Mar 17 12:30:55 2011
@@ -1,1 +1,2 @@
htdocs/dev/*
+debian/validate.pl
More information about the debian-xml-sgml-commit
mailing list