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 Yesterday, 11:18 PM   #1
yrings
Junior Member
yrings began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2025
Device: kindle scribe
Calibre - convert html to epub

I'm trying to convert this project gutenberg html to epub (they have their own, but I didn't like some formatting stuff - I'll probably just use theirs b/c I can't figure this out).
I assumed that nothing would be easier than converting html to epub - epub is already basically html. But - when I import the html (gui) and view / convert - I see HTML. It doesn't parse the HTML. I tried setting the html to zip encoding setting, didn't change anything.
I tried converting using the command line - it seemed to be parsing, but crashed because it couldn't split up the html file into small parts, and I couldn't figure out how to tell it "use the h2 tags!"

I first tried with an older version (I think 6.something) before downloading the latest (is it 8.3?)

So -

1 - how can I convert html to epub using the GUI?
2 - how can I tell the cli to split the epub parts based on h2 tags?
Spoiler:


~/calibre-bin/calibre/ebook-convert ./sholom_aleichim\ jewish\ children.html sholom.epub --chapter-mark pagebreak --level1-toc "h2"

Conversion options changed from defaults:
level1_toc: 'h2'
1% Converting input to HTML...
InputFormatPlugin: HTML Input running
on /home/username/Downloads/sholom_aleichim jewish children.html
Language not specified
Creator not specified
Building file list...
Normalizing filename cases
Rewriting HTML links
34% Running transforms on e-book...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Stylesheet 'resource://content-accessible/viewsource.css' referenced by file 'sholom_aleichim%20jewish%20children.html' not in manifest
Source base font size is 12.00000pt
Removing fake margins...
Cleaning up manifest...
Trimming unused files from manifest...
Creating EPUB Output...
67% Running EPUB Output plugin
Splitting markup on page breaks and flow limits, if any...
Looking for large trees in sholom_aleichim%20jewish%20children.html...
Found large tree #0
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 47, in <module>
File "site.py", line 43, in main
File "calibre/ebooks/conversion/cli.py", line 429, in main
File "calibre/ebooks/conversion/plumber.py", line 1267, in run
File "calibre/ebooks/conversion/plugins/epub_output.py", line 225, in convert
File "calibre/ebooks/oeb/transforms/split.py", line 69, in __call__
File "calibre/ebooks/oeb/transforms/split.py", line 78, in split_item
File "calibre/ebooks/oeb/transforms/split.py", line 227, in __init__
File "calibre/ebooks/oeb/transforms/split.py", line 359, in split_to_size
File "calibre/ebooks/oeb/transforms/split.py", line 352, in split_to_size
calibre.ebooks.oeb.transforms.split.SplitError: Could not find reasonable point at which to split: sholom_aleichim%20jewish%20children.html Sub-tree size: 716 KB

Last edited by theducks; Yesterday at 11:59 PM. Reason: SPOILER LOG files
yrings is offline   Reply With Quote
Old Today, 12:13 AM   #2
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: 44,446
Karma: 167726581
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I imported the html file and it imported as a .zip which is normal for HTML import. I then converted to ePub3 and no errors though the output ePub code looks pretty ugly and the cover file needed a manual download and attach. The ePub 3 downloaded looked a lot better so I did a quick mark/split* in Sigil and have attached the result. Ghod alone knows why they have image and no image versions since the only image seems to be the cover image.

*
Search <h2
Replace <hr class="sigil_split_marker" /> <h2
Attached Files
File Type: epub pg27001-images-3.epub (212.5 KB, 3 views)
DNSB is offline   Reply With Quote
Old Today, 07:19 AM   #3
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,625
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Better to use the Gutenberg epub and convert with rules (automatic).
Quoth is offline   Reply With Quote
Old Today, 09:15 AM   #4
yrings
Junior Member
yrings began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2025
Device: kindle scribe
Thank you all for your help and advice.
I'm more curious why html convert wasn't working for me, but I don't have a practical need anymore, so I'm going to mark this as fixed.
yrings is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert these html files to ePub? Valkrider Conversion 5 06-07-2015 07:48 AM
Calibre convert Chinese PDF to EPUB well, but not TXT and HTML jimmyzou ePub 15 12-27-2013 04:02 PM
Convert epub to HTML MShroff ePub 6 06-19-2011 05:52 PM
html 2 epub will not convert Amalthia Calibre 2 06-04-2010 12:39 PM
Convert html to epub colly Calibre 9 03-10-2010 10:30 AM


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


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