Webcheck

Current version: 1.01. Download the source, or a Windows executable

webcheck automatically checks links on a web page for validity, and reports errors in a format that Gnu Emacs (and other IDEs) can use to bring up the source html files to be fixed.

webcheck can operate on a web page via the http protocol, or on a local file system, using a root URI with the file: scheme.

The command line for webcheck is:
webcheck {root-uri} {output-root} [options]
webcheck retrieves the root-uri, and scans it for html links. Some html syntax errors are detected during the scan, but not all. If the link uri has the same root as root-uri, it is recursively retrieved and scanned. If it has a different root, it is just checked for existence.

The options are:

--ignore_html_syntax
Don't report errors for minor html syntax errors, such as generated by gnathtml and other programs.
--log {log_root_name}
Log all URI accesses to a log file log_root_name.log
--debug
Output extra debug information.

See webcheck/build/x86_windows_gnat_debug/Makefile, targets stephe-file, stephe-web, adawings-web for examples of how to run webcheck from a Makefile.

webcheck was inspired by finder written by Tom Moran, but is a totally new implementation. It uses OpenToken to parse html, and SAL data structures.


Building from source

webcheck requires the SAL library. The required subset of OpenToken is included with the webcheck source, since it is slightly modified from Ted's distribution.

I use Auto_Text_IO to create some test utilities. These are included in the webcheck source, but make maintainer-clean will delete them, and if you change the spec they are built from, the makefile will try to run auto_text_io.

  1. Install Cygwin and SAL source; see SAL installation for instructions.
  2. Define environment variables SAL and MAKERULES.
    1. For example, if you unzipped SAL to c:/Stephe_Ada/, then in bash:
    2. export SAL="c:/Stephe_Ada/SAL"
    3. export MAKERULES="c:/Stephe_Ada/Makerules"
  3. Download webcheck-1.01.tar.gz
  4. Unzip webcheck-1.01.tar.gz to a directory of your choice.
  5. If you are on Windows, in directory webcheck/build/release_windows_x86_gnu, run make. This will compile and link webcheck, and run all the tests. The simple_hrefs.diff test will fail; it has absolute paths in the output.
  6. If you are not on Windows, copy webcheck/build/release_windows_x86_gnu to a similiarly-named directory for your operating system, edit Makefile appropriately, and run make. Please send me these changes; I'll include them in the next release of webcheck.

History

Version 1.01 8 Aug 2004
minor bug fixes, match SAL and Auto_Text_IO release
Version 1.00 16 Nov 2003
First release

my home page.

powered by Ada Valid HTML 4.0! Last modified: Fri Sep 28 03:22:01 Eastern Daylight Time 2007