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

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2018, 03:13 PM   #1
vr8ce
Enthusiast
vr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchfork
 
vr8ce's Avatar
 
Posts: 31
Karma: 48958
Join Date: May 2017
Device: iPad Pro 9.7"
Default "find" for Search/Replace regex functions

From what I understand from reading the "Function mode for Search & replace in the Editor" section of the manual, although the search/replace function is saved, the find string isn't. Thus, we have to enter the find string every time we use the saved function. This means we either have to remember them or store them elsewhere, the former being difficult when the strings are complicated, and the latter being unnecessary duplication.

I'd like to request that we be able to specify the default find string for a saved regex function. That way, when we chose a saved function from the dropdown list, it would also fill in the find string with our default. We could change the find string at that point if we wanted to, but at least it's initially populated with the "normal" default. (And, of course, if we didn't want a default, we would just leave that line empty.)

Maybe it's just a
Code:
default_find = "blahblahblah"
as the first line in the saved function, or maybe it's something else. Anything that lets us keep the default find with the function so we don't have to remember it.

Thanks!
vr8ce is offline   Reply With Quote
Old 01-20-2018, 09:59 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: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to save a search, use the saved searches feature in the editor. There you can save every aspect of the search, the find string the mode, the replace expression, etc.
kovidgoyal is offline   Reply With Quote
Old 01-21-2018, 12:05 AM   #3
vr8ce
Enthusiast
vr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchfork
 
vr8ce's Avatar
 
Posts: 31
Karma: 48958
Join Date: May 2017
Device: iPad Pro 9.7"
Ahhh, very good, thanks. I didn't get from the manual that Saved Searches would work for regex functions (Saved Searches doesn't mention regex functions, just regex expressions, and the Regex functions section doesn't mention saved searches).
vr8ce is offline   Reply With Quote
Old 01-21-2018, 01:30 PM   #4
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
It's much quicker to place all your search and replace strings in one text file, especially when you have to go through a lot of regex searches. Just copy and paste from the opened text file, instead of messing around with using the Saved Searches. My text file is named "errors.txt," is easy to remember and open, and is easy to copy and paste each search string.
deback is offline   Reply With Quote
Old 01-21-2018, 06:15 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by deback View Post
It's much quicker to place all your search and replace strings in one text file, especially when you have to go through a lot of regex searches. Just copy and paste from the opened text file, instead of messing around with using the Saved Searches. My text file is named "errors.txt," is easy to remember and open, and is easy to copy and paste each search string.
I'll completely disagree with that.

I have a pile of saved searches. When I start "mending" a book, I select most of them, and hit find. Decide if this is an actual problem, and hit find and replace, or find to move on. Repeat until all the problems have been fixed. it isn't quite as simple as that, but a lot quicker than copying the search terms from a text file for 20 or so searches.
davidfor is offline   Reply With Quote
Old 01-21-2018, 07:39 PM   #6
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
Quote:
Originally Posted by deback View Post
It's much quicker to place all your search and replace strings in one text file, especially when you have to go through a lot of regex searches. Just copy and paste from the opened text file, instead of messing around with using the Saved Searches. My text file is named "errors.txt," is easy to remember and open, and is easy to copy and paste each search string.
I completely agree with you.

I have been using that technique for year and it is very efficient and effective.

Thom* is offline   Reply With Quote
Old 01-21-2018, 09:56 PM   #7
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by Thom* View Post
I completely agree with you.

I have been using that technique for year and it is very efficient and effective.

Thank you. When you're a fast typist, as I am, it really is the quickest way to get through the entire list of things I search for. I have Editpad open on the left side of my screen and just go down the list, one at a time, in the order I have all the strings listed in that text file.
deback is offline   Reply With Quote
Old 01-21-2018, 10:51 PM   #8
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by deback View Post
Thank you. When you're a fast typist, as I am, it really is the quickest way to get through the entire list of things I search for. I have Editpad open on the left side of my screen and just go down the list, one at a time, in the order I have all the strings listed in that text file.
Sorry, I find it impossible to think that:

- alt-tab to Editpad
- select the search text
- ctrl-c to copy the search text
- alt-tab to calibre
- ctrl-f to put the cursor in the find field
- ctrl-v to past the search text
- alt-tab to Editpad
- select the change text
- ctrl-c to copy the change text
- alt-tab to calibre
- tab to get to the change field
- ctrl-v to past the change text
- press enter to search
- press whatever to make the change (don't know what the keyboard shortcut is)
- repeat the last two for all occurrences in the file Or use change all if it is safe
- repeat all of the above for all of the search/changes

is faster than what I described. Even if I do one saved search at a time, all I am doing is selecting the next search in the list and pressing the buttons. And if I added in the number of mistakes I would expect in going through a long list, then doing it manually gets even worse.
davidfor is offline   Reply With Quote
Old 01-21-2018, 11:29 PM   #9
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
No, I have much faster ways to do what you described than to go through all that you listed. My problem is I do this all so quickly that I have to wait for the software sometimes, even on this very fast computer I built.

Hint: I don't use alt-tab, I don't use tab, I don't use ctrl-f, and I don't use Enter to search. I use one hand on the mouse and the other hand on ctrl-c and ctrl-v, and I use a monitor that's large enough to have each window sized to be able to access each of them with the mouse without the need to use alt-tab or any other method to switch between windows. Trust me. This is much quicker than using Saved Searches, which I used for a short time almost three years ago, until I came up with this much faster method.

Last edited by deback; 01-21-2018 at 11:41 PM.
deback is offline   Reply With Quote
Old 01-23-2018, 12:22 PM   #10
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Only a open minded thought...

I use S&R with saved searches quite often. Something that you will never make as fast as with saved searches is block changes in a chain. But this isn't the point.

I believe that you are capable to do fast copy & past actions, but I didn't see often people who was really fast with keyboards; not to say that the majority of users still won't have the capability to do this in the way you do it. So why should your experience work better for all? More a rhetorical question

It could have maybe also to do with a good setup for a workspace - having tools on a place where you need them and not clicking around within menu's. I often see people exactly doing this instead of taking a bit more time for thinking and then modifying the workplace in the way they need it.

I was quite happy when Kovid starts his work for the calibre editor and took as well a closer look to Sigil. He implement some of Sigil's good concepts as they was good and well developed from users who work with this tools on a day to day business. Saved searches is surely one of this. An other good concept was the flexible windows where a user is able to configure a workplace as he need it for his specific work.

For me it often looks like a lot of people don't know to use the capabilities of both programs.

I won't say that there is no space for additional little improvements, but the way it works now is (for me) way better than doing copy and past for S&R, es because what is with the rest of setup a search, combining searches for complex activities?
Divingduck is offline   Reply With Quote
Old 01-25-2018, 10:50 PM   #11
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I have been using the "saved searches" tool for quite a long time and enjoy every feature of it.

- You can call a group of searches by a code word on the top line
- You can execute a group search (select with Shift)
- You can have a detailed report of every regex of this group (before="count" or after).

...
roger64 is offline   Reply With Quote
Old 01-31-2018, 06:21 AM   #12
Katja_hbg
Groupie
Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.
 
Posts: 167
Karma: 158116
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
Quote:
Originally Posted by roger64 View Post
Hi

I have been using the "saved searches" tool for quite a long time and enjoy every feature of it.

- You can call a group of searches by a code word on the top line
- You can execute a group search (select with Shift)
- You can have a detailed report of every regex of this group (before="count" or after).

...
Hm, this «saved searches tool» is for edit books only. Right?
I am not editing my books. I only update meta data always the same way.

Is there something similar to «saved search tool» possible for «bulk metadata edit dialog». I am looking to run my saved metadata search&replace as a group for several books in one go.
Katja_hbg is offline   Reply With Quote
Old 01-31-2018, 11:45 AM   #13
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Katja_hbg View Post
Hm, this «saved searches tool» is for edit books only. Right?
I am not editing my books. I only update meta data always the same way.

Is there something similar to «saved search tool» possible for «bulk metadata edit dialog». I am looking to run my saved metadata search&replace as a group for several books in one go.
We are talking Bulk mode S&R?
Yes. Look to the right. You get to basically save the filled form
The first Item in the form is the 'recover previously saved'
theducks is offline   Reply With Quote
Old 02-01-2018, 02:20 PM   #14
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by Divingduck View Post
So why should your experience work better for all? More a rhetorical question.
I don't recall ever saying that my experience would work better for all. Please show me where I said that.
deback is offline   Reply With Quote
Old 02-02-2018, 10:41 AM   #15
vr8ce
Enthusiast
vr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchforkvr8ce can load mercury with a pitchfork
 
vr8ce's Avatar
 
Posts: 31
Karma: 48958
Join Date: May 2017
Device: iPad Pro 9.7"
Quote:
Originally Posted by deback View Post
I don't recall ever saying that my experience would work better for all. Please show me where I said that.
You replied to an already resolved issue with this:
Quote:
Originally Posted by deback View Post
It's much quicker to place all your search and replace strings in one text file
You didn't say, "It's much quicker for me," you said it's quicker for "your searches." Which means you're talking to whoever's reading this. If that's not what you meant, then you need to be more careful about your wording.

You also missed, or ignored, that I asked about function mode. Which means I was already writing a Python function to do the replace work, which means a separate text list would be redundant and unnecessary. If I had a list of things that needed to be done, I would put the entire list in the function.

The whole rest of this thread after my reply to Kovid was pretty funny. I asked a very specific question, got a very specific answer, and then a fight (used metaphorically and tongue-in-cheek, not literally) breaks out about the whole concept of saved searches. The interweb is an amazing, and amusing, place.
vr8ce is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and Replace; delete "author" name from "serie" roosten Library Management 6 12-17-2015 11:38 AM
Choice lists for "Search" and "Replace" korben Editor 7 07-18-2014 04:03 PM
Regex or other method to find split quotations "" CyanBC Sigil 9 05-14-2013 02:52 PM
MS Word Find & Replace and "Smart" quotes question. Ahu Lee Workshop 1 01-14-2013 11:02 AM
timefmt, align="center", find replace Kirk Vomit Recipes 0 04-11-2012 05:03 AM


All times are GMT -4. The time now is 06:16 PM.


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