You are right. I forgot to disable the auto-cleaner in Vim.
(Not going to argue about your code style, however there are some inconsistent usage, e.g. double space after "=" in assignments, or module constants in uppercase and lowercase, etc. Anyway, your house, your rules. I'm ok with it.)
I pushed a "minimal" set of changes on the "momin" branch:
https://github.com/pettarin/ePub3-itizer/tree/momin
The changes are:
1. tests/mo/ : directory containing the epub trees to test MO support;
2. README.md : changed date
3. src/plugin.xml : bumped to v0.3.3
4. src/plugin.py : added code to detect and patch SMIL files
5. src/opf_converter.py : added code to generate the <meta...> elements and media-overlay="..." attributes required when MO are defined.
Other notable changes:
A. I believe this was a bug:
https://github.com/kevinhendricks/eP...e12a271c48L259
B. refactored several open(...).write(...) calls into:
https://github.com/kevinhendricks/eP...406fd63772R114
C. there was a potential bug in the creation of the guide landmark in nav.xhtml:
https://github.com/kevinhendricks/eP...406fd63772R209