It might be simpler for you to just modify the code in mobi_output.py to do what you want. You can worry about creating a plugin later. See the user manual for instruction on setting up a calibre development environment.
If you want to go the plugin route look at the modify epub plugin, that should be a good starting point.
|