07-18-2017, 01:38 PM | #1216 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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 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. |
07-18-2017, 02:00 PM | #1217 |
Sigil Developer
Posts: 7,644
Karma: 5433388
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! |
07-18-2017, 02:07 PM | #1218 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
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.
|
07-18-2017, 02:19 PM | #1219 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
|
08-13-2017, 03:51 PM | #1220 |
Zealot
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!
|
03-06-2018, 12:19 PM | #1221 |
Junior Member
Posts: 1
Karma: 10
Join Date: Mar 2018
Device: Kindle
|
hello im trying to use the program in the comand line and it gives this following error message
(i was trying to use the gui and was getting a error message, then i tried to use directly from the cmd, like the readme tells and this message appeared.) File "kindleunpack.py", line 1016, in <module> sys.exit(main()) File "kindleunpack.py", line 992, in main infile, outdir = args ValueError: too many values to unpack (expected 2) |
03-06-2018, 12:21 PM | #1222 |
The Grand Mouse 高貴的老鼠
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
The command takes two arguments. The file to unpack and the directory to unpack it into. You seem to be giving it more than two arguments, but you haven't given the command you issued, so exactly what's wrong is a mystery.
|
03-06-2018, 03:11 PM | #1223 |
KCC Co-Author
Posts: 845
Karma: 765434
Join Date: Mar 2013
Location: Poland
Device: Kindle Oasis 2
|
There is some new header field (or other black magic) that decide if book with field 501 = EBOK should be put in Comics not Books category.
None of known comics related fields (122, 123, 127, 128) do that. And no known configuration of EPUB trigger this categorization - Syntax in accordance with Amazon Publishing Guidelines is not enough. Last edited by AcidWeb; 03-06-2018 at 03:16 PM. |
03-06-2018, 04:09 PM | #1224 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
03-07-2018, 12:16 AM | #1225 | |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Quote:
As a test I put my Oasis in airplane mode, bought a (free) comic, downloaded it and copied it to the Oasis via USB. It did not show as a comic. I then turned off airplane mode and synced the kindle. After that the sideloaded book showed as a comic. As another test I took a book that showed as a comic and made a copy of it with a different (unused) ASIN. The copy did not show as a comic even though the book contents were identical to the original book, other than the ASIN. |
|
03-07-2018, 02:55 AM | #1226 | |
KCC Co-Author
Posts: 845
Karma: 765434
Join Date: Mar 2013
Location: Poland
Device: Kindle Oasis 2
|
Quote:
Well played Amazon. Forcing remote query to check information that is available in file header. Last edited by AcidWeb; 03-07-2018 at 03:01 AM. |
|
03-07-2018, 03:20 AM | #1227 | |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Amazon has been gradually trying to make side-loading less and less pleasant on their platforms for a very long time. |
|
03-07-2018, 03:24 AM | #1228 |
KCC Co-Author
Posts: 845
Karma: 765434
Join Date: Mar 2013
Location: Poland
Device: Kindle Oasis 2
|
Yeah. It is infuriating.
|
09-29-2018, 11:52 AM | #1229 |
Grand Sorcerer
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
|
For my own use, I am considering adding a global variable named VERBOSITY (or similar) to KindleUnpack and putting some or most print statements in
Code:
if VERBOSITY>0: I think this would be generally useful and am curious what others think about this. Should I open an issue on github with a similar message to discuss this? |
09-29-2018, 05:15 PM | #1230 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
So long as none of the various entry point functions' parameter numbers/orders are altered (there are several existing plugins and wrapper programs that use KindleUnpack pieces via import), feel free to submit a pull request on github. But we can discuss it here, I think.
I think most of the people still using the standalone version of KindleUnpack are probably using it for debugging problematic Kindlebooks. So they tend to want as much output as possible for that purpose. For those using the various plugin-ized versions of KindleUnpack, the debug output doesn't really matter anyway. I'm not opposed to the idea. I just don't know how utilized it would be. I always want to see all the print statements when I use kindleunpack from the command line. Needing to see everything is frankly why I'd be using the standalone version of KU from the command-line in the first place. Last edited by DiapDealer; 09-29-2018 at 05:20 PM. |
|
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 | 2 | 06-22-2009 09:28 AM |