![]() |
#331 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Glad it's working for you. The association should really be made already by default, but I think at least one version of OS X shipped with that functionality "broken" for some reason.
|
![]() |
![]() |
![]() |
#332 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Apr 2012
Device: Kindle Fire
|
Iam using WIndows 7 64bit. ActiveState Python 2.7 64bit. Downloaded mobi_unpack.pyw. Unzipped it. When I try to use it I get error mobi_unpack.py not found error 2. Can someone help me sort this out? Where should I put the lib files? I know nothing about Python. Just trying to learn about the internals of the mobi files.
Duh follow original INSTRUCTIONS WORKS FINE! No help required Last edited by barndog1946; 04-09-2012 at 05:53 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#333 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 04-09-2012 at 05:47 PM. |
|
![]() |
![]() |
![]() |
#334 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Apr 2012
Device: none
|
Found a problem not sure if its cause by kindlestrip or mobiunpack_v0.47.
I created a simple mobi file with kindlegen, then kindlestrip before using mobiunpack to unpack it. Unpacking fails if the "Split combination Mobi Files" is selected while a "raw" mobi without kindlestrip always works with the split option. |
![]() |
![]() |
![]() |
#335 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
Exactly what version of kindlestrip are you using? The only one that works correctly for the new kindlegen is the kindlestrip_v133.py. All of the earlier versions did not know there was a pointer to and record count of the Source zip file stored inside the mobi header and so they did not properly remove that pointer or record count. |
![]() |
![]() |
Advert | |
|
![]() |
#336 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Apr 2012
Device: none
|
Quote:
looks like a common issue, have tried several mobis all the same result. |
|
![]() |
![]() |
![]() |
#337 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
The bug is in Mobi_Unpack in the file mobi_split.py. The test for srcs > 0 ignores the fact that the srcs value is unsigned and therefore tries to unpack it even when it should not. Here is the fix: Code:
--- mobi_split.py~ 2012-03-01 18:16:17.000000000 -0500 +++ mobi_split.py 2012-04-17 14:53:18.000000000 -0400 @@ -241,7 +241,7 @@ # check if there are SRCS records and delete them srcs = getint(datain_rec0,srcs_index) num_srcs = getint(datain_rec0,srcs_count) - if srcs > 0: + if srcs != 0xffffffff and num_srcs > 0: self.result_file7 = deletesectionrange(self.result_file7,srcs,srcs+num_srcs-1) datain_rec0 = writeint(datain_rec0,srcs_index,0xffffffff) datain_rec0 = writeint(datain_rec0,srcs_count,0) if srcs > 0: with if srcs != 0xffffffff and num_srcs > 0: being careful to make sure you do not mess up the indentation level (whitespace at the beginning of that line). If it would help, I can post a pre-release version of Mobi_Unpack_v049 - with that fix. We are waiting for Calibre to support the .azw3 file extension for standalone mobi8 mobi files before releasing. Thanks for the bug report. KevinH |
![]() |
![]() |
![]() |
#338 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Apr 2012
Device: none
|
thanks, its working now.
![]() |
![]() |
![]() |
![]() |
#339 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 456
Karma: 1044878
Join Date: Apr 2009
Device: Kindle Paperwhite 4
|
I don't know if the problem is a bad book or a problem in the script, but unpacking the KF8 version of this free book with v0.47 errors:
Code:
Command = "python mobiunpack.py" Mobi Path = "<deleted>" Output Path = "<deleted>" Options = "" Please Wait ... Traceback (most recent call last): File "lib\mobi_unpack.py", line 1082, in <module> sys.exit(main()) File "lib\mobi_unpack.py", line 1070, in main unpackBook(infile, outdir) File "lib\mobi_unpack.py", line 956, in unpackBook process_all_mobi_headers(files, sect, mhlst, K8Boundary, False) File "lib\mobi_unpack.py", line 806, in process_all_mobi_headers guidetext = k8proc.getGuideText() File "<deleted>\lib\mobi_k8proc.py", line 346, in getGuideText [pos, idtext, filenum, seqnm, startpos, length] = self.divtbl[fileno] IndexError: list index out of range |
![]() |
![]() |
![]() |
#340 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
Its a bug in Mobi_Unpack.py. Already fixed in version Mobi_Unpack v049 which should be released by the end of the day or early tomorrow. So please hang on. KevinH |
![]() |
![]() |
![]() |
#341 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Mobi_Unpack_v049 Bug fix release
See later post for even newer version ...
Hi, There have been a few bugs that needed fixing: - better handling of StartOffset metadata to prevent problems - better support for splitting files when no SRCS exists and adding support for .azw3 files (added in the newest calibre) Please give Mobi_Unpack_v049 a try and let me know what if any problems you run into. KevinH Last edited by KevinH; 04-26-2012 at 04:03 PM. |
![]() |
![]() |
![]() |
#342 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,033
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I tried version 0.4.9 of Mobi-Unpack on some KF8 files that failed with the previous version and they all unpacked without error and appeared to yield a reasonable result.
One thing I did notice, that also seems to apply to the previous version, is that cover images that appear at the start of the KF8 book when viewed with Kindle Previewer or Calibre’s e-book viewer do not appear at the beginning of the corresponding EPUB produced by Mobi-Unpack. The cover image is present, but not linked into the flow of the book. I’m not sure if this behavior is intended or not. |
![]() |
![]() |
![]() |
#343 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
It should be properly specified in the epub's content.opf file. If not that is a bug. Can you unzip one of your created epubs and check the content.opf for the proper metadata for the cover and let me know what is wrong and I can try to fix it. |
![]() |
![]() |
![]() |
#344 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,033
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I’m afraid that I am not knowledgeable enough about the EPUB format to determine if the file is formatted correctly. Here is what I am seeing.
As an example I downloaded a free sample from Amazon. (Turing's Cathedral: The Origins of the Digital Universe, ASIN: B005IEGK5C) The original KF8 file has a cover that is displayed as the first thing in the sequence of the book. It doesn’t display in the EPUB created by Mobi-Unpack. The content.opf contains an entry in the manifest that refers to the cover image: <item id="cover_img" media-type="image/jpeg" href="Images/image00008.jpeg" /> There is also a smaller sized version of the cover referenced in content.opf as: <meta name="Cover ThumbNail Image" content="Images/image00090.jpeg" /> And in the manifest as: <item href="Images/image00090.jpeg" id="item18" media-type="image/jpeg" /> Neither of these jpeg files is referenced anywhere else in the EPUB (including the xhtml files) and they are not displayed as part of the book content. Also checking with Sigil shows these files as not reachable. |
![]() |
![]() |
![]() |
#345 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 456
Karma: 1044878
Join Date: Apr 2009
Device: Kindle Paperwhite 4
|
I think the "problem" here is that the Kindle app will display the cover image specified in the cover <meta> tag when you open a book. With an ePub, you need to specifically include a separate HTML page with the cover in the spine in order for it to appear when you open the book in most readers.
That said, my understanding of [url=http://blog.threepress.org/2009/11/20/best-practices-in-epub-cover-images/]ePub cover best practices[/i] is that you shouldn't be showing the cover when you open the book - tell the reading software how to find the cover, but let it decide whether or not to display it. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |