Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2018, 08:22 PM   #1
Vanguard3000
Enthusiast
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 35
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Glo
Plugin to ignore tags when searching?

I'm wondering if anyone has made a modification to Sigil that allows a user to specify when doing a find/replace to ignore html/css tags and header information.

As an example, I recently had a book that often — and inconsistently-used a simple minus sign to separate a sentence instead of an em- or en-dash (as seen in my cleverly-hidden example earlier in this sentence). But the search was rather obnoxious as searching for the minus sign gave me a lot of false positives inside style tags (e.g. <p class="italic-and-bold">). Given that the minus sign was also frequently-used as in my use of the phrase "frequently-used", I had enough false positives to sift through as it was!

I've found a few examples of regexes that can be used to ignore these tags, such as Timur's examples here, but I'm a pretty lazy guy and was wondering if there were an easier way in the form of a Sigil plugin.

Ideally, what I'm imagining is an additional dropdown menu in the search/replace panel's "Mode" section, that would have the options to "Ignore Tags", "Only Search in Tags", and "Search Everywhere".

Does anything like this exist? Thanks for the help.
Vanguard3000 is offline   Reply With Quote
Advert
Old 06-06-2018, 08:45 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 32,882
Karma: 10034422
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It exists in the calibre editor https://manual.calibre-ebook.com/edi...ring-html-tags

@mods Apologies if this is out of line in the Sigil forum, if so, please feel free to delete, but I figured that it might be helpful to the OP.
kovidgoyal is online now   Reply With Quote
Old 06-06-2018, 08:55 PM   #3
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,966
Karma: 1922532
Join Date: Nov 2009
Device: many
I normally use regular expressions to restrict matches to being outside tags. This is relatively straight forward and will greatly diminish your false positives. I believe this was already discussed in the Sigil Regular Expression thread. Simple text search in BookView works as well although I hate to push BookView to anyone.
KevinH is offline   Reply With Quote
Old 06-06-2018, 09:16 PM   #4
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 10,134
Karma: 9778562
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I use the spellchecker for this particular case, Show all words, Filter for -. It's available in Sigil and calibre editor spellcheckers, and in the calibre editor's Tools->Reports->Words tool.

BR
BetterRed is offline   Reply With Quote
Old 06-06-2018, 09:17 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 18,339
Karma: 94652854
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by kovidgoyal View Post
It exists in the calibre editor https://manual.calibre-ebook.com/edi...ring-html-tags

@mods Apologies if this is out of line in the Sigil forum, if so, please feel free to delete, but I figured that it might be helpful to the OP.
No problem. I personally don't mind anyone pointing out the (dis)advantages of either editor for the benefit those asking the questions.

We've had a couple people in the past who liked to camp out and point out calibre equivalents for every single feature/assistance request that newcomers brought up in the Sigil forum. I freely admit that THAT tended to get on my nerves after a while.

But you're welcome to comment here any time, Kovid.
DiapDealer is online now   Reply With Quote
Old 06-07-2018, 02:36 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 32,882
Karma: 10034422
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by DiapDealer View Post

But you're welcome to comment here any time, Kovid.
Cool, glad I didn't step on any toes
kovidgoyal is online now   Reply With Quote
Reply

Tags
plugin, regex, search, search & replace, sigil

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ignore tags when downloading metadata? rockola Library Management 2 12-09-2017 10:11 AM
Searching for entries with no tags sasilk Library Management 3 09-02-2017 11:48 AM
Searching between tags mariaclaudia Calibre 4 05-10-2017 05:38 PM
Searching Tags MzPepper Library Management 4 03-29-2017 02:36 PM
Searching tags to show tags I want even when it has a tag I do not Jade Aislin Library Management 2 04-25-2012 01:01 PM


All times are GMT -4. The time now is 11:36 PM.


MobileRead.com is a privately owned, operated and funded community.