Hi DiapDealer,
Good point! I have not looked at the epub3 and auto detection code yet and it will need to be updated as well. The package tag and its version is included in some RESC and the current k8resc can easily parse it if present and use its value to help auto detection.
I also think that epub version (or A for auto) should be passed into k8resc as well to help it clean up and remove any epub 3 pieces if the user requests epub2, since most of them come in via the RESC info.
One main problem is the damn refines in epub3 metadata, they use and reference the original "id=" properties on the title, the creator, and on other things but these are all stripped away when that info becomes the EXTH equivalent. The remnants do seem to make it into the RESC but the ids being referenced by the refines are long gone and we can only guess as to which creator or title or whatever they actually refer to.
So that is something, that can only be fixed by hand editing after the reconstruction.
I will try to take look at passing epubver into mobi_k8resc.py and see if I can add some auto-detect code and things to clean up if down versioning.
Thanks,
KevinH
ps, the new mobi_k8resc parse code should look familiar as it is a tweaked version of the old mobiml2html parser we used!
Quote:
Originally Posted by DiapDealer
When it comes to opf tag attributes, is there any logic built-in to exclude the stuff from a version 3 opf that isn't valid in a version 2 opf?
I know an un-influenced re-creation of the original source has always been (and should be) a higher priority than epub spec adherence, so perhaps it would make more sense if some of these epub3-only properties/attributes could be used to enhance the new auto-detection feature? Last time I checked, it seemed auto-detect only checked for the presence of a couple of fixed-layout properties to make its decision.
I have no idea what it might entail, but I'd like to see a more robust (possibly even heuristic) approach to ensure that the same sort of source that went in is coming back out (if auto-detect is selected).
|