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
|