View Single Post
Old 11-17-2017, 08:12 PM   #2538
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,041
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by mehetabelo View Post
Somewhere, it would be *really* helpful to have a regex option for find/replace that directly applies to the html.
Have you tried the replace_br_with_p option? That might help with some of it.

This idea has been raised before. I'm reluctant to implement such a feature in FanFicFare for a couple reasons:

First, it would be a very dangerous feature that could very, very easily be misconfigured to destroy the text it's trying to fix. It's a shotgun equipped with a stirrup on the end--you inevitably will shoot yourself in the foot with it. Plus you'll also end up hitting sites over and over again while fine tuning the settings.

Second, IMO, it's really outside of scope for FFF to be doing that level of editing on the story text. I know it can be done in Calibre's Edit Book, and while I haven't experimented with much, I know that Calibre's Convert has a 'Search & replace' regexp feature that can load and save lists of replacements.

You may then wonder about the replace_br_with_p option in FFF I just mentioned? That feature was contributed by another developer (Asbjørn Grandt). I was a bit hesitant about it, but I've since come to use it myself for some sites.

But earlier this year I discovered that it was accidentally corrupting the story text when run more than once on the same HTML during some updates. It's since fixed to only run once, but it was a reminder that such processing is dangerous.
JimmXinu is offline   Reply With Quote