06-15-2018, 12:10 AM | #1 |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
conversion challenge for badly formatted kindle book
i recently borrowed a book via Kindle unlimited and wanted to engineer a temporary epub version to read with working chapters. ( which I would delete once read)
when I got into the converted from mobi code, the whole book appeared as two enormous paragraphs ( one per XHTML file) using <br... for the line breaks throughout. and also <tt ... spans for all the body text and an outer bracket of <code </code. not sure what the code tags did except make it harder to edit... a nightmare to fix with regex as the <br dont have matching closing tags so I forced the book through various format conversions instead, e.g. into and back from docx, AZW hoping that the breaks would get auto transformed into paragraphs - no joy is there a way to do that that I missed ? i.e. to automate changing all <br line breaks into separate paragraphs, using calibre conversions tools ? eventually I laboriously fixed it using mutiple manual regex passes, and then located & restyled the chapters arguably not worth it as the story was not that great anyway, but just wondering about the <br thing in case I encounter it again [ the book in question in case anyone want to view the sample code - is Gardener Summer by Nova - part of the american Apocalyse series - other books on that series are formatted sensibly ] https://www.amazon.co.uk/Gardener-Su...sap_bc?ie=UTF8 |
06-15-2018, 12:12 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can just replace <br> with <p> calibre will close up the paragraphs for you automatically, either during conversion or using the fix HTML tool in the editor.
|
Advert | |
|
06-15-2018, 12:21 AM | #3 | |
Wizard
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Quote:
I wanted to preserved the location of the line breaks, but replace then with a text indented <p class instead. I did not want the book to become a continuous single paragraph. That would have been even more unpleasant to read than the original .mobi which had the annoying tt font & no para indents |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
find badly formatted ebooks | alexxxm | Calibre | 3 | 05-29-2016 12:33 PM |
What's the best way to put [specific, linked, badly formatted] web article to Kindle? | avid01 | Amazon Kindle | 6 | 01-31-2016 11:06 AM |
Badly formatted eBooks | Katsunami | General Discussions | 27 | 02-03-2012 11:49 AM |
Touch A badly formatted book or bad Kobo Touch rendering? | jswinden | Kobo Reader | 16 | 07-07-2011 07:19 PM |
Classic Bought a Badly Formatted Book From B&N | lionel47 | Barnes & Noble NOOK | 11 | 05-22-2010 04:31 PM |