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-09-2015, 08:00 PM   #976
eschwartz
Irrational Optimist
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: 13,098
Karma: 37040852
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by JSWolf View Post
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.
But what you need is immaterial. If there are accurate and useful page numbers, they should be left in -- it is beyond the purview of this plugin to strip features-that-some-people-don't-need-and-JSWolf-disapproves-of.


Assuming GBS anchors are automated trash, otherwise known as "artifacts", then they can be safely gotten rid of and it is appropriate to do so.
And everyone else knows this already. Please don't muddy the waters.
eschwartz is offline   Reply With Quote
Old 07-10-2015, 03:26 AM   #977
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,977
Karma: 12768811
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by eschwartz View Post
Assuming GBS anchors are automated trash, otherwise known as "artifacts", then they can be safely gotten rid of and it is appropriate to do so.
And everyone else knows this already. Please don't muddy the waters.
Whether the anchors are trash or valuable, it is always nice to have the option to get rid of them.
DoctorOhh is offline   Reply With Quote
Old 07-11-2015, 07:51 AM   #978
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,139
Karma: 5545964
Join Date: Feb 2013
Device: Kobo Glo, Kobo H2O, Kindle Touch
Quote:
Originally Posted by DoctorOhh View Post
Whether the anchors are trash or valuable, it is always nice to have the option to get rid of them.
Aye, there's the rub: "option." Without getting too far into the weeds, here's the situation:

1. All GBS.*.* anchors look alike.
2. Only some of those anchors are used in pagemapping. The rest appear to be garbage except (possibly) in a Google ebook reader app.
3. The GBS-related pagemap appears to be garbage, with the same caveat.
4. My GBS pagemap data comes from a very small sample, from which I am reluctant to generalize.

Thus, it is difficult to separate the pagemapped GBS anchors from the rest, and that may not even be desirable - so, at present, the posted beta routine does not give the option to preserve any GBS anchors. (Well, aside from the "don't use the routine at all" option.)

That is why I'd like to get more feedback on that point before sanctifying this version as a proper release. I'm fine with removing Google app-specific bloat, but not actually useful code.
Rev. Bob is offline   Reply With Quote
Old 07-11-2015, 11:04 AM   #979
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: 40,734
Karma: 22931175
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
I'm away for two weeks, but when I get back, I'll download all of my Google ePub and test whatever the latest beta is.
JSWolf is online now   Reply With Quote
Old 07-11-2015, 05:01 PM   #980
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,139
Karma: 5545964
Join Date: Feb 2013
Device: Kobo Glo, Kobo H2O, Kindle Touch
I'm in no particular hurry; I have several projects on my plate right now. I'm particularly interested in these cases:

- Books with non-GBS pagemaps.
- GBS pagemaps that conform to physical page counts in some way.
- Books with multiple pagemaps, GBS or otherwise, if that's even possible.
- Any case where the GBS anchors or pagemap is actually useful, such that removing them is a Bad Idea.
- Any kind of false positive, where something is affected that should not be.
- Weird "unpretty" results, especially in EPUB3 books (since they have new tags).
Rev. Bob is offline   Reply With Quote
Old 07-11-2015, 05:09 PM   #981
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: 40,734
Karma: 22931175
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by Rev. Bob View Post
I'm in no particular hurry; I have several projects on my plate right now. I'm particularly interested in these cases:

- Weird "unpretty" results, especially in EPUB3 books (since they have new tags).
I've run Modify ePub on some ePub 3 that don't really use much in the way of ePub 3 features with no issues. I've not run Modify ePub on a full out ePub 3 as those aren't easy to come by and if they were, I'd not buy/download as I've no need for such.
JSWolf is online now   Reply With Quote
Old 07-11-2015, 05:32 PM   #982
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,139
Karma: 5545964
Join Date: Feb 2013
Device: Kobo Glo, Kobo H2O, Kindle Touch
Quote:
Originally Posted by JSWolf View Post
I've run Modify ePub on some ePub 3 that don't really use much in the way of ePub 3 features with no issues. I've not run Modify ePub on a full out ePub 3 as those aren't easy to come by and if they were, I'd not buy/download as I've no need for such.
I'm mainly concerned with how it works with the semantic EPUB 3 elements - SECTION and the like. Those are kind of "EPUB 2.5" books to me; a little more functionality, but nothing that breaks in an EPUB 2 application.

