command line use

For technical support for all editions of CSE HTML Validator. Includes bug reports.

command line use

Postby roedygr » Wed Jan 20, 2010 7:28 am

Is there a way from the command line to load up a file, check it, and exit with a ret code that tells you how bad the file was?

Sometimes you want to load and validate. Others load validate and exit, or at least exit if all is Ok.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 242
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: command line use

Postby Albert Wiersch » Wed Jan 20, 2010 9:18 am

Yes, please see the "Exit Codes/Return Values" section here:
http://www.htmlvalidator.com/htmlval/v9 ... d_line.htm

Take a look at the -rx option. It can return the number of errors or errors+warnings.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: command line use

Postby roedygr » Thu Jan 28, 2010 9:19 am

roedygr wrote:Is there a way from the command line to load up a file, check it, and exit with a ret code that tells you how bad the file was?

Sometimes you want to load and validate. Others load validate and exit, or at least exit if all is Ok.


It would be nice if one of these simple forms worked too:

"F:\Program Files (x86)\HTMLValidator90\cmdlineprocessor.exe" E:\mindprod\livinglove\methods\*.html

"F:\Program Files (x86)\HTMLValidator90\cmdlineprocessor.exe" E:\mindprod\livinglove\methods\


Because you don't always have a script ready for every directory you may be working on.

Think of it as a shortcut for building a batch script with one directory in it.
User avatar
roedygr
Rank V - Professional
Rank V - Professional
 
Posts: 242
Joined: Fri Feb 17, 2006 6:22 am
Location: Victoria BC Canada

Re: command line use

Postby Albert Wiersch » Thu Jan 28, 2010 11:20 am

roedygr wrote:It would be nice if one of these simple forms worked too:

"F:\Program Files (x86)\HTMLValidator90\cmdlineprocessor.exe" E:\mindprod\livinglove\methods\*.html

"F:\Program Files (x86)\HTMLValidator90\cmdlineprocessor.exe" E:\mindprod\livinglove\methods\


Because you don't always have a script ready for every directory you may be working on.

Think of it as a shortcut for building a batch script with one directory in it.


Thanks. That sounds like a good suggestion so I've made a note about it and may look into for a future version.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron