Papyrix can render HTML ebooks, evidently due to the expectations of ePub.
Incidentally I'm tempted to port & extend this for my merephone project (calling it Hermes internally) so you can scan QR codes!
To open an HTML ebook it closes any existing such file, creates a new HTML object or propagates failures & invokes its load method, clears metadata & sets a property indicating we've got an HTML ebook, copies a couple other properties over from the HTML object, & sets initial page counts.
1/?
Papyrix's HTMLProvider class also includes methods to close its HTML object & clear its metadata, & to estimate pagecounts assuming 2KiB of text per page.
That HTML object is implemented in a support library whose initializer assembles the filepath to a cachedir & extracts the file's basename for its title. It has methods to remove cache dir if it exists & to create it, & to locate or generate the cover image or thumbnail thereof.
2/3 for today!