This code doesn't address the hard part of metadata writing in mobi files (no offense to KevinH) -- dealing with when the replacement metadata is longer than the original. MOBI files are palm databases and when you change the size of an individual record in the database, you then have to adjust various structures in the database header to reflect the fact that now the offsets for all subsequent records have changed. That is tricky to do robustly, especially when the record being changed is not the first record, as is the case for a dual mobi.
|