Quote:
Originally Posted by Mister L
I believe I gave ample, precise, detailed and consistent indications throughout this thread, including providing a test file and various code samples of the code before and after the plugin. I am sorry if they were not sufficient but the problem is not always on the side you both seem to be indicating.
|
Quote:
Originally Posted by DiapDealer
You misunderstood me. I wasn't really asking for human answers to most of those questions. I was asking what kind of spaghetti logic would be required within a plugin to get the plugin to always make the "right" decisions on its own? A human can look at the code and easily (sometimes) see where the new tag should be created. A script has to parse all of the html (and make informed guesses about where it makes sense to put it semantically speaking) to avoid creating malformed or improperly nested tags.
|
Basically what DiapDealer said in his response is what I ran into. For one epub, it is not an issue. For a mass of epubs with the variances in structure, code and even file locations in the zip container, I could find no way to program a reliable tool. I've mentioned some of the issues I ran into, all of which the plugin you want would either have to handle or fail gracefully. As I said, I found using regex to add title="" to an existing header or adding a new header to each file and then copy/pasting ended up taking less time especially when fixing the code to work with epub #25 broke the fixes I put in to deal with epubs #18 and #22.
Someone else may have had less trouble with the code. Perhaps someone without fond memories of a Fortran arithmetic if.