Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-03-2015, 11:12 PM   #961
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
Quote:
Originally Posted by Ashfall View Post
I just started trying out "Strip Kobo DRM Remnants" when I found that it's modifying epubs that were never a kepub and have no Kobo artifacts at all. I ran a comparison and confirmed that the changes are not related to Kobo DRM.

These changes are also made with the de-indent and strip-spans options. Including it in Strip Kobo DRM as well is redundant and misleading I think. Would it be possible to remove this, so that Strip Kobo DRM does that and nothing else?
In a word: no.

The stripkobo routine normalizes the code to make detection of the Kobo remnants more reliable. I am, to put it mildly, disinclined to remove the normalization component so that I can then rewrite the remnant removal code to compensate for that removal. It's a whole lot of work for no benefit, and I have more than enough work on my plate as it is.
Rev. Bob is offline   Reply With Quote
Old 07-04-2015, 01:30 AM   #962
Ashfall
Junior Member
Ashfall began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2013
Device: Kobo Aura HD
Quote:
Originally Posted by Rev. Bob View Post
In a word: no.

The stripkobo routine normalizes the code to make detection of the Kobo remnants more reliable. I am, to put it mildly, disinclined to remove the normalization component so that I can then rewrite the remnant removal code to compensate for that removal. It's a whole lot of work for no benefit, and I have more than enough work on my plate as it is.
Thanks for the reply. I took a look at modify.py and see what you mean.
Ashfall is offline   Reply With Quote
Advert
Old 07-05-2015, 03:46 PM   #963
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,688
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
New release

Changes in this release:
Version 1.3.13
- 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)
kiwidude is offline   Reply With Quote
Old 07-05-2015, 08:58 PM   #964
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
It's in the works!
But before page number anchors are removed, check for their use. They can be used for link anchors and they can also be used to simulate the pBook's page numbering in the NCX and the page number anchors are used for that.
JSWolf is offline   Reply With Quote
Old 07-05-2015, 10:24 PM   #965
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,454
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
you can clean 'excess' as much as you want.

So much so, that the book no longer functions

You have been advised

(You would think we were back in the early PDA as reader days, squeaking every word possible into tiny RAM. Forget extras like formatting.)

