release version of mergeKF8Only_v050.py
Hi Peter and DiapDealer,
I cleaned up the code, removed redundant pieces, formed proper classes, added debug information, etc.
So here is the release version of mergeKF8Only_v050.zip
based on mobi_unpack.py code written by: Charles M. Hannum,
P. Durrant, K. Hendricks, S. Siebert, fandrieu, DiapDealer, nickredding.
In a dual KF8 mobi file, replaces the original mobi portion
with a KF8Only message, leaving the KF8 portion untouched.
mergeKF8Only_v050.py -h -d infile.mobi message outfile.mobi
-h print this help message
-d use verbose debugging
The message file must be:
- a mobi html file in raw markup language format
- less than 4096 bytes in total
- utf-8 encoded
One easy way to generate a message file is to use kindlegen to create a mobi which consists just of your message and then unpack that mobi with WRITE_RAW_DATA set to be true using mobi_unpack.py. A sample test.rawml file is included in the zip archive. It can be edited with any good text editor.