Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-13-2019, 10:11 AM   #1
Doidel
Junior Member
Doidel began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2019
Device: code
Easy way to create a single inline html file?

I'm new to calibre, and I've researched that I could create a single inline html file like this (I'm using the command line):
  • ebook-convert demo.docx demo.htmlz --htmlz-css-type=inline
  • Unzip htmlz
  • Trim all tags surrounding the actual content (html, body, div) manually
  • Copy/paste the html files together
This works. But is there an easier way? Have I missed a --single-html-output-file command or something alike?

Thanks for your help!
Doidel is offline   Reply With Quote
Old 03-13-2019, 11:35 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
there is no such output as ebooks typically contain resources such as fonts images that cannot be inlined in HTML (at least not efficiently)
kovidgoyal is offline   Reply With Quote
Advert
Old 03-13-2019, 02:15 PM   #3
Doidel
Junior Member
Doidel began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2019
Device: code
Thank you very much for your answer!
Yes, agreed. I wasn't talking about the images and the fonts, just about the html. The way I understood it, it can happen that the htmlz output contains multiple html documents. And also, each html document has the surrounding tags which I don't need (html, head, body, div). So I want to a) make sure I always get a single html file and b) get just the content, without the surrounding elements.
As a result, I would have 1 html file (which e.g. starts directly with <p> with inline styles), accompanied with images and fonts.
Doidel is offline   Reply With Quote
Old 03-14-2019, 02:30 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, I know what you are saying, I'm saying there is no such output format. HTMLZ always contains a single HTML file, but it will have the containing markup.
kovidgoyal is offline   Reply With Quote
Old 03-14-2019, 03:56 AM   #5
Doidel
Junior Member
Doidel began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2019
Device: code
Alright, understood, many thanks for your replies!
And also, many thanks for Calibre I'm using its conversion feature for my website, it's been great to work with it! And I appreciate the extensive documentation, it helps a lot!
Have a nice day!
Doidel is offline   Reply With Quote
Advert
Reply

Tags
html, htmlz


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindlegen With A Single HTML File Agent69 Kindle Formats 2 05-24-2015 05:33 AM
HTML Tree to single file, how ? Giuseppe Chillem Calibre 1 01-19-2013 11:56 AM
HTMLZ - Single HTML File Output user_none Calibre 22 05-19-2011 02:33 AM
CHM to single html file...suggestions? drogo Workshop 2 11-25-2008 12:35 PM
OEB to Single HTML File Converter? James Bryant Workshop 3 06-29-2008 08:28 AM


All times are GMT -4. The time now is 11:52 PM.


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