public
Description: An (X)HTML markup validator with command line interface.
Homepage: http://rubyforge.org/projects/pleasevalidate/
Clone URL: git://github.com/DylanFM/please_validate.git
name age message
file .gitignore Mon Mar 09 05:48:23 -0700 2009 Updating ignore file. [DylanFM]
file History.txt Mon Mar 16 04:25:54 -0700 2009 Bumped version number. Updated manifest. Update... [DylanFM]
file LICENSE Mon Mar 09 05:43:06 -0700 2009 Lots of changes. Accidentally deleted my .git f... [DylanFM]
file Manifest.txt Mon Mar 16 04:25:54 -0700 2009 Bumped version number. Updated manifest. Update... [DylanFM]
file PostInstall.txt Mon Mar 09 06:58:26 -0700 2009 Post install and updating rakefile. [DylanFM]
file README.rdoc Tue Mar 17 05:34:32 -0700 2009 Updating readme again. [DylanFM]
file RakeFile Wed Mar 11 07:00:52 -0700 2009 Fixing cucumber warning. Changing gem requireme... [DylanFM]
directory bin/ Mon Mar 09 05:43:06 -0700 2009 Lots of changes. Accidentally deleted my .git f... [DylanFM]
file cucumber.yml Wed Feb 18 23:25:39 -0800 2009 Cucumbers. [DylanFM]
directory examples/ Mon Mar 16 04:17:26 -0700 2009 Can pass a directory as an argument and it will... [DylanFM]
directory features/ Tue Mar 17 05:36:41 -0700 2009 Speling mistke [DylanFM]
directory lib/ Mon Mar 30 06:10:34 -0700 2009 Adding CLI option for running in quiet mode whi... [DylanFM]
file pleasevalidate.gemspec Mon Mar 30 06:12:32 -0700 2009 Regenerated gemspec. [DylanFM]
README.rdoc

Please Validate

DESCRIPTION:

A little markup validator.

FEATURES/PROBLEMS:

  • Validate (X)HTML files.

SYNOPSIS:

Valid file

    $ pleasevalidate examples/valid.html
    Valid: examples/valid.html

Invalid file

    $ pleasevalidate examples/invalid.html
    Invalid: examples/invalid.html
    11 errors:
    Line 8, Column 19: end tag for element "itle" which is not open
    Line 10, Column 6: end tag for "title" omitted, but OMITTAG NO was specified
    Line 8, Column 1: start tag was here
    Line 16, Column 5: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag
    Line 20, Column 0: unclosed end-tag requires SHORTTAG YES
    Line 20, Column 0: end tag for "li" omitted, but OMITTAG NO was specified
    Line 17, Column 4: start tag was here
    Line 20, Column 0: end tag for "ul" omitted, but OMITTAG NO was specified
    Line 16, Column 2: start tag was here
    Line 20, Column 0: end tag for "p" omitted, but OMITTAG NO was specified
    Line 15, Column 2: start tag was here
    Line 8, Column 20: XML Parsing Error:  Opening and ending tag mismatch: title line 8 and itle
    Line 20, Column 7: XML Parsing Error:  expected '>'
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag p line 15
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag body line 12
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag html line 4

A few files: valid, invalid and a non-HTML file

    $pleasevalidate examples/valid.html RakeFile examples/invalid.html
    Valid: examples/valid.html

    Validation failed: RakeFile must have a content type of text/html

    Invalid: examples/invalid.html
    11 errors:
    Line 8, Column 19: end tag for element "itle" which is not open
    Line 10, Column 6: end tag for "title" omitted, but OMITTAG NO was specified
    Line 8, Column 1: start tag was here
    Line 16, Column 5: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag
    Line 20, Column 0: unclosed end-tag requires SHORTTAG YES
    Line 20, Column 0: end tag for "li" omitted, but OMITTAG NO was specified
    Line 17, Column 4: start tag was here
    Line 20, Column 0: end tag for "ul" omitted, but OMITTAG NO was specified
    Line 16, Column 2: start tag was here
    Line 20, Column 0: end tag for "p" omitted, but OMITTAG NO was specified
    Line 15, Column 2: start tag was here
    Line 8, Column 20: XML Parsing Error:  Opening and ending tag mismatch: title line 8 and itle
    Line 20, Column 7: XML Parsing Error:  expected '>'
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag p line 15
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag body line 12
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag html line 4

A directory

    $pleasevalidate examples
    Valid: examples/valid.html

    Invalid: examples/invalid.html
    11 errors:
    Line 8, Column 19: end tag for element "itle" which is not open
    Line 10, Column 6: end tag for "title" omitted, but OMITTAG NO was specified
    Line 8, Column 1: start tag was here
    Line 16, Column 5: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag
    Line 20, Column 0: unclosed end-tag requires SHORTTAG YES
    Line 20, Column 0: end tag for "li" omitted, but OMITTAG NO was specified
    Line 17, Column 4: start tag was here
    Line 20, Column 0: end tag for "ul" omitted, but OMITTAG NO was specified
    Line 16, Column 2: start tag was here
    Line 20, Column 0: end tag for "p" omitted, but OMITTAG NO was specified
    Line 15, Column 2: start tag was here
    Line 8, Column 20: XML Parsing Error:  Opening and ending tag mismatch: title line 8 and itle
    Line 20, Column 7: XML Parsing Error:  expected '>'
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag p line 15
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag body line 12
    Line 20, Column 7: XML Parsing Error:  Premature end of data in tag html line 4

    Valid: examples/another/fancy.html

REQUIREMENTS:

  • nokogiri
  • colored
  • mime/types

INSTALL:

    gem install pleasevalidate

Or via Github:

Run the following if you haven’t already:

    gem sources -a http://gems.github.com

Install the gem:

    gem install DylanFM-pleasevalidate

LICENSE:

(The MIT License)

Copyright © 2009 Dylan Fogarty-MacDonald

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.