Probably of little interest anymore except academically thanks to Kovid et al's great work but I put the source code for web2book on github recently when I was cleaning up my hard drive. https://github.com/gramster/web2book