Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2019, 01:27 AM   #1
alpha_owa
Junior Member
alpha_owa began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2019
Device: Calibre
Smile Need help on converting Epub to HTML

Is there a way to convert EPUB to HTML without having some of the classes? Or CSS on it? Or only have it with plain HTML tags?

Or is there any other tool you recommend?

Thanks in advance.
alpha_owa is offline   Reply With Quote
Old 03-15-2019, 06:02 PM   #2
skb
Addict
skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.skb ought to be getting tired of karma fortunes by now.
 
skb's Avatar
 
Posts: 254
Karma: 1571730
Join Date: Mar 2010
Device: Ipod G4, MacOS 10.12, Calibre, Kindle Paperwhite
I don't know if there's a "quick" way, but I would open in Sigil and create new HTML files from the entrails (using cut & paste). I'd then search & replace styles etc.

As I said, it's not a quick way.
skb is offline   Reply With Quote
Advert
Old 03-15-2019, 06:28 PM   #3
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: 22,803
Karma: 23700000
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
If the book uses a CSS, simply un-link the files. Even though the code contains class=, there is no styling

if inline styles: REGEX should help removing style="(.+?)"
theducks is offline   Reply With Quote
Old 03-15-2019, 08:40 PM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 10,480
Karma: 60960973
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
I've not tried this myself but a conversion to markdown format should produce a document with very basic formatting, which on turn should concert to a very simplified html document.

You might also see what a tool called PanDoc might do. https://pandoc.org/
PeterT is offline   Reply With Quote
Old 03-15-2019, 08:54 PM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,333
Karma: 2385865
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by alpha_owa View Post
Is there a way to convert EPUB to HTML without having some of the classes? Or CSS on it? Or only have it with plain HTML tags?

Or is there any other tool you recommend?

Thanks in advance.
I would convert to htmlz format. It does simplify a lot...
roger64 is offline   Reply With Quote
Advert
Old 03-15-2019, 10:00 PM   #6
retiredbiker
Connoisseur
retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.
 
retiredbiker's Avatar
 
Posts: 77
Karma: 29896
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Ubuntu, Jutoh,Kobo Forma
You could simply open it in the Editor, delete any files you don't want in the result, then:

->Arrange the header of the top file as you desire, including removing CSS links if you like.
->Select all the text files you want, right-click, and merge them.
->Use some regex to get rid of all the IDs, attributes, spans, divs, and what-have-you.

->Another regex search to turn all the various <p class="whatever"> to simply <p>...or maybe two or three searches if you want several in your result. Same with <hn...> lines.

(If you have a book based all on <div>s instead of <p>s, adjust accordingly.)

That should leave you with one file, as simplified as you desire. Just export it.

Given all the stuff in books, I doubt you'd ever automate this, but go through one and save your searches, and the next ones should literally take only minutes.

I basically do this when faced with some ancient, amateur scanned book that looks like a ransom note. Then I re-format and split the single file into chapters of whatever. But the basic clean-up only takes a couple of minutes with saved searches.

Last edited by retiredbiker; 03-15-2019 at 10:05 PM.
retiredbiker is offline   Reply With Quote
Reply

Tags
calibre, epubtohtml

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting from HTML to EPUB, no toc rickhan Conversion 2 09-30-2017 12:26 AM
Best Settings for Converting Epub to HTML sjps Conversion 1 01-16-2015 04:34 PM
Number of HTML converting to EPUB HoushaSen Conversion 11 08-16-2011 07:49 AM
Converting a problematic HTML to epub redryder Conversion 1 05-30-2011 09:54 PM
How much shall I pay you for converting HTML to ePUB? vadimzn ePub 8 04-07-2011 01:46 AM


All times are GMT -4. The time now is 10:27 PM.


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