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 04-15-2014, 05:26 AM   #646
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 641
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
Cheers for that, Rev. Bob.

One question for you regarding the modify changes, are you also going to modify the quality check PI to test for the kobo stuff / empty spans ?
Perkin is offline   Reply With Quote
Old 04-15-2014, 07:11 AM   #647
Rev. Bob
Fanatic
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.
 
Posts: 586
Karma: 3281856
Join Date: Feb 2013
Device: Kobo Glo, Kindle Touch
Quote:
Originally Posted by Perkin View Post
One question for you regarding the modify changes, are you also going to modify the quality check PI to test for the kobo stuff / empty spans ?
I wasn't planning on it...
Rev. Bob is online now   Reply With Quote
Old 04-23-2014, 03:20 PM   #648
Rev. Bob
Fanatic
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.
 
Posts: 586
Karma: 3281856
Join Date: Feb 2013
Device: Kobo Glo, Kindle Touch
Quote:
Originally Posted by Rev. Bob View Post
None of that code is close to what I've changed; I don't think it's even getting to the new routines. My first instinct is that the OPF file may not be formatted properly, or perhaps the first file in the spine has a similar issue.
I haven't heard anything back on this, and I can't reproduce it on this end.

Meanwhile, I have been reminded to add one more type of "garbage" element to the cleanup list, and it comes in this form:

<?dp n="3" folio="" ?>

(Where N can be any number.)

This seems to be an artifact of some creation software that I haven't encountered directly, but it doesn't appear to serve any purpose in a finished ebook - so out it comes! It's not even as useful as an attribute-less SPAN element, which could at least theoretically be targeted by CSS. Therefore, the strip-spans module now removes anything of this form:

<\?dp([^>]*?)\?>\n?

(Or, for those who don't speak regex, "any single tag delimited by <?dp at one end and ?> at the other, containing anything except the > character in between, along with an optional linefeed at the end." )

The attached versions of the plugin include that fix, and I've updated the help file to remove the "experimental" notes and document the self-closing and empty-removal features. If there are no objections to this version, the only thing I see that's left to do is choose between the one-routine and two-routine options. As before, the file with the longest name is the two-routine version.

Feedback is encouraged, but please let me know which version of the code (one or two routines) you're using.
Attached Files
File Type: zip Modify ePub - stripspans.zip (150.6 KB, 3 views)
File Type: zip Modify ePub - stripspans and stripkobo.zip (150.7 KB, 4 views)
Rev. Bob is online now   Reply With Quote
Old 04-23-2014, 03:37 PM   #649
Terisa de morgan
Wizard
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 2,058
Karma: 1790378
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Mini, iPhone, iPad, Kobo Aura, Galaxy Tab3 8
I'll give it a try (two routines), because I use the previous version quite a lot with no problem at all.
Terisa de morgan is offline   Reply With Quote
Old Yesterday, 01:15 PM   #650
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 641
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
Going to give the 2 routine version a try.

I personally think that's the one to finalise, as some user may want to keep the kobo stuff, but strip the empty spans.

With regard to the '<\?dp([^>]*?)\?>\n?' - should you include the \n? - as there may be instances where that \n could be between two words, which in the html would then render as a space, so removing it would be wrong. Unless you can guarantee that it's removable in which case never mind.
Perkin is offline   Reply With Quote
Old Yesterday, 06:57 PM   #651
Rev. Bob
Fanatic
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.
 
Posts: 586
Karma: 3281856
Join Date: Feb 2013
Device: Kobo Glo, Kindle Touch
Quote:
Originally Posted by Perkin View Post
With regard to the '<\?dp([^>]*?)\?>\n?' - should you include the \n? - as there may be instances where that \n could be between two words, which in the html would then render as a space, so removing it would be wrong. Unless you can guarantee that it's removable in which case never mind.
So far as I can tell, from the limited experience I've had with that pseudo-element, it appears on its own line and should be removed as such. Naturally, if anyone else can shed some more light on this, I'm certainly willing to learn more.
Rev. Bob is online now   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 216 03-18-2014 02:23 AM
[GUI Plugin] Quality Check kiwidude Plugins 724 03-15-2014 04:40 PM
[GUI Plugin] Manage Series kiwidude Plugins 110 09-20-2013 06:52 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 01:44 AM.


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