04-15-2011, 05:40 AM | #16 | |
Enthusiast
Posts: 44
Karma: 85
Join Date: Oct 2010
Location: Cape Town, South Africa
Device: Kindle 3
|
Quote:
What I did is that I unzipped the HTMLZ file (using 7-zip). Edited the index.html file and dragged it back into 7-zip. I then "Added" the HTMLZ file back to Calibre and tried to convert it, but it just wouldn't work. What did I do wrong? TIA Gert |
|
04-15-2011, 07:06 AM | #17 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
What error message did you get when you tried to convert?
|
04-15-2011, 07:52 AM | #18 |
Enthusiast
Posts: 44
Karma: 85
Join Date: Oct 2010
Location: Cape Town, South Africa
Device: Kindle 3
|
This is what I did:
1 - Extracted all files from HTMLZ using 7-zip to new folder 2 - edited index.html using Word 2010, made one change and saved as HTML Filtered 3 - Dragged index.html back to 7-zip and closed 7-zip 4 - Used Calibre "Convert Books" to convert from HTMLZ to MOBI. This is the resulting log: -------------------------------------------------------- calibre, version 0.7.54 ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (D-Day: The Battle for Normandy) Convert book 1 of 1 (D-Day: The Battle for Normandy) Resolved conversion options calibre version: 0.7.54 {'asciiize': True, 'author_sort': None, 'authors': None, 'base_font_size': 16.0, 'book_producer': None, 'change_justification': u'original', 'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\\s+', 'i')) or @class = 'chapter']", 'chapter_mark': u'pagebreak', 'comments': None, 'cover': 'c:\\users\\gert\\appdata\\local\\temp\\calibre_0. 7.54_tmp_hclxo4\\calibre_0.7.54_mskhmz.jpeg', 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_compress': False, 'enable_heuristics': False, 'extra_css': None, 'fix_indents': True, 'font_size_mapping': u'12.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0', 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x058A1F90>, '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_toc_links': 50, 'minimum_line_height': 120.0, 'mobi_ignore_margins': False, 'no_chapters_in_toc': True, 'no_inline_navbars': True, 'no_inline_toc': True, 'output_profile': <calibre.customize.profiles.KindleOutput object at 0x058A82D0>, 'page_breaks_before': u'/', 'personal_doc': u'[PDOC]', 'prefer_author_sort': False, 'prefer_metadata_cover': False, 'pretty_print': False, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'c:\\users\\gert\\appdata\\local\\temp\\calibre_0. 7.54_tmp_hclxo4\\calibre_0.7.54_vkqjrg.opf', 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': True, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': u'', 'rescale_images': False, 'series': None, 'series_index': None, 'smarten_punctuation': True, '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, 'toc_title': u'TOC', 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} InputFormatPlugin: HTLZ Input running on C:\Users\Gert\Documents\My Kindle\Calibre\Antony Beevor\D-Day_ The Battle for Normandy (726)\D-Day_ The Battle for Normandy - Antony Beevor.htmlz Python function terminated unexpectedly 'utf8' codec can't decode byte 0xff in position 0: invalid start byte (Error Code: 1) Traceback (most recent call last): File "site.py", line 103, in main File "site.py", line 85, in run_entry_point 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 915, in run File "site-packages\calibre\customize\conversion.py", line 204, in __call__ File "site-packages\calibre\ebooks\htmlz\input.py", line 51, in convert UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte |
04-15-2011, 08:09 AM | #19 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Fixed. I'm not sure I got the fix in time for it to be included in the 0.7.55 release.
The issue is I forgot to handle the input encoding. It assumes the document is encoded in utf-8. Until the fix is released, when you save your HTML file save it using utf-8. |
04-15-2011, 09:25 AM | #20 | |
Enthusiast
Posts: 44
Karma: 85
Join Date: Oct 2010
Location: Cape Town, South Africa
Device: Kindle 3
|
Quote:
And thanks a ton for doing this work. It opens a whole new range of opportunities for me (and others of course ) |
|
05-19-2011, 12:52 AM | #21 |
Junior Member
Posts: 1
Karma: 10
Join Date: May 2011
Device: kindle
|
Hello, user_none -
I'm so grateful you've taken the time to find a way to convert non-DRMed Kindle files into html so that we can edit some of the content. I'm on Mac OS X 10.5.8, and I have a question. Once I unzip the htmlz file, is there a preferred editor I should use? I read above about someone editing in Microsoft Word, but I find that MS Word tends to screw up any HTML code. Is there something else you can suggest? |
05-19-2011, 01:24 AM | #22 |
Enthusiast
Posts: 32
Karma: 186576
Join Date: May 2011
Device: ppc
|
Editpad Lite is pretty good (and free). Just Google it for download.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Several xhtml/html to a single epub file help. | clowe1028 | ePub | 3 | 03-21-2010 03:47 AM |
Mobigen Mass Batch conversion of HTML-Single-File ebooks to .mobi ebooks | cklammer | Kindle Formats | 9 | 11-20-2009 03:00 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 |
converting lit html output into one big file for BD | Dave Berk | Sony Reader | 15 | 03-29-2007 10:02 PM |