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 05-02-2012, 09:24 AM   #376
xxy
Junior Member
xxy began at the beginning.
 
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.
xxy is offline   Reply With Quote
Old 05-02-2012, 09:32 AM   #377
Julien Pham
Connoisseur
Julien Pham began at the beginning.
 
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
Julien Pham is offline   Reply With Quote
 
Enthusiast
Old 05-02-2012, 02:27 PM   #378
Julien Pham
Connoisseur
Julien Pham began at the beginning.
 
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.
Julien Pham is offline   Reply With Quote
Old 05-30-2012, 12:41 AM   #379
tomsem
Wizard
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 2,407
Karma: 2519673
Join Date: Apr 2009
Location: USA
Device: iPod Touch, Xoom, Kindle PW, iPad3, Fire HD2
Quote:
Originally Posted by Julien Pham View Post
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.
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.
tomsem is offline   Reply With Quote
Old 05-30-2012, 02:43 AM   #380
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,313
Karma: 86264204
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by Julien Pham View Post
AND... Calibre cannot send AZW3 files to the Kindle, it does not recon it as a valid format...
I think that the very latest calibre now knows about and uses the .azw3 file name extension.
pdurrant is offline   Reply With Quote
Old 06-03-2012, 09:21 AM   #381
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,313
Karma: 86264204
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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!
pdurrant is offline   Reply With Quote
Old 06-03-2012, 09:44 AM   #382
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,910
Karma: 40300000
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)
and consequently (line 73):
Code:
srctext = link_pattern.sub(r'''<a\1href="#filepos\2"\3>''', srctext)
might do the trick (unless that id attribute itself needs additional massaging, that is).
Spoiler:
Or blow it up... my regex-fu is not mighty.

Last edited by DiapDealer; 06-03-2012 at 09:50 AM.
DiapDealer is offline   Reply With Quote
Old 06-03-2012, 09:44 AM   #383
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,313
Karma: 86264204
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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)
I'm just testing it now, and if I get time I'll upload a fixed version later today. Perhaps even wrapped in a new version of the AppleScript too!
pdurrant is offline   Reply With Quote
Old 06-03-2012, 09:46 AM   #384
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,313
Karma: 86264204
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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.
pdurrant is offline   Reply With Quote
Old 06-03-2012, 09:56 AM   #385
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,910
Karma: 40300000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by pdurrant View Post
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.
I defer most heartily. The more cautious the better.
DiapDealer is offline   Reply With Quote
Old 06-04-2012, 05:44 AM   #386
pdurrant
The Grand Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 31,313
Karma: 86264204
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
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.
pdurrant is offline   Reply With Quote
Old 06-20-2012, 08:01 PM   #387
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,622
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is offline   Reply With Quote
Old 06-20-2012, 08:40 PM   #388
KevinH
Guru
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: 836
Karma: 349410
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


Quote:
Originally Posted by JSWolf View Post
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.
KevinH is offline   Reply With Quote
Old 06-20-2012, 08:42 PM   #389
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,622
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is offline   Reply With Quote
Old 06-20-2012, 08:45 PM   #390
ATimson
Evangelist
ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.
 
ATimson's Avatar
 
Posts: 425
Karma: 1044878
Join Date: Apr 2009
Device: nook STR, iPod Touch 3G
Quote:
Originally Posted by JSWolf View Post
I would prefer if Mobi_Unpack put in the line endings where they should be even if the original file was garbage.
There is no place where line endings "should be" in HTML. The spec specifically doesn't require them.
ATimson 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 01:46 AM.


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