very ALPHA version
Hi Peter and DiapDealer,
Attached is a very **ALPHA** version of mergeKF8Only.py script.
This is more proof of concept than anything else. It removes sections but leaves a zero length entry in the section table in the palm database to prevent errors with section offsets later. This cuts down on the size of the file but really we should be deleting those section entries as well and not just making them 0 size.
Your message is stored as test.rawml inside the zip archive.
The idea is to then do the following:
python ./mergeKF8Only.py Jerome.mobi test.rawml testoutput.mobi
I was able to open the testoutput.mobi in the KindlePreviewer.app when set to Kindle and see your message, and when set to KindleFire see the actual ebook.
I am sure this is missing lots of pieces that have to be updated but it will give you something to test with as I only have access to two sample KF8 documents.
Please give it a try and let me know how / where it fails. If this works okay, then we can try to make it actually remove the section entries from the table and try to update all other pieces that depend on it.
Edit: I removed the alpha version since the Beta version replaces it.
Last edited by KevinH; 02-09-2012 at 07:23 PM.
|