MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Saved search for stylesheets only (https://www.mobileread.com/forums/showthread.php?t=323724)

Capricorn 10-10-2019 09:27 AM

Saved search for stylesheets only
 
First of all, I would like to thank all the developers of sigil for all their incredibly hard work. It allows me to use Sigil as my main editor for changing my epub books.:thanks:

I am at the moment stumped by the following:
I use some saved searches only for stylesheet changes. Hence I would like to directly connect these saved searches to any and all stylesheets present. That way I would not have to first click on each stylesheet and then run the search.

I thought maybe by using keyboard shortcuts I could connect it. But I realise I know too little to be sure how that might be done.
Looking in the manual did not lead to some brilliant idea.
Searching on the forum did not provide any hints, but I might have used the wrong search words.

So, my questions are:
1. Can it be done at all?
2. If yes, how would I go about it?

If anyone can throw any light on this, I would appreciate it.
Many Thanks.

Capricorn,

theducks 10-10-2019 01:20 PM

I use saved searches with Stylesheets all the time.

Somewhere, waaay back :D someone decided to NOT (allowing) store the scope of a search.

Stylesheet searches MUST be done while viewing the sheet AND the scope is CURRENT FILE. Other than that, saved searches run just fine. That includes running a Group of searches ON THE stylesheet.

FWIW :bulb2: I created A Group Just for Stylesheets searches ( I have lots of other groups. Including Groups within Groups that do a series of other S&R tasks)

DiapDealer 10-10-2019 01:47 PM

Searching All CSS files in one fell swoop is not currently possible. It doesn't matter if it's a saved search or a manual one.

Like theducks mentioned, you can create a group of saved searches to run. But you'll always have to run that group on each css file present in the epub using the "current file" scope.

Capricorn 10-10-2019 03:29 PM

theducks: I recently discovered grouping in searches by reading some other posts. That has been very useful. On top of that, my hope now was to be able to store the scope of a search and which type of files it should work on. Or connect it in some way.

DiapDealer: ah well, I will have to continue doing them one by one. Maybe one day....

Thank you for the information,

Capricorn,

DiapDealer 10-10-2019 04:58 PM

Quote:

Originally Posted by Capricorn (Post 3901731)
DiapDealer: ah well, I will have to continue doing them one by one. Maybe one day....

I'd like it too. But every time I look at the search code for Sigil and its various scopes to see how it can be done, my head starts spinning. :o

It's going to take a pretty-big restructuring of the search engine logic to accomplish, I think.

Tex2002ans 10-10-2019 05:09 PM

Quote:

Originally Posted by DiapDealer (Post 3901686)
Searching All CSS files in one fell swoop is not currently possible. It doesn't matter if it's a saved search or a manual one.

Like theducks mentioned, you can create a group of saved searches to run. But you'll always have to run that group on each css file present in the epub using the "current file" scope.

Along with Current File, Calibre's Editor has a:
  • All Text Files
  • All Style Files

so the "All Style Files" search would help in Capricorn's case.

DiapDealer 10-10-2019 05:41 PM

Yes. It would help a lot of people. Myself included. Patches welcome. ;)


All times are GMT -4. The time now is 10:29 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.