View Single Post
Old 01-14-2021, 10:00 PM   #13
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: 47,261
Karma: 171291590
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ripplinger View Post
I just had to look at it after that .

It is salvageable using regex that might be quicker than starting over. I first used regex to remove all span classes (with <span class="text_(.*?)"> and </span> ) and replaced with nothing. There were over 339k of them btw. That just took a few seconds.

Do the same to get rid of all the <p class="block_xxxx"> and replace it with a single sensible text option for now to whatever your preference is. Eliminate all the now unused styles, etc. I was wondering why the stylesheet.css wasn't loading. When it finally did, I looked and there were 238k lines in the file.

Then go through to do chapter titles, etc. in whatever style you want.

It's still work, but might be quicker than starting over.
You might not want to remove all the text_ spans since many of them involved italics and font sizes. Yeah, a 4.4MB stylesheet is a bit larger than usual--more precisely, I opened 20 random epubs in 7Zip and their combined stylesheets didn't add up to 2MB.

The other major change I would make is combining the individual page per file into multipage chapters.
DNSB is online now   Reply With Quote