Re:SingleFileZ, a web extension for saving pages as HTML/ZIP...
by gildas on Sunday November 03, 2019 @06:13PM
(#21437433)
Actually, what is supposed to be interesting and innovative in SingleFileZ is the fact that it produces self-extracting valid zip files in the form of HTML files. Thus, they can be read natively by any modern browser that supports JavaScript.
Re:SingleFileZ, a web extension for saving pages as HTML/ZIP...
by burtonator on Sunday November 03, 2019 @06:30PM
(#21437537)
Ah. Interesting. That's a good innovation. How do you determine the domain/URL? I guess it's just the URL of the source?
What would you do if your HTML extraction script had a bug in the pre-compiled form? I guess you're just stuck?
I guess that's not the end of the world.
The EPUB form in a future version of Polar would at least require an EPUB reader which makes it a bit heavier.
Re:SingleFileZ, a web extension for saving pages as HTML/ZIP...
by gildas on Sunday November 03, 2019 @06:40PM
(#21437582)
SingleFileZ creates its own paths to reference all the resources of the page in the zip. This prevents any invalid path issues. The URL of the resource is stored as a comment for each entry in the zip though (I'm unsure I'm really answering to your question).
If there is a bug in the extraction script, there are some chances you can still unzip the file.
https://getpolarized.io
It can take full HTML files and internalize the CSS + HTML and compiles them into a .zip file.
The major difference is that its an Electron app and not a web extension though we're about 80% of the way done porting all of it to a web extension.
In retrospect, I would have done this as an EPUB.
Our users have asked for other features like taking multiple pages and building them as one 'book' and this feature is supported in EPUB.
Also, it would mean Polar would support EPUB natively anyway which is another big feature we need as we only support PDFs right now.
I lot of people here mention MHTML and WebArchive formats.
I think my main criticism of these is that EPUB has more universal 'reader' support and EPUB 3.0 is basically just HTML in an enclosure anyway.