Quote:
Originally Posted by user_none
HTMLZ input is supported. As for that plugin no idea. Change the extension and see how it works.
|
It doesn't. It seems that .htmlz is not listed as an ebook extension (unlike .zip) on the file dialog so I had to change that to "All files" to get it to input an .htmlz file. And of course none of the metadata or cover were recognized upon import.
So I imported the book as a .zip (which works just fine, metadata is recognized, cover is recognized, etc) and then tried to convert it to a .htmlz which I was going to save and then compare to see how the .htmlz metadata.opf info was stored so that I could compare it to the .zip version.
Unfortunately, converting the .zip to .htmlz failed with the following error message:
calibre, version 0.7.54
ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Tank Driver: With the 11th Armored from the Battle of the Bulge to VE Day)
Convert book 1 of 1 (Tank Driver: With the 11th Armored from the Battle of the Bulge to VE Day)
Processing archive...
Resolved conversion options
calibre version: 0.7.54
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'breadth_first': False,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\\s+', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': '/var/folders/0J/0JxyqG5bFGuePNZPaZd3-E+++TI/-Tmp-/calibre_0.7.54_tmp_nE26fS/calibre_0.7.54_vEs25X.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_package': False,
'enable_heuristics': False,
'extra_css': None,
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'htmlz_class_style': u'external',
'htmlz_css_type': u'class',
'input_encoding': u'iso-8859-1',
'input_profile': <calibre.customize.profiles.InputProfile object at 0x1088b9150>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_levels': 5,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'no_chapters_in_toc': False,
'no_inline_navbars': False,
'output_profile': <calibre.customize.profiles.SonyReaderOutput object at 0x1088b99d0>,
'page_breaks_before': u"//*[name()='h1' or name()='h2']",
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': '/var/folders/0J/0JxyqG5bFGuePNZPaZd3-E+++TI/-Tmp-/calibre_0.7.54_tmp_nE26fS/calibre_0.7.54_Cz_47v.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'series': None,
'series_index': None,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: HTML Input running
on /var/folders/0J/0JxyqG5bFGuePNZPaZd3-E+++TI/-Tmp-/calibre_0.7.54_tmp_nE26fS/calibre_0.7.54_nQEnCB_plumber_archive/book.opf
Parsing all content...
Parsing book.html ...
Generating default TOC from spine...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 33 entries.
Flattening CSS and remapping font sizes...
style.css contains data in TXT format converting to HTML
Converting style.css ...
Parsing style.css ...
Forcing style.css into XHTML namespace
Stylesheet 'style.css' referenced by file 'book.html' is not CSS
Source base font size is 12.00000pt
Removing fake margins...
Parsing stylesheet.css ...
Found 270 items of level: div_1
Found 22 items of level: p_2
Found 718 items of level: p_1
Ignoring level p_2
div_1 left margin stats: Counter()
div_1 right margin stats: Counter()
p_1 left margin stats: Counter({u'0': 718})
p_1 right margin stats: Counter({u'0': 718})
Cleaning up manifest...
Trimming unused files from manifest...
Trimming 'style.css' from manifest
Python function terminated unexpectedly: must be convertible to a buffer, not lxml.etree._Element
Creating HTMLZ Output...
Converting OEB book to HTML...
Converting book.html to HTML...
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 147, in main
return run_entry_point()
File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 116, in run_entry_point
return getattr(pmod, func)()
File "site-packages/calibre/utils/ipc/worker.py", line 119, in main
File "site-packages/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
File "site-packages/calibre/ebooks/conversion/plumber.py", line 1035, in run
File "site-packages/calibre/ebooks/htmlz/output.py", line 76, in convert
TypeError: must be convertible to a buffer, not lxml.etree._Element
Interestingly, this same .zip converts just fine to an .epub (as far as I can tell)
It also appears to have trouble with the style.css sheet as it declares that the "style.css is not CSS".
Stylesheet 'style.css' referenced by file 'book.html' is not CSS
This same file unzipped, imports quite nicely into Sigil and it does not seem to have any problem with the xhtml or css.