UltrosBot/Ultros-contrib — pull request #12 by Zarthus (2014-06-05 11:48:33+00:00)
Title: W3.org validator plugin, validate your websites with Ultros from irc!

This plugin communicates with [validator.w3.org](http://validator.w3.org/), reading it's headers for status, errors, warnings, and recursion.
Documentation: http://validator.w3.org/docs/api.html

A document can pass validation if it has no errors.

This plugin introduces one command, with two aliases:
`w3validate [url] [...]`, aliased to `validate` and `valid`.
You can check up to three URIs at a time, with a minimum requirement of one URI. The bot will notify you if you are requesting too many URIs to be checked with a notice. And then look up the first three requested URIs.
You need not specify entire urls, for example, `ultros.io` works as well as `http://ultros.io` or `http://www.ultros.io`. Should an URI be invalid, then the API will return an `abort` status error.

Example output by the plugin:
```
(13:10:07) <@Zarthus> .valid python.org php.net google.com
(13:10:09) [Invalid] The website python.org is Invalid. Errors: 64, Warnings: 1 (http://validator.w3.org/check?uri=python.org)
(13:10:10) [Invalid] The website php.net is Invalid. Errors: 1, Warnings: 2 (http://validator.w3.org/check?uri=php.net)
(13:10:11) [Invalid] The website google.com is Invalid. Errors: 23, Warnings: 4 (http://validator.w3.org/check?uri=google.com)
(13:10:24) <@Zarthus> .valid zarth.us http://zarth.us www.example.org
(13:10:26) [Valid] The website zarth.us is Valid. Warnings: 1 (http://validator.w3.org/check?uri=zarth.us)
(13:10:27) [Valid] The website http://zarth.us is Valid. Warnings: 1 (http://validator.w3.org/check?uri=http://zarth.us)
(13:10:27) [Valid] The website www.example.org is Valid. Warnings: 1 (http://validator.w3.org/check?uri=www.example.org)
(13:10:52) <@Zarthus> .valid lol.com
(13:10:53) [Invalid] The website lol.com is Invalid. Errors: 2, Warnings: 1 (http://validator.w3.org/check?uri=lol.com)
(13:11:26) <@Zarthus> .valid notawebsite neither"a"website lol
(13:11:27) [Abort] The validation for "notawebsite" Aborted unexpectedly, is this a valid URI?
(13:11:29) [Abort] The validation for "neitherawebsite" Aborted unexpectedly, is this a valid URI?
(13:11:29) [Abort] The validation for "lol" Aborted unexpectedly, is this a valid URI?
```

[Visual Representation](http://i.imgur.com/pHkxB5O.png)