Import filenames/URLs into Batch Wizard

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
jim.mcintyre
Rank 0 - Newcomer
Posts: 1
Joined: Wed Aug 28, 2013 1:50 pm

Import filenames/URLs into Batch Wizard

Post by jim.mcintyre »

I need to validate about 200 pages, and I have a list of their URLs as a text file. Is it possible to create a batch from this list without having to manually create the batch items and paste in the URLs?
User avatar
MikeGale
Rank VI - Professional
Posts: 726
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Re: Import filenames/URLs into Batch Wizard

Post by MikeGale »

Hi Jim,

I'm a user who does what you're talking about fairly often.

I'm travelling at the moment so I won't dig out specific code, just describe the general procedure I use.
  • Create a batch file that does what you want for the 200 files. This only contains one or two url's to check.
  • Identify each replaceable piece for the url in the batch file.
  • Make list of the url's to check. (I do one per line no adornment.) Take backup!
  • Create regular expression to make batch lines from list. I keep a copy in a file for next time.
  • Apply regex to list. Inspect carefully. If not right do again.
  • Add top and tail parts of batch file, and name it appropriately.
  • Fire up batch wizard, load list, check out the entries, adjust if necessary...
  • GO
Expressed like that it seems long, it's not. Probably quicker to do than to describe. (I tend to use a variety of editors to perform the replace (depends what other work I'm in the middle of, so no specifics given here). The regex's are so simple they're easily portable.)

Good luck.
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Import filenames/URLs into Batch Wizard

Post by Albert Wiersch »

Thanks Mike!

Also, this might call for use of the "first old format" target list:
https://www.htmlvalidator.com/current/d ... ormats.htm

If you have a list of links, one per line, then simply add "URL : " (without the quotes but with the space on each side of the colon) to the beginning of each link/link and now you have a target list!
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply