Hi Kevin,
Quote:
Originally Posted by KevinH
Thanks for the minor bug fixes and opf and k8resc changes. I will add them to my tree. Also, do you see any way to reduce the degree of redundancy in the opf generation code?
|
I feel the necessity of discussion to modify 'mobi_opf.py,' so I have not touched.
Followings are in my mind,
1. The most redundant part is manifest generation. Is it better to merge buildOPFManifest() and buildEPUB2OPFManifest() to buildEPUB3OPFManifest(), and rename buildEPUB3OPFManifest()? Personally, I prefer to merge.
2. I think it is better to merge writeK8OPF() to writeOPF().
3. Keeping buildOPF() to be separated because merging it cause many 'if statments' and decrease readability, it may better to merge buildEPUB2OPF() and buildEPUB3OPF() to buildK8OPF().
4. removing constants OPF_NAME, TOC_NCX and NAVIGATION_DOCUMENT, and changing to hard code due to almost no necessity.
Besides, I have modified 'mobi_split.py' to make processing faster. I have considered to post it after v0.73 release in oder to avoid more testing. But I will post it if some one want.
Thanks,