selfhash is a program that takes a web page (HTML file) as input and produces a self-hashing web page as its output.
The output web page will be identical to the input page except that it will include a script that will calculate the SHA-1 hash of the output web page; that is, the output will calculate its own hash.
You must indicate where selfhash should insert the script by adding a line
<!--selfhash-->
to the input.
See here for more details.
REQUIREMENTS: tested on Linux using node.js.
Thanks to Chris Veness for the JavaScript implementation of SHA-1.