You can save more storage by shrinking the cover to 300x450 (from that hi-res monster, than removing all the excess anchors
theducks is offline   Reply With Quote
Advert
Old 07-06-2015, 06:08 PM   #966
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
Quote:
Originally Posted by JSWolf View Post
But before page number anchors are removed, check for their use. They can be used for link anchors and they can also be used to simulate the pBook's page numbering in the NCX and the page number anchors are used for that.
This would be one reason it's "in the works" instead of already deployed.

Quote:
Originally Posted by theducks View Post
(You would think we were back in the early PDA as reader days, squeaking every word possible into tiny RAM. Forget extras like formatting.)

You can save more storage by shrinking the cover to 300x450 (from that hi-res monster, than removing all the excess anchors
Man, way to completely miss the point! Here's a tip: more formatting is not the same as more effective formatting. Crack open a Phoenix Pick ebook sometime and just look at the code. Even better, open the book in your average reader and see what you think of how it renders. To be blunt, the ones I've gotten from them have been absolutely hideous... but boy, did they have a lot of formatting code!

Anyway, Modify ePub is about cleaning out excess code, not mindlessly stripping out useful code.
Rev. Bob is offline   Reply With Quote
Old 07-06-2015, 06:50 PM   #967
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
@theducks,

This PI is not necessarily about saving every scrap of memory possible. It is primarily focused on simplifying the code, scraping out mindlessly loopy code that can have unpredictable ramifications, etc. -- i.e. a cleaner and more elegant ebook.

Removing a perfectly useful but possibly oversized cover may indeed be a desirable thing (depending on the person) but it is also completely missing the point of this PI, and discussion about it probably belongs elsewhere.
eschwartz is offline   Reply With Quote
Old 07-08-2015, 04:53 AM   #968
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
Quote:
Originally Posted by JSWolf View Post
But before page number anchors are removed, check for their use. They can be used for link anchors and they can also be used to simulate the pBook's page numbering in the NCX and the page number anchors are used for that.
How do they do that in the NCX?
chrisridd is offline   Reply With Quote
Old 07-08-2015, 11:55 AM   #969
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
PageList

(Page-map -- not in the NCX but uses same anchors.)

Last edited by eschwartz; 07-08-2015 at 11:58 AM.
eschwartz is offline   Reply With Quote
Old 07-08-2015, 01:05 PM   #970
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
So I'm looking at one of my Google Play books' use of GBS anchors for page mapping, and it's a mess.

First of all, there are far more GBS anchors in the text than are used by the page map, and no apparent pattern to distinguish them. Second, the page map claims that the book has 128 pages, whereas Amazon lists 304... so what is the map relating to? Clearly not the printed book, which is the point of using a page map. Third, of course, the "page map" file is an Adobe extension, not part of the EPUB specs. Fourth, at least some of the mapped anchors appear in nonsense places - such as in the middle of an attribution line on a Praise blurb, where no sane designer would put an actual page break. This supports my belief that the GBS anchors and accompanying page map file are algorithmically generated nonsense. They may be of some use in a Google reader app, but not beyond that.

I am strongly tempted to simply junk the Google Play page-map file altogether. That simplifies the GBS anchor problem tremendously (kill 'em all) while losing something that appears to be of no value. Tweaking the cleanup routine to detect a GBS-based page map and remove it is a little more involved than some of my other cleanup, but not insurmountably so.

Are there any contrary opinions, or some counterbalancing evidence that I should see?
Rev. Bob is offline   Reply With Quote
Old 07-08-2015, 02:31 PM   #971
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Is it possible that the 'excess' Google anchors are used to keep track of book progress in Google Play Books - a bit like the kobospans in the Kobo apps?
jackie_w is offline   Reply With Quote
Old 07-08-2015, 03:00 PM   #972
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
Quote:
Originally Posted by jackie_w View Post
Is it possible that the 'excess' Google anchors are used to keep track of book progress in Google Play Books - a bit like the kobospans in the Kobo apps?
That's my thinking:

Quote:
Originally Posted by Rev. Bob View Post
This supports my belief that the GBS anchors and accompanying page map file are algorithmically generated nonsense. They may be of some use in a Google reader app, but not beyond that.
Rev. Bob is offline   Reply With Quote
Old 07-08-2015, 04:53 PM   #973
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 973
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
(Thanks for the pageList/page-map links!)

I remove the whole non-standard page-map in Sigil as well - I'd forgotten about that. It causes no apparent problems when I read the book on my Kobo (ACCESS renderer) but maybe there's something subtle I've missed.

So I vote for the nuclear option as well.
chrisridd is offline   Reply With Quote
Old 07-08-2015, 07:38 PM   #974
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, let's see how this works. I've been tinkering with "unpretty" and the execution sequence where multiple modules are called, but the big experiment in this beta version is the Google Play stuff. Removing the GBS.xxxx.yy anchors is trivial, but taking the pagemap out is a little more involved. Google Play removal is built into the "stripkobo" routine, on the grounds that no book should have both Google Play and Kobo markers, so there's no point in separating those into different routines.

I would especially appreciate feedback on this version, especially considering the following notes:

- Please test this on copies of books, so you can recover if there's a problem!
- Books with pagemaps that do NOT come from Google play should retain those maps.
- In the strange case where a book has both a "real" pagemap file and a Google-generated one, only the Google-generated one should be affected. (If you have such a book, please let me know!)
- This affects pagemaps, not the EPUB-standard pagelist feature.
- Previously "cleaned" non-Google Play books should be unaffected, except possibly for some minor code formatting due to the "unpretty" changes. EPUB3 books should be affected, but in a positive way.

I think that covers everything, but again: proceed with caution!

(EDIT, 8/26: Found a bug with the GBS code, so removed the old beta version. New beta available here.)

Last edited by Rev. Bob; 08-26-2015 at 01:35 PM.
Rev. Bob is offline   Reply With Quote
Old 07-08-2015, 08:01 PM   #975
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rev. Bob View Post
So I'm looking at one of my Google Play books' use of GBS anchors for page mapping, and it's a mess.

First of all, there are far more GBS anchors in the text than are used by the page map, and no apparent pattern to distinguish them. Second, the page map claims that the book has 128 pages, whereas Amazon lists 304... so what is the map relating to? Clearly not the printed book, which is the point of using a page map. Third, of course, the "page map" file is an Adobe extension, not part of the EPUB specs. Fourth, at least some of the mapped anchors appear in nonsense places - such as in the middle of an attribution line on a Praise blurb, where no sane designer would put an actual page break. This supports my belief that the GBS anchors and accompanying page map file are algorithmically generated nonsense. They may be of some use in a Google reader app, but not beyond that.

I am strongly tempted to simply junk the Google Play page-map file altogether. That simplifies the GBS anchor problem tremendously (kill 'em all) while losing something that appears to be of no value. Tweaking the cleanup routine to detect a GBS-based page map and remove it is a little more involved than some of my other cleanup, but not insurmountably so.

Are there any contrary opinions, or some counterbalancing evidence that I should see?
I say dump them. I do it manually because as long as I have the ADE page numbers, I'm good to go. I don't need page numbers to match some printed edition or whatever someone feels they should be. So please, automate dumping GBS.
JSWolf is offline   Reply With Quote
Reply

Tags
modify epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1214 11-14-2024 12:05 PM
[GUI Plugin] Manage Series kiwidude Plugins 167 07-28-2024 04:07 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 09:39 AM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 06:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 04:05 AM.


MobileRead.com is a privately owned, operated and funded community.