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: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
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
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 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 offline   Reply With Quote
Advert
Old 04-23-2014, 03:20 PM   #648
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 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, 249 views)
File Type: zip Modify ePub - stripspans and stripkobo.zip (150.7 KB, 240 views)
Rev. Bob is offline   Reply With Quote
Old 04-23-2014, 03:37 PM   #649
Terisa de morgan
Grand Sorcerer
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: 6,211
Karma: 11766195
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
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 04-24-2014, 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: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
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
Advert
Old 04-24-2014, 06:57 PM   #651
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 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 offline   Reply With Quote
Old 04-25-2014, 05:09 AM   #652
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: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Quote:
Originally Posted by Rev. Bob View Post
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.
Fair enough. Safe to include the newline then.

Never seen that element before, so can't illuminate you, I would have thought though that it would cause validity problems.
Perkin is offline   Reply With Quote
Old 04-25-2014, 05:30 AM   #653
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 Perkin View Post
Never seen that element before, so can't illuminate you, I would have thought though that it would cause validity problems.
XML uses the <?foo?> syntax for processing instructions, but I don't know of any - besides the top-of-file XML declaration itself - that are legal in EPUB content.
Rev. Bob is offline   Reply With Quote
Old 05-06-2014, 07:58 PM   #654
Nikapol
Junior Member
Nikapol began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2014
Device: kindle 5, nook simple touch
Hi. I have tried to found the same plugin for Mobi format, but looks like it doesn't exist. Can you add support of mobi format to this plugin?
Nikapol is offline   Reply With Quote
Old 05-06-2014, 08:53 PM   #655
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
No, the internal structure of MOBI does not allow for editing.

calibre has a builtin tool called Polish Book, which has fewer extended options than this, but does support AZW3 (mobi8).
eschwartz is offline   Reply With Quote
Old 05-12-2014, 07:51 AM   #656
brserek
Junior Member
brserek began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2011
Device: oyo
Hi, i've just realised, that plugin isn't updating Publisher field. Is it right? Or is it some settings i got wrong? I have ticked "Update metadata", but Publisher remains unchanged.
brserek is offline   Reply With Quote
Old 05-12-2014, 08:05 AM   #657
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by brserek View Post
Hi, i've just realised, that plugin isn't updating Publisher field. Is it right? Or is it some settings i got wrong? I have ticked "Update metadata", but Publisher remains unchanged.
@brserek - Why do you think isn't updating the Publisher

Works for me - my test is Show Metadata in calibre book viewer ctrl/i

Can't think of any setting that would cause it not to work

BR
BetterRed is offline   Reply With Quote
Old 05-12-2014, 02:18 PM   #658
brserek
Junior Member
brserek began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2011
Device: oyo
Well, It looks like I put it a bit wrong. Changing publisher from aaa to bbb works, but, I usually just remove publisher information. It's usually inconsistent and in my opinion misleading. So, that is what I do: I erase this field from metadata, and then update epub with plugin. Publisher remains the same.
brserek is offline   Reply With Quote
Old 05-12-2014, 05:31 PM   #659
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by brserek View Post
Well, It looks like I put it a bit wrong. Changing publisher from aaa to bbb works, but, I usually just remove publisher information. It's usually inconsistent and in my opinion misleading. So, that is what I do: I erase this field from metadata, and then update epub with plugin. Publisher remains the same.
@brserek - You're right, if I clear a publisher Modify doesn't update, nor does Polish (as in make shiny) Book. Looks like a defect in the calibre core that's used by both Polish & Modify Books, you should report a fault here ==>> https://bugs.launchpad.net/calibre

BR
BetterRed is offline   Reply With Quote
Old 05-12-2014, 10:51 PM   #660
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Same with tags -- I had a plugboard to clear them since I only use them for library functions like tracking error/edit status, original source, etc.

Didn't work until I recently switched to filtering and allowing "anthology" and other such new tags through.

I don't think calibre updates fields to empty, since that could mean wiping data accidentally -- although some people control their db metadata well enough that it would be intentional.
eschwartz 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 1171 03-23-2024 05:18 AM
[GUI Plugin] Open With kiwidude Plugins 402 03-16-2024 11:44 PM
[GUI Plugin] Manage Series kiwidude Plugins 166 02-13-2024 11:31 AM
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 02:53 PM.


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