Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2011, 05:40 AM   #16
gertblij
Enthusiast
gertblij has learned how to buy an e-book online
 
Posts: 44
Karma: 85
Join Date: Oct 2010
Location: Cape Town, South Africa
Device: Kindle 3
Quote:
Originally Posted by user_none View Post
I want to share an upcoming feature in the 0.7.54 release. One complaint I hear often is in regard to the inability to edit ebooks. Many people seem to think EPUB is not a good format for editing. Sigil is often the solution given around these parts but some people insist on the need for a book to be contained in a single HTML file. Simply unzipping an EPUB doesn't accomplish this due to the need to split the files.

To remedy this situation I've added a new output format: HTMLZ.
Thanks for that, been waiting for this for a long time. However, how does it work?? (please note I am not a developer of HTML expert).

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
gertblij is offline   Reply With Quote
Old 04-15-2011, 07:06 AM   #17
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
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?
itimpi is offline   Reply With Quote
Advert
Old 04-15-2011, 07:52 AM   #18
gertblij
Enthusiast
gertblij has learned how to buy an e-book online
 
Posts: 44
Karma: 85
Join Date: Oct 2010
Location: Cape Town, South Africa
Device: Kindle 3
Quote:
Originally Posted by itimpi View Post
What error message did you get when you tried to convert?
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
gertblij is offline   Reply With Quote
Old 04-15-2011, 08:09 AM   #19
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
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.
user_none is offline   Reply With Quote
Old 04-15-2011, 09:25 AM   #20
gertblij
Enthusiast
gertblij has learned how to buy an e-book online
 
Posts: 44
Karma: 85
Join Date: Oct 2010
Location: Cape Town, South Africa
Device: Kindle 3
Quote:
Originally Posted by user_none View Post
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.
Thanks user_none. Absolutely fantastic. Works like a dream.
And thanks a ton for doing this work. It opens a whole new range of opportunities for me (and others of course )
gertblij is offline   Reply With Quote
Advert
Old 05-19-2011, 12:52 AM   #21
j.nmi.ross
Junior Member
j.nmi.ross began at the beginning.
 
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?
j.nmi.ross is offline   Reply With Quote
Old 05-19-2011, 01:24 AM   #22
V.W. Singer
Enthusiast
V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.V.W. Singer can program the VCR without an owner's manual.
 
V.W. Singer's Avatar
 
Posts: 32
Karma: 186576
Join Date: May 2011
Device: ppc
Editpad Lite is pretty good (and free). Just Google it for download.
V.W. Singer is offline   Reply With Quote
Old 05-19-2011, 02:33 AM   #23
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Notepad++ is open source and has syntax highlighting.
Manichean is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:44 PM.


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