Re: Validator no longer includes counts
"Michael[tm] Smith" <[email protected]> Mon, 27 Jul 2015 09:18:04 +0900
| Newsgroups | gmane.org.w3c.validator |
|---|---|
| Message-ID | <[email protected]> |
--RYJh/3oyKhIjGcML Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable "Cutchins, Stephen" <[email protected]>, 2015-07-24 14:= 03 +0000: > Archived-At: <http://www.w3.org/mid/DM2PR10MB030133DDBE2C1D909C424E88F681= [email protected]> >=20 > Hi, >=20 > We have been using Validator with an automated test script for a Federal > project. Roughly a week ago or so, the counts were removed from > Validator which is causing our automated test scripts to fail since this > is what we were checking against. >=20 > Is there a way to add the counts back? We would very much appreciate it! You can use the JSON output from the W3C HTML Checker and programatically count the number of message types you=E2=80=99re interested in; for example: https://validator.w3.org/nu/?doc=3Dhttps://accenturefederal.com&out=3Djson If you=E2=80=99re interested only in the error count, your test scripts can programatically count just the =E2=80=9Ctype: error=E2=80=9D items in that = JSON output. If you=E2=80=99re interested in warnings as well, your test scripts can also c= ount the =E2=80=9Ctype: info=E2=80=9D items that have a =E2=80=9Csubtype: warning=E2= =80=9D property. Depending on what kind of test scripts you=E2=80=99re using, there are other machine-parsable output formats you might want to try: https://validator.w3.org/nu/?doc=3Dhttps://accenturefederal.com&out=3Dxml https://validator.w3.org/nu/?doc=3Dhttps://accenturefederal.com&out=3Dgnu The out=3Dgnu format puts each message on a single line, so your test script could get an error count from that just by piping a few commands together: curl -s "https://validator.w3.org/nu/?doc=3Dhttps://accenturefederal.com&= out=3Dgnu" | grep ": error:" | wc -l Or to get a count of the warnings: curl -s "https://validator.w3.org/nu/?doc=3Dhttps://accenturefederal.com&= out=3Dgnu" | grep ": info warning:" | wc -l --=20 Michael[tm] Smith https://people.w3.org/mike --RYJh/3oyKhIjGcML Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJVtXi8AAoJEIfRdHe8OkuVrEAP/3OxyTvhm3tMHtFgqSco0fxj +/F7V7HT9IRIrLzqRCPgl0QsBP8OHocCbP0LUeBmejiujUhwZ42igWka5Pu/wzV3 vOzmBdEfGvsCK7d55GdueBwsAbdJHOtrmiRAAUr3ygL4x44wrmLu7WXOteBItwB7 L5Kj+Xl7mPWUhOB5CAJcU0T1IKyHNlZrBQHZTot7aPn5R5zC5jM0fJbXKrF17jGB ALddKtbbz3QRL8MNDiRx0mTCGw1v/HTabrWMTt0hT5klMojh0W+NImrdj08Yywvv hAlPU1aWKKX3SNSKdSdziBeACL4Kc+hrtLydPqDLhFfXUzzlpGL8pV3zp5sf79ZQ KXZDebpIH6s2ImQo/lzGcZAtTrw5tcLKhgxHKbylxPidlNvjxwFPA/ptK0E3mFDI /Scuxk+/PbSK3Ekt6gKy5IBUpjpF2gT9VvnU1HsXkqJ+i5LUZGHfK6/eNV23Uafl 9EZzEGGxnBFVhUUYyomRX+guNJIpkVw2G8R0CLtPHWWxq3cI2i7amBqq6YsPHPUF fLLNdYucyjAkqNjeXqNuqdVerJLU4ytVJ3MWU9qiLS0gFRLhkIuPdeORGCHZQiE/ yUANCnqxtmwaU3pUczHtjyaFmIZDpIL2cC2ZBiOHv0XIFuvZpoUT7OFB7LNVaSwB fGXh+532fByT+W2EX/LN =wqDw -----END PGP SIGNATURE----- --RYJh/3oyKhIjGcML--