I'm looking for a link checker for HTML documents. Not for a website: for an HTML document, or a small collection of HTML documents. My constraints:
- It must work on a collection of HTML files passed on the command line, without involving a web server.
- It must be able to work without network access. Ideally it should have a command line option to indicate whether to check whether HTTP links are live.
- It must check internal anchors and must support
idattributes on any element. My primary use case is checking HTML files generated from Markdown by Pandoc or from reStructuredText by Sphinx.
- It must work in a build-and-test automated pipeline, so no GUI or browser-based tools.
- It must report the broken links in a usable way so I know what to fix if the validation fails.
- It must work on Linux, macOS and Windows (Cygwin or WSL is ok).
apt-geton Ubuntu or
- It must be free for commercial use and preferably have a well-known open source license (so that there's no concern about installing it in a corporate environment — but I don't absolutely need to be able to redistribute it).