html5validator icon indicating copy to clipboard operation
html5validator copied to clipboard

Programmatic interface

Open bemoody opened this issue 4 years ago • 1 comments

It would be really nice to be able to check documents and obtain the error/warning messages programmatically.

Currently, the function 'Validator.validate' simply dumps the output to the logger, and returns an integer indicating whether any errors were detected.

At a very basic level, it would be nice to simply have a function that invokes vnu.jar and returns its output as a string or a list of strings.

A nicer interface would be to invoke vnu.jar in "json" mode and parse the output into a Python dictionary.

Would you be open to adding such an API?

bemoody avatar Nov 12 '19 22:11 bemoody

Yes, that would be great!

On Tue, Nov 12, 2019 at 11:28 PM bemoody [email protected] wrote:

It would be really nice to be able to check documents and obtain the error/warning messages programmatically.

Currently, the function 'Validator.validate' simply dumps the output to the logger, and returns an integer indicating whether any errors were detected.

At a very basic level, it would be nice to simply have a function that invokes vnu.jar and returns its output as a string or a list of strings.

A nicer interface would be to invoke vnu.jar in "json" mode and parse the output into a Python dictionary.

Would you be open to adding such an API?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/svenkreiss/html5validator/issues/60?email_source=notifications&email_token=AAVFQJUHZUC7J6WVHDPNHJDQTMUXLA5CNFSM4JMJ6QJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HY2UXXQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVFQJXMJYRZ7N43CRA7S5LQTMUXLANCNFSM4JMJ6QJQ .

svenkreiss avatar Nov 13 '19 10:11 svenkreiss