View Single Post
Old 04-03-2014, 04:35 PM   #611
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by eschwartz View Post
Where else would it be? Roaming IIRC is for most appdata besides for caches, to facilitate network domains in business usage.
Hardly the case here...

Quote:
Originally Posted by Perkin View Post
You would need to add another option to the options pane, and then duplicate the smarten option function code, rewriting to do the strip spans instead.
Way ahead of ya; I've pretty much got that done, but I'm running some test cases to fine-tune things. Mods so far:

- remove_drm_meta_tags now removes the trailing newline as well, so the Adobe line completely goes away instead of leaving a blank line.
- "Smartify punctuation" routine restored.
- New code renamed "strip_spans" and available through the --strip_spans command line option.
- strip_spans expanded to remove "rights.xml" and "kobo.js" - both remnants of the Kobo DRM scheme - from the book and manifest.
- strip_spans expanded to remove the koboSpan CSS rule and references to kobo.js from the (X)HTML files.
- Basic documentation for the new code added to the HTML file.
- Version number bumped to 1.3.10 to avoid any confusion, although 1.3.9b would be more accurate.

In short, strip_spans is now more like a "deKoboify" routine that also happens to remove SPAN elements that have no attributes. I'm almost tempted to split it properly, into strip_spans and dekobo, but I don't really see the point. (Any opinions either way?)

If anyone wants to try to poke holes in the code, the current version is attached. I think I've got it properly bulletproofed, but testing is more than welcome.

EDIT: Code revised after further testing.
Attached Files
File Type: zip Modify ePub - stripspans.zip (150.5 KB, 234 views)

Last edited by Rev. Bob; 04-03-2014 at 06:26 PM.
Rev. Bob is offline   Reply With Quote