View Single Post
Old 10-05-2019, 12:47 PM   #1268
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Okay, then. Here's where things stand right this moment.

I've taken the four versions - 1.3.13, 1.3.14 (most official), my beta, and JimmXinu's patch for the file-list-removal bug - and sorted out the differences. At least, I think I got all of the dependencies right. The result at present is a complete but so far untested beta of 1.4.0 which should have all three new features working in harmony: the bugfix, the pagemap removal routine, and the under-the-hood enhancements I was working on. The top of the changelog now looks like this:

Spoiler:
Version 1.4.0 - 05 Oct 2019
Minor adjustments to the "unpretty" option, including consideration of EPUB3 elements (section/nav) and removal of EMPTY "display: none" elements.
Resequenced modules so that deep parsing would not undo "unpretty" function's work.
Stripping Kobo artifacts now also removes two Google Play artifacts: anchors of the <a id="GBS.0001.01"/> type, as well as the Play-specific pagemaps that use them. These "pages" bear no resemblance to the printed book's pagination, thus the map does not appear to correspond to anything useful. Note that this option is handled BEFORE the generic "remove page-map.xml" function for optimal results.

Version 1.3.14 - 29 Nov 2017
Add option to remove page-map.xml files

Version 1.3.13 - 05 Jul 2015
Added option to disable the confirmation prompt each time to update the epub. Use at your own risk - if you make simultaneous other changes to the book record they may get lost.
Fix for Cancel on the progress dialog (submitted by Raśl)

It is possible that since the Google Play pagemap removal overlaps in functionality with the dedicated pagemap removal feature, something unusual could happen if both switches are active at once. I don't think so, since the Kobo/GP switch is processed first and should simply result in the dedicated removal routine not finding anything, but it's worth checking.

Also of note, speaking of pagemaps: The two routines operate differently. The one I wrote looks for any pagemap file (determined by MIME type) regardless of name, but only removes it if it fits the qualifiers I defined, since I generally like pagemaps. The other looks for one specific filename, although it's set up to work from a list of them. I should probably consider rewriting the list-based option to use the type-based logic, but I cannot brain right now.

So, in sum...

The pieces have been put together, but the resulting plugin needs some testing before I feel comfortable calling it an official release. I've attached the beta here so adventurous souls can take a whack at it, but please do not treat it as a true release yet, as I may have overlooked some errors during the merge process. I am particularly interested in hearing from people who have Google Play ebooks and can test how the two pagemap functions interact on them.

EDIT: Removed outdated build, see message 1296.

Last edited by Rev. Bob; 10-11-2019 at 11:12 AM.
Rev. Bob is offline   Reply With Quote