View Single Post
Old 11-09-2013, 06:04 PM   #10
KevinH
Sigil Developer
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: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Here is a pre-pre-pre alpha code to test and play with.

Warnings!
- It has not really been properly tested
- It has been thrown together with bunches of little pieces
- It is not unicode safe (for paths and things)
- This is just really proof of concept
- I do almost no error checking
- it is just a quick and dirty mishmash

kbhend$ python dualmetafix.py thisisatest test.mobi out.mobi
DualMetaFixer v001
test.mobi .MOBI
adding enth so trimming 000000000000000000000000
adding enth so trimming 00000000000000000000000000000000000000
adding enth so trimming 00000000000000000000000000000000000000
adding enth so trimming 000000000000000000000000
adding enth so trimming 00000000000000000000000000000000000000
adding enth so trimming 00000000000000000000000000000000000000

When I examine the out.mobi using DumpMobiHeader_v012.py I see the following:

Mobi 7 Header:
EXTH MetaData

Key: "ASIN_(504)"
Value: "thisisatest"

Key: "ASIN_(113)"
Value: "thisisatest"

Key: "CDE_Type_(501)"
Value: "EBOK"

and in the Mobi 8 Header I see:

EXTH MetaData

Key: "ASIN_(504)"
Value: "thisisatest"

Key: "ASIN_(113)"
Value: "thisisatest"

Key: "CDE_Type_(501)"
Value: "EBOK"


So please test this to see if it actually shows the cover you want with one of your dual mobi ebooks. Please note, nothing is written to the input file but use this with file copies just to be super safe.

Please let me know what errors you get and if it helps at all. If so, I will spend the time to make it unicode safe and clean it up, etc. Otherwise, it may not be worth the effort.

See the attached zip.

KevinH
Attached Files
File Type: zip dualmetafix.zip (2.5 KB, 418 views)
KevinH is offline   Reply With Quote