Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-21-2022, 01:05 PM   #16
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: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
How do you know if 17px or 16px is correct? That's part of the problem.
JSWolf is offline   Reply With Quote
Old 07-21-2022, 01:16 PM   #17
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JSWolf View Post
How do you know if 17px or 16px is correct? That's part of the problem.
Tex2002ans is offline   Reply With Quote
Old 07-29-2022, 08:58 AM   #18
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
>Merging multiple CSS classes that are "the same" or "pretty close" to each other.

I'll be glad to see that, thanks!
Notjohn is offline   Reply With Quote
Old 07-29-2022, 09:07 AM   #19
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: 73,897
Karma: 128597114
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 Notjohn View Post
>Merging multiple CSS classes that are "the same" or "pretty close" to each other.

I'll be glad to see that, thanks!
Merging classes that are the same is OK. Merging classes that are "pretty close" is not OK. Just because the classes seem pretty close, does not mean they should be merged. They could be different on purpose and you may not want them merged. So the pretty close feature needs to not be written.
JSWolf is offline   Reply With Quote
Old 07-29-2022, 03:58 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,307
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Merging classes that are the same is OK. Merging classes that are "pretty close" is not OK. Just because the classes seem pretty close, does not mean they should be merged. They could be different on purpose and you may not want them merged. So the pretty close feature needs to not be written.
Jon, I had one ebook from Tor where there were 57 body paragraph styles which varied in margin and font size specified after converting the inline styles to a stylesheet. Given these were all body text, the ebook looked downright fugly. A utility that would have converted all of these to a single paragraph style would have come in very handy.

After all, nothing is forcing you to use the pretty close feature if you don't want to.
DNSB is offline   Reply With Quote
Old 07-29-2022, 05:01 PM   #21
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: 73,897
Karma: 128597114
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 DNSB View Post
Jon, I had one ebook from Tor where there were 57 body paragraph styles which varied in margin and font size specified after converting the inline styles to a stylesheet. Given these were all body text, the ebook looked downright fugly. A utility that would have converted all of these to a single paragraph style would have come in very handy.

After all, nothing is forcing you to use the pretty close feature if you don't want to.
As long as pretty close can be turned off, then it would be OK. But for now, there's no word of it being an option when cleaning up the CSS.
JSWolf is offline   Reply With Quote
Old 07-29-2022, 06:31 PM   #22
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,089
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
It's interesting reading these comments and wonder why it is even an issue? Don't you just replace all the garbage?

I get an ebook and the first thing I do is completely reformat it. Wipe the css and replace with my own, rename the html files, replace all the existing html tags and attributes to minimise the tags and match the new css code.

Sometimes it is quite easy with some well placed Regex S&R, other books are a disaster and require a lot of work.

When you get code that looks like that in the image, why would you keep it? (I had to stretch the window across my dual screens, hence the taskbar in the middle).

What on earth is the point of that??
Attached Thumbnails
Click image for larger version

Name:	excess.jpg
Views:	82
Size:	87.1 KB
ID:	195405  

Last edited by Karellen; 07-29-2022 at 06:35 PM. Reason: Add image
Karellen is online now   Reply With Quote
Old 07-30-2022, 12:19 PM   #23
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: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Karellen View Post
It's interesting reading these comments and wonder why it is even an issue? Don't you just replace all the garbage?

I get an ebook and the first thing I do is completely reformat it. Wipe the css and replace with my own, rename the html files, replace all the existing html tags and attributes to minimise the tags and match the new css code.

Sometimes it is quite easy with some well placed Regex S&R, other books are a disaster and require a lot of work.

When you get code that looks like that in the image, why would you keep it? (I had to stretch the window across my dual screens, hence the taskbar in the middle).

What on earth is the point of that??
I have a baen-dediv saved search that I LOOP run 'all' until I get a not found.
(the number of loops is the deepest nest, usually the last chapter. This mess seems to be done by Cocoa)

Note: I hand adjust the class and ID values as they vary.Sigil type REGEX
Code:
(?sm)<div class="calibre4" id="calibre_pb_\d+">\s+<p (.+)</p>\s+(<div class="calibre6" id="calibre_pb_\d+"></div>\s+)*</div>
theducks is online now   Reply With Quote
Old 07-31-2022, 05:14 AM   #24
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: 73,897
Karma: 128597114
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 Karellen View Post
It's interesting reading these comments and wonder why it is even an issue? Don't you just replace all the garbage?

I get an ebook and the first thing I do is completely reformat it. Wipe the css and replace with my own, rename the html files, replace all the existing html tags and attributes to minimise the tags and match the new css code.

Sometimes it is quite easy with some well placed Regex S&R, other books are a disaster and require a lot of work.

When you get code that looks like that in the image, why would you keep it? (I had to stretch the window across my dual screens, hence the taskbar in the middle).

What on earth is the point of that??
I would find replacing the CSS with my own to be more work then fixing what's there. Yes, I do add in some CSS, but I would not replace it all. That's going to be a lot of work as I won't be seeing what the original CSS is try to do.
JSWolf is offline   Reply With Quote
Old 07-31-2022, 12:15 PM   #25
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
Must be a mindset thing, because I too basically don’t care about preserving what the original CSS was trying to do once I’m in there anyway. I’d be a lot more likely to fix the markup and then add my own minimal styling.

Last edited by phillipgessert; 07-31-2022 at 12:20 PM.
phillipgessert is offline   Reply With Quote
Old 07-31-2022, 12:58 PM   #26
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: 73,897
Karma: 128597114
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 phillipgessert View Post
Must be a mindset thing, because I too basically don’t care about preserving what the original CSS was trying to do once I’m in there anyway. I’d be a lot more likely to fix the markup and then add my own minimal styling.
In most cases, the CSS is trying to do the right thing, but not doing it well. So I'll fix it. It would take me a lot longer to fix eBooks if I deleted the original CSS. Trying to figure out what goes where and what does what would not work well.

I do have some CSS I add to all eBooks and whatever I don't use will get deleted when I remove unused CSS after the eBook is fixed. I also remove unused CSS after deleted any of the HTML files I don't want.
JSWolf is offline   Reply With Quote
Old 07-31-2022, 09:07 PM   #27
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,089
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
@theducks
Thanks for the regex. I had already removed the div's with a simpler regex, but I'll add yours to my toolbox.

Great to see I'm not the only one @phillipgessert

@JSWolf I find the opposite. It will take a lot longer trying to figure out all those bloody "calibre1", "calibre_1", Calibre2" etc etc. I've seen some books with 40+ calibre tags. (I still don't get it!!! I am sure the conversion process can be tweaked.)
The books I read are fiction. There are no technical manuals that require lots of formatting. Fiction is quite easy. A heading, opening parargraph/scene break, then the body paragraphs. Occassionally some quotes, a footnote. Then front and back matter.
Karellen is online now   Reply With Quote
Old 08-01-2022, 05:24 AM   #28
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: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I use Disp's Editing Toolbag editor plugin. I find it easier then the regex.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with style settings and screen dpi to match my kindle reader style Gaqs KOReader 3 05-13-2022 06:02 AM
Forma Should I get the origami-style case or the simple one-fold-style for my Forma? droopy Kobo Reader 8 08-25-2019 05:15 PM
Inline STYLE attribute not converted to class sherman Conversion 4 05-05-2016 08:11 AM
Aura H2O MicroSDHC card class 4 or class 10? chipro12 Kobo Reader 5 07-04-2015 02:24 AM
Feature request: new CSS class from computed style kat7 Sigil 23 01-02-2015 01:30 PM


All times are GMT -4. The time now is 03:24 PM.


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