05-02-2012, 09:24 AM | #376 |
Junior Member
Posts: 8
Karma: 10
Join Date: Apr 2012
Device: Kindle
|
@Julien Pham
You might want to try the mobi files with KF8 components with Kindle for Android on your Android phone/device. It works fine so far as I know. |
05-02-2012, 09:32 AM | #377 |
Connoisseur
Posts: 99
Karma: 10
Join Date: Nov 2011
Device: Kobo Touch
|
I have an iPhone, not an Android The mobi file with both KF7, KF8 and kindlegen source file works fine on my iPhone. Just the KF8 only file which has download issues. So perhaps the iPhone Kindle app does not have KF8 support.
Will try this evening on my Kindle Touch 3G to download the KF8 only file to check if it works. My parcel awaits me at home |
Advert | |
|
05-02-2012, 02:27 PM | #378 |
Connoisseur
Posts: 99
Karma: 10
Join Date: Nov 2011
Device: Kobo Touch
|
I was surprised because the KF8 file I have put on my Kindle Touch 3G cannot be read. I have called Amazon and after some checking they told me the new KF8 format is designed for bigger screens, and the Touch cannot read them.
So I'll have to take either the KF7 version or the combined KF7/KF8 one, if I manage to make the kindlegensrc thing to work Edit: in fact after some testing it seems the touch really does support KF8. It is good because some ePub format requires this, and without this I have a bad formatting. BUT... I cannot upload a AZW3 file to my personal documents on Amazon, it refuses the extension, it accepts just mobi or AZW... AND... Calibre cannot send AZW3 files to the Kindle, it does not recon it as a valid format... AND... if I rename the AZW3 file to AZW then the Kindle does not recon it anymore... SO... I have two choices : either put AZW3 the manual way, through drag'n drop in the Kindle... OR... keep the mobi file which includes both KF7 and KF8 format, but then without the kindlegen script... and so I have to find out an easy way, such as a wrapper for OS X, to do this I don't want to have to use command line each time Last edited by Julien Pham; 05-02-2012 at 03:44 PM. |
05-30-2012, 12:41 AM | #379 |
Grand Sorcerer
Posts: 6,589
Karma: 26963509
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
It is true that Kindle Touch does not support fixed-layout KF8 correctly. Giving them the benefit of the doubt, that's probably what they were referring to. Reflowable KF8 works fine of course.
|
05-30-2012, 02:43 AM | #380 |
The Grand Mouse 高貴的老鼠
Posts: 71,885
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
|
Advert | |
|
06-03-2012, 09:21 AM | #381 |
The Grand Mouse 高貴的老鼠
Posts: 71,885
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
I've found a problem with the current MobiUnpack. A Mobipocket link is usually given in the source as something like
<a filepos=0000005027 > I've come across some that also have an id attribute like this <a id="When" filepos=0004135413 > MobiUnpack is correctly converting the first into an href <a href="#filepos5027" > and inserting an anchor links <a id="filepos5027" /> Unfortunately, for the second form, although an anchor link is successfully inserted, the original mobipocket link isn't converted into an href. I'm looking into this now myself, but if anyone has any ideas for a fix, I'd be glad to hear them! |
06-03-2012, 09:44 AM | #382 |
Grand Sorcerer
Posts: 27,698
Karma: 196509000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm guessing it's some of my shoddy regex work at lines 70-73 of mobi_html.py.
I'm not entirely certain of Python's default lazy/greedy settings for it's regex engine, but it seems to me that something similar to (line 71): Code:
link_pattern = re.compile(r'''<a(.*?)filepos=['"]{0,1}0*(\d+)['"]{0,1}(.*?)>''', re.IGNORECASE) Code:
srctext = link_pattern.sub(r'''<a\1href="#filepos\2"\3>''', srctext) Spoiler:
Last edited by DiapDealer; 06-03-2012 at 09:50 AM. |
06-03-2012, 09:44 AM | #383 |
The Grand Mouse 高貴的老鼠
Posts: 71,885
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Ah - it seems to be the regular expression in mobi_html.py that's the problem. It didn't consider that there might be anything other than white space there.
That's a pretty simple fix, and shouldn't break anything. Just two lines need changing in mobi_html.py Code:
link_pattern = re.compile(r'''<a([^>]*?)filepos=['"]{0,1}0*(\d+)['"]{0,1}([^>]*?)>''', re.IGNORECASE) srctext = link_pattern.sub(r'''<a\1href="#filepos\2"\3>''', srctext) |
06-03-2012, 09:46 AM | #384 |
The Grand Mouse 高貴的老鼠
Posts: 71,885
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
It seems we agree, although I've been a little more cautious in my search pattern, making sure I don't search outside the <a ...> tag.
|
06-03-2012, 09:56 AM | #385 |
Grand Sorcerer
Posts: 27,698
Karma: 196509000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
06-04-2012, 05:44 AM | #386 |
The Grand Mouse 高貴的老鼠
Posts: 71,885
Karma: 307105450
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
I've updated the python script to v0.51, and I've also updated the AppleScript wrapper to run the latest version, always with splitting and raw output turned on.
The latest version and AppleScript wrapper can now be found in the 5th post in this thread, here. |
06-20-2012, 08:01 PM | #387 |
Resident Curmudgeon
Posts: 75,089
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Bug report!
I just used Mobi_Unpack 0.51 to unpack a Mobipocket file and the HTML file I got back is all one line. There needs to be line endings at the different lines. |
06-20-2012, 08:40 PM | #388 |
Sigil Developer
Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
|
The MobiUnpack tries to massage the original mobi6 mobi code code as little as possible (other than replacing or updating the links). If the original source did not use proper line endings then the html file produced by MobiUnpack will not have proper line endings. Remember line endings (carriage returns, line feeds or some combination) are ignored in html and so some html preprocessing programs will actually remove them to save space.
You can use any regular expressions to add line ends or you choice after every closing </div> or </p> or almost wherever you like. KevinH |
06-20-2012, 08:42 PM | #389 |
Resident Curmudgeon
Posts: 75,089
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I would prefer if Mobi_Unpack put in the line endings where they should be even if the original file was garbage.
Though after unpacking a Mobi file, I think it's probably easier to convert to ePub, clean it up, make the changes and convert back. |
06-20-2012, 08:45 PM | #390 |
Evangelist
Posts: 456
Karma: 1044878
Join Date: Apr 2009
Device: Kindle Paperwhite 4
|
|
|
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 |