View Single Post
Old 04-13-2012, 02:27 PM   #11
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
People swear by Sigil which has its own forum here. Myself, I re-make my e-books by hand using a plain-text editor with good regexp support and the ability to use "text factories" which are pre-programmable template-y snippet things you can run to auto-insert/change stuff.

I'm on a Mac so I use TextWrangler most of the time, but I also have installed NoteTab Light which works in a reasonably similarly-featured way on my hand-me-down Windows XP netbook (both are freeware).

And frankly, for this and most other Mobi-sourced files which need cleaning up, I'd just use the MobiUnpack script (available here in the Mobi forums, and a copy is included in the "tools" as well) to extract the HTML, edit that all as one go (you can just do a global find/replace to blank all the font face cruft and completely superfluous spans out).

I'm not sure that just deleting the CSS would actually have any positive effect on the cruft, because Calibre does tend carry over things and will actually assign its own weird classes to preserve formatting which clutters up the source even more. But CSS-deletion will generally tend to kill off most of the really visible formatting errors if you don't care about resulting filesize. (Still just 1.4 GB of usable space on my mere K2i.)

After that, just point Calibre or whatever back at the OPF file to regenerate using the new source. That should keep metadata and the NCX navmarks (if available) intact.
ATDrake is offline   Reply With Quote