09-28-2013, 06:28 AM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2013
Device: kindle
|
conversion_options not used
Hi,
sorry for my english. May be a silly problem, but in my recipe I have conversion_options = { 'dehyphenate': False, 'delete_blank_paragraphs': False, 'format_scene_breaks': False, 'margin_bottom': 1.0, 'margin_left': 1.0, 'margin_right': 1.0, 'margin_top': 1.0, 'mobi_file_type': 'old', 'unwrap_lines': False, } but after $ ebook-convert django.recipe .mobi --output-profile kindle --test -vv --debug-pipeline debug I have: Resolved conversion options calibre version: 1.5.0 {'asciiize': False, ...... 'dehyphenate': True, 'delete_blank_paragraphs': True, ...... 'margin_bottom': 5.0, 'margin_left': 5.0, 'margin_right': 5.0, ...... Seems that conversion_options is not used. FYI I'm trying to convert django documentation and my problem is that code indentation ( between <pre> tags) is lost, so is not so useful in python ;-) Regards, Mauro |
10-02-2013, 11:57 PM | #2 |
creator of calibre
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Why dont you just pass the conversion options to the command line directly?
|
10-03-2013, 11:55 AM | #3 | |
Member
Posts: 12
Karma: 10
Join Date: Sep 2013
Device: kindle
|
Quote:
Is not the purpose for conversion_option ? ;-) I like to know if I'm wrong or if it is a bug. By the way, i tried in cli, but --disable-unwrap-lines --disable-delete-blank-paragraphs --disable-remove-fake-margins do not work for my purposes, Still html in /debug/input/ is different from original. The spaces between <pre> tags are not preserved. |
|
10-03-2013, 12:07 PM | #4 |
creator of calibre
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No conversion_options is not intended to replace command line options. Generally speaking, overriding conversion options in a recipe is a bad idea, it should be avoided in all but extreme cases. And the conversion_options are being used in your case, the resolved conversion options in the debug output are resolved before conversion_options is applied. This is one of the reasons it is bad idea to use conversion_options.
If you find it difficult to edit command lines, create a script and edit that. None of the options you are using have anything to do with processing of <pre>. In fact, other than fake margins all the other options are heuristics options which are turned off anyway unless you pass --enable-heuristics. And the html will always be different since it is parsed, converted to XHTML cleaned up and re-written. IIRC old MOBI does not support <pre> though I may be misremembering, convert to azw3 or EPUB. |
10-03-2013, 01:17 PM | #5 |
Member
Posts: 12
Karma: 10
Join Date: Sep 2013
Device: kindle
|
thanks for response.
Sadly, my problem with <pre> is still here and is not related with mobi. ( debug/input is before conversion in mobi and I tryed conversion in epub too) I will try downloading html and then convert in epub/mobi. For django there is the option for downloading documentation in epub format, but there are other sites that I like convert in mobi for offline reading with my kindle. Regards, Mauro |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
BBC Recipe conversion_options explaination needed. | mattst | Recipes | 16 | 11-08-2011 12:14 PM |
"conversion_options" & Recipes. How does it work? | marmitako | Recipes | 1 | 04-23-2011 10:31 AM |