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-17-2013, 01:01 PM   #556
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,813
Karma: 4461973
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
That said, there's no JFIF, EXIF or 8BIM anywhere in that file, so Kovid's tweaked imghdr doesn't catch it either. To keep false-positives at bay, I tweaked my extra check a bit:

Code:
                # imghdr only checks for JFIF or Exif JPEG files. Apparently, there are some with only the magic JPEG bytes out there...
                # ImageMagick handle those, so, do it too.
                if imgtype is None and data[0:2] == b'\xFF\xD8':
                    # Get last non-null bytes
                    last = len(data)
                    while (data[last-1:last] == b'\x00'):
                        last-=1
                    # Be extra safe, check the trailing bytes, too.
                    if data[last-2:last] == b'\xFF\xD9':
                        imgtype = "jpeg"
NiLuJe is offline   Reply With Quote
Old 07-17-2013, 10:47 PM   #557
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,817
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm, well the file utility will identify a file as jpeg if only the first two bytes are correct. I have changed my patched imghdr to do the same, provided no other tests match.
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 07-18-2013, 01:49 PM   #558
nleblanc88
Junior Member
nleblanc88 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2012
Device: None
Hi guys,

I'm having a problem with a generated toc.ncx file. In the original source toc.ncx file, it contained a <navList> (http://www.idpf.org/epub/20/spec/OPF...Section2.4.1.2). Usince KindleUnpack and inspecting the newly created toc.ncx file, my navList is now stripped out and the content's are merged into the <navMap> section. The XML is then malformed right around the section where the original <navList> items are merged into the <navMap>. I took a look through the source code for KindleUnpack and saw no mention of a navList anywhere (I'm no Python wizard though).

Any chance you guys could look at adding support for this? It would be greatly appreciated!

Thanks,
~Nicholas
nleblanc88 is offline   Reply With Quote
Old 07-20-2013, 04:51 PM   #559
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: 843
Karma: 349410
Join Date: Nov 2009
Device: many
Hi,

It all depends on how Kindlegen handles that feature when it builds the KF8. Exactly how and where do these extra navlists show up under Kindle Previewer?

I would be willing to look into any broken XML but I would need to have a sample epub to work with. If you can post a link to one of those I will see what I can do.

KevinH


Quote:
Originally Posted by nleblanc88 View Post
Hi guys,

I'm having a problem with a generated toc.ncx file. In the original source toc.ncx file, it contained a <navList> (http://www.idpf.org/epub/20/spec/OPF...Section2.4.1.2). Usince KindleUnpack and inspecting the newly created toc.ncx file, my navList is now stripped out and the content's are merged into the <navMap> section. The XML is then malformed right around the section where the original <navList> items are merged into the <navMap>. I took a look through the source code for KindleUnpack and saw no mention of a navList anywhere (I'm no Python wizard though).

Any chance you guys could look at adding support for this? It would be greatly appreciated!

Thanks,
~Nicholas
KevinH is offline   Reply With Quote
Old 07-22-2013, 03:23 PM   #560
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: 843
Karma: 349410
Join Date: Nov 2009
Device: many
Hi,

I will add this change to kindleunpack.py as well so that it operates correctly even without operating inside a calibre environment.

It will appear in the upcoming KindleUnpack v0.63.

Thank you!

Kevin

Quote:
Originally Posted by NiLuJe View Post
That said, there's no JFIF, EXIF or 8BIM anywhere in that file, so Kovid's tweaked imghdr doesn't catch it either. To keep false-positives at bay, I tweaked my extra check a bit:

Code:
                # imghdr only checks for JFIF or Exif JPEG files. Apparently, there are some with only the magic JPEG bytes out there...
                # ImageMagick handle those, so, do it too.
                if imgtype is None and data[0:2] == b'\xFF\xD8':
                    # Get last non-null bytes
                    last = len(data)
                    while (data[last-1:last] == b'\x00'):
                        last-=1
                    # Be extra safe, check the trailing bytes, too.
                    if data[last-2:last] == b'\xFF\xD9':
                        imgtype = "jpeg"
KevinH is offline   Reply With Quote
Old 07-31-2013, 04:27 AM   #561
elmimmo
Junior Member
elmimmo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2012
Device: Kindle 4
Kindle Previewer 2.9 outputs AZK file for iOS

Kindle Previewer 2.9, released on June 19th, has a new feature to allow testing KF8 files on Kindle for iOS.

Kindle for iOS has never read the KF8 portion of a mobi file when sideloading the book, so up until then, it was simply not possible to test KF8 files (or at least FXL books, which is what I am experienced in) on Kindle for iPad (which sucked because Amazon's ingestion process often had issues with making books available for iPad when no issue happened making them available to other Kindle devices/apps, such as when using SVG).

Kindle Previewer 2.9, as described in its released notes, will output an AZK file that can be sideloaded into an iOS device via iTunes, whose KF8 content fork will be read properly by Kindle for iOS.

Anyone knows how this file is different from an input mobi and why iOS needs it instead of the regular mobi? KindleUnpack 0.62 will not accept it as an input file.
elmimmo is offline   Reply With Quote
Old 07-31-2013, 08:47 AM   #562
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,926
Karma: 40404050
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Anyone knows how this file is different from an input mobi and why iOS needs it instead of the regular mobi? KindleUnpack 0.62 will not accept it as an input file.
I have no idea about any differences there might be, but have you tried renaming the *.AZK file with one of the extensions that KindeUnpack does recognize -- just to see if it can then be unpacked?
DiapDealer is online now   Reply With Quote
Old 08-02-2013, 02:00 PM   #563
steppe
Enthusiast
steppe began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
Quote:
Originally Posted by elmimmo View Post
Anyone knows how this file is different from an input mobi and why iOS needs it instead of the regular mobi? KindleUnpack 0.62 will not accept it as an input file.
This has to do with the long-standing animosity between Apple and Amazon and the lack of desire to make devices and software compatible. Kindle for iOS accepts both sideloaded and e-mailed .mobi files, but it displays them incorrectly. The AZK format is supposed to closely emulate the final ebook file that Amazon sends to a paying customer's iOS device.

Incidentally, KP2.901 does not generate the AZK file for regular reflowable ebooks (only for fixed layout) and still emulates the iOS devices incorrectly, showing the old KF6 part of a .mobi file.

Quote:
but have you tried renaming the *.AZK file with one of the extensions that KindeUnpack does recognize -- just to see if it can then be unpacked?
Nope, none of the available extensions work. Looks like this AZK format is a new bird. But KindleUnpack 0.62 works fine with .mobi files generated by the latest version of KindleGen, 2.9, and Kindle Previewer 2.901 successfully reads the split Mobi7 and Mobi8-only .mobi files. (As mentioned above, the Kindle for iOS emulation of KP2.901 cannot read the Mobi8-only split files, but this is a problem with Kindle Previewer, not KindleUnpack.)

Last edited by steppe; 08-02-2013 at 02:33 PM.
steppe is offline   Reply With Quote
Old 08-02-2013, 08:40 PM   #564
elmimmo
Junior Member
elmimmo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2012
Device: Kindle 4
Quote:
Originally Posted by steppe View Post
This has to do with the long-standing animosity between Apple and Amazon and the lack of desire to make devices and software compatible. Kindle for iOS accepts both sideloaded and e-mailed .mobi files, but it displays them incorrectly. The AZK format is supposed to closely emulate the final ebook file that Amazon sends to a paying customer's iOS device.
How is the fact that an app developed by Amazon is not able to properly read Amazon's proprietary format, and that it needs a new proprietary format, also by Amazon, related to whatever relation Apple and Amazon may have?
elmimmo is offline   Reply With Quote
Old 08-05-2013, 11:34 AM   #565
Tegmark
Junior Member
Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.Tegmark ought to be getting tired of karma fortunes by now.
 
Posts: 2
Karma: 400010
Join Date: Aug 2013
Device: nook, kindle
Hey gents,

I am curious if I were to take a book that I purchased off of barnesandnoble that's an epub and dedrm it. How different will the resultant file be from the same book as an azw3 off Amazon? Does the dedrm component work the same? Does mobiunpack *convert* the azw3 file from mobi to epub? Or is it truly an unpack? I ask as I've noticed there are a number of books that are cheaper on Amazon. So if the files are basically identical (what's the difference if anything?) it would be nice if I could just copy the azw3→mobiunpack→epub over to my nook. Just a curiosity. Thanks for all the hard work guys!

-Teg

Last edited by Tegmark; 08-05-2013 at 11:41 AM.
Tegmark is offline   Reply With Quote
Old 08-05-2013, 04:10 PM   #566
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,426
Karma: 87104680
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Kindle Unpack is just an unpack. The 'epub' it produces from .azw3 files is probably not fully compliant with ePub standards, although with a really good source book it's not very far off.

But it's easy to buy on Amazon and read on nook - just let calibre do the conversion from azw3 to ePub. It's what I do. Only if that produces poor formatting will I bother trying to tweak things, and then it's probably calibre's conversion options that can be the most use.
pdurrant is online now   Reply With Quote
Old 09-01-2013, 12:58 PM   #567
Julius Caesar
Groupie
Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 567932
Join Date: Oct 2012
Device: Kindle Paperwhite
Using KindleUnpack, how do I unpack multiple kindle files simultaneously in their own separate directories?
Julius Caesar is offline   Reply With Quote
Old 09-01-2013, 02:45 PM   #568
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,926
Karma: 40404050
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Julius Caesar View Post
Using KindleUnpack, how do I unpack multiple kindle files simultaneously in their own separate directories?
You'd probably need to create your own batch file or script of some kind to do that (that repeatedly calls the KindleUnpack script). The tool itself is very much a "one input file/one output directory" type of scenario. Meant for inspecting/hand-tweaking files... not really for bulk processing.

Last edited by DiapDealer; 09-01-2013 at 02:49 PM.
DiapDealer is online now   Reply With Quote
Old 09-01-2013, 05:15 PM   #569
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,426
Karma: 87104680
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by Julius Caesar View Post
Using KindleUnpack, how do I unpack multiple kindle files simultaneously in their own separate directories?
Switch to a Mac and use my AppleScript
pdurrant is online now   Reply With Quote
Old 09-07-2013, 09:51 PM   #570
Julius Caesar
Groupie
Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.Julius Caesar ought to be getting tired of karma fortunes by now.
 
Posts: 192
Karma: 567932
Join Date: Oct 2012
Device: Kindle Paperwhite
When I unpack a book with Kindle Unpack and repack it with Kindlegen, I got a warning: "No Page map found in the book" and search by page number is no longer available for that particular book. The page numbers are gone even though I didn't make any modification to the source files after unpacking and even though reference to page numbers are preserved in the original source files. After unpacking, I could still see a reference in each xhtml file like <a id="page88">. So, I don't know what's going on.

What is a page map and what does it look like?

How can I make my own if it's missing?

Is there anyway I can unpack and repack a Kindle book without breaking the page numbers?

Last edited by Julius Caesar; 09-08-2013 at 03:28 AM.
Julius Caesar 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 03:00 AM.


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