Quote:
Originally Posted by naisren
1, unpack the dic mobi.
2, Using the new opf to repack it without editing anything, just for proving everything is back in its own way. During it, warnings about invalid images came out, I checked the so called invalid images, and tried to open them with picture tool and failed. Many images are OK without warning.
3, After the new mobi is generated, I opened it using PC mobi reader, and many functions refused to work.
|
I've tried the same with the file you've send, but my experience is quite different. The unpacking with mobiunpack and repacking with mobigen works fine, no complains about images from both programs besides the common warning from mobigen that the cover image is too small.
The repacked mobi works fine in the kindle app (including images), but without the javascript functions as javascript is unsupported by the kindle app.
The mobipocket reader crashes when I try to open the file, probably due to the broken javascript (the javascript tries to open an index via name, but index names aren't yet supported by mobiunpack).
I don't know what did went wrong for you, but at least the image handling works fine for the file.
Here is the log (some strings were repaced by XXX):
Code:
python mobiunpack.py XXX.mobi test
MobiUnpack 0.29
Copyright (c) 2009 Charles M. Hannum <root@ihack.net>
With Images Support and Other Additions by P. Durrant and K. Hendricks
With Dictionary Support and Other Additions by S. Siebert
Unpacking Book...
Mobipocket version 6
Warning: Unknown metadata with id 404 found
Huffdic compression
Unpack raw html
Info: Document contains orthographic index, handle as dictionary
Info: Index doesn't contain entry length tags
Read dictionary index data
Warning: There are unprocessed index bytes left: XX XX
[...]
Warning: There are unprocessed index bytes left: XX XX
Decode images
Find link anchors
Insert data into html
Insert hrefs into html
Remove empty anchors from html
Insert image references into html
Write html
Write opf
Completed
The Mobi HTML Markup Language File can be found at: test\XXX.html
C:\mobidict>cd test
C:\mobidict\test>mobigen -c2 XXX.opf
*****************************************
* Mobipocket mobigen.exe V6.2 build 43 *
* A command line e-book compiler *
* Copyright Mobipocket.com 2003-2008 *
*****************************************
opt compression: Mobipocket huffdic compression
opt version: try to minimize (default)
Info(prcgen): Added metadata dc:Title "XXX"
Info(prcgen): Added metadata dc:Date "XXX"
Info(prcgen): Added metadata dc:Creator "XXX"
Info(prcgen): Added metadata dc:Publisher "XXX"
Info(prcgen): Added metadata dc:Subject "Dictionary"
Info(prcgen): Added metadata Short dic label "XXX"
Warning(prcgen): Guide title is empty. Item is ignored
Info(prcgen): Parsing files 0000001
Info(prcgen): Resolving hyperlinks
Info(prcgen): Resolving start reading location
Warning(prcgen): The start reading location could not be resolved.
Warning(prcgen): Cover is too small : C:\mobidict\test\images\image00XXX.jpeg
Info(prcgen/inflections): Number of new <idx:infl> inflection rules: 0000XXX
Info(prcgen/inflections): Of which rules used only once or twice: 0000XXX
Info(prcgen/inflections): Number of inflection rule groups: 0000XXX
Info(prcgen): Computing UNICODE ranges used in the book
Info(prcgen): Found UNICODE range: Basic Latin [20..7E]
Info(prcgen): Found UNICODE range: Latin-1 Supplement [A0..FF]
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000001
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000002
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000004
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000008
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000016
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000032
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000064
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000128
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000256
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0000512
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0001024
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0002048
Info(prcgen/compress): Compiling source text for compression (4096 passes max).
Pass 0002174
Info(prcgen/compress): Compression pass 0000001
Info(prcgen/compress): Compression pass 0000002
Info(prcgen/compress): Compression pass 0000003
Info(prcgen/compress): Text compressed to (in % of original size): 010.18%
Info(prcgen/compress): Compression dictionary statistics: 001974180 bytes 00018
3450 entries
Info(prcgen/compress): Compression pass 0000004
Info(prcgen/compress): Text compressed to (in % of original size): 009.54%
Info(prcgen/compress): Compression dictionary statistics: 001402428 bytes 00012
8447 entries
Info(prcgen/compress): Compression pass 0000005
Info(prcgen/compress): Text compressed to (in % of original size): 009.32%
Info(prcgen/compress): Compression dictionary statistics: 001118938 bytes 00010
1641 entries
Info(prcgen/compress): Compression pass 0000006
Info(prcgen/compress): Text compressed to (in % of original size): 009.12%
Info(prcgen/compress): Compression dictionary statistics: 000894372 bytes 00008
1123 entries
Info(prcgen/compress): Compression pass 0000007
Info(prcgen/compress): Text compressed to (in % of original size): 009.00%
Info(prcgen/compress): Compression dictionary statistics: 000721806 bytes 00006
4837 entries
Info(prcgen/compress): Compression pass 0000008
Info(prcgen/compress): Text compressed to (in % of original size): 008.93%
Info(prcgen/compress): Compression dictionary statistics: 000586074 bytes 00005
1866 entries
Info(prcgen/compress): Compression pass 0000009
Info(prcgen/compress): Text compressed to (in % of original size): 008.90%
Info(prcgen/compress): Compression dictionary statistics: 000475936 bytes 00004
1489 entries
Info(prcgen/compress): Compression pass 0000010
Info(prcgen/compress): Text compressed to (in % of original size): 008.90%
Info(prcgen/compress): Compression dictionary statistics: 000388794 bytes 00003
3203 entries
Info(prcgen/compress): Compression pass 0000011
Info(prcgen/compress): Text compressed to (in % of original size): 008.91%
Info(prcgen/compress): Compression dictionary statistics: 000314792 bytes 00002
6574 entries
Info(prcgen/compress): Advanced compression successful (decoded and verified).
Info(prcgen): Final stats - text compressed to (in % of original size): 008.91%
Info(prcgen): The document identifier is: "XXX"
Info(prcgen): The file format version is V6
Info(prcgen): Saving MOBI file
Info(prcgen): MOBI File generated with WARNINGS!
Ciao,
Steffen