Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-24-2015, 04:56 PM   #931
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 theducks View Post
I would include any empty (non-text/Image) tag pairs in those locations
IMHO Margins should be used to supply top or bottom whitespace
The problem is that neither <p>&nbsp;</p> nor <p><br/></p> is "empty" - because they contain text - and that's generally what I see used for this purpose. It's another case of "easy for a human to recognize, but hard to automate removal." Factor in that there's usually a class attached to the P element in such cases (especially to force a nonzero height to hack around the fact that the latter example is often - correctly - discarded without being displayed), and this becomes a rabbit hole really fast.
Rev. Bob is offline   Reply With Quote
Old 04-24-2015, 06:07 PM   #932
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,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rev. Bob View Post
So, while the window is open, does anybody have anything to add?
Just remembered this one - another optional feature, that shouldn't break anything - win-win

Option to put 'added/replacement metadata jacket' at the back of the book.

At one time I hacked Modify to do it, as I recall it was fairly simple to do (that I succeeded in doing it, is testament to that). Sadly I lost the hack but by then I'd become au fait with Sigil so now I move it manually.

But I sometimes forget, so it would be nice to have the feature in the 'official' PI. I know of two other users who would appreciate it because they also lost my hack - yeah I know, bad config management practices

BR
BetterRed is offline   Reply With Quote
Old 04-24-2015, 06:27 PM   #933
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,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I have hacked in that way, as an additional option, so if you want it... (After reading a previous message from you, I should tell)
Terisa de morgan is offline   Reply With Quote
Old 04-24-2015, 06:30 PM   #934
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 BetterRed View Post
Just remembered this one - another optional feature, that shouldn't break anything - win-win

Option to put 'added/replacement metadata jacket' at the back of the book.
I know literally nothing about Calibre jackets, beyond having heard the term. If you (or someone else) can find the hack, I can look at splicing it in, but beyond that...
Rev. Bob is offline   Reply With Quote
Old 04-24-2015, 07:25 PM   #935
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,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rev. Bob View Post
I know literally nothing about Calibre jackets, beyond having heard the term. If you (or someone else) can find the hack, I can look at splicing it in, but beyond that...
@Rev. Bob - I know I don't have my hack, when I realised I'd lost it, I also realised I'd just reformatted the drive where it was and I didn't have a backup. At the time I forgot I'd even done the hack, so I blithely downloaded a fresh copy from here - I didn't do it as an option.

But looks like Terisa de morgan has something. I don't think its my hack, and I suspect Terisa is a better hacker than moi, hopefully she will share her code with you.

BR
BetterRed is offline   Reply With Quote
Old 04-25-2015, 01:01 AM   #936
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by DiapDealer View Post
What do you mean? Almost all renderers will perform a page break if page-break-(before|after: always) is assigned to the class. Or did you mean something else?
well - testing needed - but where I have left this calibre code in a book at the end of each chapter , by your logic I should be seeing a new screen generated by the code followed by another new screen generated by start of next chapter. i.e. a double page turn at the end of every chapter. ditto if such code is left in at start of each html.
I don't see that, so unless renderers are smart enough to suppress that redundancy....

UPDATA: actual explanation, based on my sample of 1 books where I have not manually removed such code:
calibre defines the class as this
.mbppagebreak {
display: block;
margin: 0
}

so i'ts not going to do anything when applied in an empty div, except maybe cause a spurious line feed in some renderers

Last edited by cybmole; 04-25-2015 at 01:12 AM.
cybmole is offline   Reply With Quote
Old 04-25-2015, 02:31 AM   #937
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 cybmole View Post
well - testing needed - but where I have left this calibre code in a book at the end of each chapter , by your logic I should be seeing a new screen generated by the code followed by another new screen generated by start of next chapter. i.e. a double page turn at the end of every chapter. ditto if such code is left in at start of each html.
I don't see that, so unless renderers are smart enough to suppress that redundancy....
Some are, some aren't. I was checking a book a few months back that generated extra pages in one of my readers but not the other. Same file, but one detected the extra skip and suppressed it while the other faithfully rendered the blank pages. (I'm thinking iBooks rendered and ADE suppressed, but I may have that backwards. Like I said, it's been a while.)

There's one feature I'd like to see, but there's too much involved for me to add it myself. iBooks requires that a certain XML file be present before it will honor certain font changes, and while I can manually add it easily enough, it'd be nice to autodetect the presence of embedded fonts and add it on the fly. Similarly, the ability to automagically run the "remove unused CSS rules and classes" during a cleanup would be useful.

But then, while I'm wishing, I might as well wish for a magical module that analyzes the CSS, rescales the font sizes so that the main text is "medium", and performs other such optimizations. I guess I'll have to keep doing it myself, though; it's delicate work that requires skull sweat to handle correctly. At least I've got the indie author I'm doing formatting/editing work for set up with a proper template that spits out decent code when saved as HTML. It still needs some manual tweaking, but not a lot.
Rev. Bob is offline   Reply With Quote
Old 04-25-2015, 02:52 AM   #938
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Rev. Bob View Post
. Similarly, the ability to automagically run the "remove unused CSS rules and classes" during a cleanup would be useful.

.
i use the menu option in sigl for that. it's only 1 click
for me it's better done there , as I run if after manually removing unwanted front and back adverts/previews/reviews/other crud
cybmole is offline   Reply With Quote
Old 04-25-2015, 03:49 AM   #939
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,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I do the same than @cybmole, so remove css is not an option which would be necessary for me here. @Rev. Bob, I send you a PM with the small changes I've made for the jacket at the end of the book.
Terisa de morgan is offline   Reply With Quote
Old 04-25-2015, 04:15 AM   #940
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Terisa de morgan View Post
I do the same than @cybmole, so remove css is not an option which would be necessary for me here. @Rev. Bob, I send you a PM with the small changes I've made for the jacket at the end of the book.
my full flow is ( in sigil) remove any pages I don't want
then remove unused CSS
then remove any explicit line heights ( as they prevent kobo sliders from working properly)
then remove any explicit font-family declarations ( ditto - they block device overrides )

I don't think those latter 2 are valid auto tweaks either.

for reading offline, I also remove all the <a> anchors ,unless book uses footnotes, as they confuse some readers if you accidentally tap them. the ones that refer back to a TOC are a nuisance, espeically if I've removed the not needed toc html page !
cybmole is offline   Reply With Quote
Old 04-25-2015, 05:08 AM   #941
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,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by cybmole View Post
my full flow is ( in sigil) remove any pages I don't want
then remove unused CSS
then remove any explicit line heights ( as they prevent kobo sliders from working properly)
then remove any explicit font-family declarations ( ditto - they block device overrides )

I don't think those latter 2 are valid auto tweaks either.

for reading offline, I also remove all the <a> anchors ,unless book uses footnotes, as they confuse some readers if you accidentally tap them. the ones that refer back to a TOC are a nuisance, espeically if I've removed the not needed toc html page !
I do almost the same but at calibre editor, not Sigil.
Terisa de morgan is offline   Reply With Quote
Old 04-25-2015, 05:10 AM   #942
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
Similarly, the ability to automagically run the "remove unused CSS rules and classes" during a cleanup would be useful.
Quote:
Originally Posted by cybmole View Post
i use the menu option in sigl for that.
Yes, it's the same in the calibre editor. My point is that one must manually go to the editor and click the button, rather than being able to bundle it as an option during a command-line Modify pass. One command is easier than two.
Rev. Bob is offline   Reply With Quote
Old 04-25-2015, 05:33 AM   #943
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by cybmole View Post
well - testing needed - but where I have left this calibre code in a book at the end of each chapter , by your logic I should be seeing a new screen generated by the code followed by another new screen generated by start of next chapter. i.e. a double page turn at the end of every chapter. ditto if such code is left in at start of each html.
I don't see that, so unless renderers are smart enough to suppress that redundancy..
So clearly this falls under the "or did you mean something else" portion of my post.
What you describe is definitely not by "my logic." I took you to mean that you didn't think reading systems rendered soft page breaks at all. Clearly you were talking about something else. Now I know.

And yes, I do believe most reading systems are smart enough to suppress that kind of redundancy.

Last edited by DiapDealer; 04-25-2015 at 05:37 AM.
DiapDealer is offline   Reply With Quote
Old 04-25-2015, 09:01 AM   #944
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
I admit that before I checked the class definition, I assumed it would contain some page break directive, as the class name implied, and so I then assumed that said directive was not being honoured. Mea culpa x2
cybmole is offline   Reply With Quote
Old 04-26-2015, 05:14 PM   #945
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: 74,015
Karma: 129333114
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 PandathePanda View Post
Tested a PD book from: https://www.mobileread.com/forums/sho...d.php?t=259583 and got the <div class="mbp_pagebreak" ...> Inserted into the epub after converting the mobi to epub. Yet unpacking the azw3 file, the resulting epub does not have this inserted.

So my guess it's formatting inserted during the conversion by calibre, and can safely be removed.
A Mobi file is one big HTML file. So pagebreaks are needed to start on a new screen. What you have here is a Mobipocket page break. It is not an artifact of a Calibre conversion. Calibre just happens to keep them no matter where they fall and on most cases because of the splitting, the pagebreaks will fall at the end of the XNML file.
JSWolf is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1184 04-17-2024 06:17 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[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 04:27 PM.


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