logoalt Hacker News

maxlohtoday at 5:35 PM4 repliesview on HN

I find SingleFile [0] to be a much more robust version of this.

It strips out all the JavaScript too, but also packs everything into a single HTML file that is easy to transfer. Binary assets (like web fonts and images) are packed as base64 strings.

They also offer a CLI powered by Puppeteer. [1]

[0]: https://github.com/gildas-lormeau/singlefile

[1]: https://github.com/gildas-lormeau/single-file-cli


Replies

tamndtoday at 5:42 PM

It seems this repo only saves one web page?

What I'm implementing here is mirroring a whole website, with all its subpages, so you can browse it all offline. For example, all essays from paulgraham.com.

show 2 replies
HelloUsernametoday at 6:13 PM

What's the difference with, any webbrowser on a computer, File -> Save as ?

show 2 replies
tamndtoday at 5:43 PM

And thanks for the link. Let me implement this single HTML feature, it looks nice to have!

show 1 reply