Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 07-18-2017, 01:38 PM   #1216
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,524
Karma: 772404
Join Date: Nov 2009
Device: many
Yes, the bug is in mobi_html.py where we explicitly look for url( style pieces in the css but do not handle that case:

Code:
url_pattern = re.compile(br'''(url\(.*?\))''', re.IGNORECASE)

url_img_index_pattern = re.compile(br'''[('"]kindle:embed:([0-9|A-V]+)\?mime=image/[^\)]*["')]''', re.IGNORECASE)

font_index_pattern = re.compile(br'''[('"]kindle:embed:([0-9|A-V]+)["')]''', re.IGNORECASE)

url_css_index_pattern = re.compile(br'''kindle:flow:([0-9|A-V]+)\?mime=text/css[^\)]*''', re.IGNORECASE)
I will try to use your example see how to best to handle the missing case of a kindle:flow but with a mime=image/svg+xml.

I think we can easily handle it as a special case by adding a:

url_svg_image_pattern = re.compile(br'''kindle:flow:([0-9|A-V]+)\?mime=image/svg+xml[^\)]*''', re.IGNORECASE)

and then handling it just like we handle inlined css flow urls.

Thanks,

KevinH

Last edited by KevinH; 07-18-2017 at 01:45 PM.
KevinH is offline   Reply With Quote
Advert
Old 07-18-2017, 02:00 PM   #1217
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,524
Karma: 772404
Join Date: Nov 2009
Device: many
Should be fixed with this commit:

https://github.com/kevinhendricks/Ki...f6bdbf29157b61

Thank you for the bug report and wonderfully simple testcase!
KevinH is offline   Reply With Quote
Old 07-18-2017, 02:07 PM   #1218
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 1,579
Karma: 12220393
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Quote:
Originally Posted by KevinH View Post
When you say round-tripped to Mobi are you referring to just an azw3 or to just an older .mobi (mobi 6) format or to the the joint mobi format (with both azw3 and mobi6 versions) or something else?
I used kindlegen v2.9 to create a dual mobi/kf8 file then I used kindleunpack to decode it. The style css file created in the mobi8/OEBPS/Styles directory shows the problem.
jhowell is offline   Reply With Quote
Old 07-18-2017, 02:19 PM   #1219
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 1,579
Karma: 12220393
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Quote:
Originally Posted by KevinH View Post
Should be fixed with this commit...
I tried it and it works for me. Thanks!
jhowell is offline   Reply With Quote
Old 08-13-2017, 03:51 PM   #1220
timofonic
Zealot
timofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic somethingtimofonic has a certain pleonastic something
 
Posts: 123
Karma: 18554
Join Date: Jan 2008
Location: Spain
Device: Onyx Boox M96+
Oh. It's great to see KindleUnpack is still alive. Thanks a lot!
timofonic is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i rotate text and insert images in Mobi and EPUB? JanGLi Kindle Formats 5 02-02-2013 04:16 PM
PDF to Mobi with text and images pocketsprocket Kindle Formats 7 05-21-2012 07:06 AM
Mobi files - images DWC Introduce Yourself 5 07-06-2011 01:43 AM
pdf to mobi... creating images rather than text Dumhed Calibre 5 11-06-2010 12:08 PM
Transfer of images on text files anirudh215 PDF 2 06-22-2009 09:28 AM


All times are GMT -4. The time now is 04:53 AM.


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