I wish I could think of a way to automatically detect and discard pointlessly-nested DIV elements. Several Baen books show this bug, in which the first chapter's contents are enclosed in one DIV, the next is wrapped in two DIVs, and by the end of the book, you've got thirty or more extraneous DIVs nested around the same kind of content. Removing them does no harm, and may improve performance in some situations.
Rev. Bob is offline   Reply With Quote
Old 07-11-2015, 07:54 PM   #983
jackie_w
Wizard
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: 3,181
Karma: 4561340
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O/GloHD
Quote:
Originally Posted by Rev. Bob View Post
I wish I could think of a way to automatically detect and discard pointlessly-nested DIV elements...
I don't have a way of automatically removing these useless DIVs but just in case it sparks a few ideas I've been getting rid of mine using the calibre Editor like this:
  1. Look through the css sheet and manually delete 'style-less' (IMO) styles e.g. .xyz {display: block} or .xyz {page-break-before:always}
  2. Run the Editor's 'Remove Unused css Rules & Classes' option to convert the useless DIV-with-class's to empty DIVs.
  3. Run DiapDealer's Editing Toolbag plugin to remove the empty DIVs.
Steps 2 & 3 should be easy enough to automate as they're already Python code but step 1 would be a bit more contentious to determine if/when a style should be considered 'useless'.
jackie_w is online now   Reply With Quote
Old 07-11-2015, 09:56 PM   #984
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,139
Karma: 5545964
Join Date: Feb 2013
Device: Kobo Glo, Kobo H2O, Kindle Touch
Oh, I can get rid of them easily in the editor - two regex operations take care of things nicely - but that's the thing. I have to manually identify the problem and check for breakage afterward. Details, details...

See, in this particular class of cases, the nesting spans the entire BODY element, and the DIVs have no attached classes. It's literally a matter of stripping out opening DIV tags that come immediately after the opening BODY tag, and doing likewise for the closing ones. Simple and painless, but not universally applicable.

Last edited by Rev. Bob; 07-11-2015 at 09:59 PM.
Rev. Bob is offline   Reply With Quote
Old 07-12-2015, 06:21 AM   #985
chrisridd
Addict
chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.chrisridd actually enjoys Vogon poetry.
 
chrisridd's Avatar
 
Posts: 322
Karma: 56114
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura
I'm testing the plugin in a clean library with copies of the original Google Play books with stripped DRM. I am going through them systematically to see what the plugin is doing.

I found 2 books with a pageList and a GBS pagemap, both using different anchors (id="page-.*" and id="GBS.*") and in both cases the new plugin correctly removed the GBS pagemap and anchors, but left the pageList intact.

So far so good :-)

However I'm not sure about what multiple pagemaps look like, so don't know how to check these.
chrisridd is offline   Reply With Quote
Old 07-12-2015, 05:25 PM   #986
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,139
Karma: 5545964
Join Date: Feb 2013
Device: Kobo Glo, Kobo H2O, Kindle Touch
Quote:
Originally Posted by chrisridd View Post
So far so good :-)

However I'm not sure about what multiple pagemaps look like, so don't know how to check these.
Encouraging news!

With multiple pagemaps, my main concern is what happens when a book that already has a pagemap gets picked up by Google Play. Does the old one get junked in favor of the new, or is it still there in some form? If it's junked, that's a bad thing, but it's on Google; nothing I can do about it. If it's still there, though, it ought to be restored if possible...
Rev. Bob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Open With kiwidude Plugins 269 06-28-2015 08:53 AM
[GUI Plugin] Quality Check kiwidude Plugins 816 06-14-2015 12:56 PM
[GUI Plugin] Manage Series kiwidude Plugins 117 02-14-2015 06:42 PM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 05:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:29 PM.


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