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 02-13-2019, 06:02 PM   #16
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 791
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by theducks View Post
Maybe you could have your search use the 'OR' type regex (aword|bword|cword|dword)
I could do that, but it more of an efficiency / productivity question

I won't know apriori the word or words or phrases to build the OR RegEx Find.

Proofing or fixing a book, when I come across a word or phrase (typically foreign) that I want in italics (or bold or <span>-ed or whatever) everywhere in the book, I could select the text, and then run a stored search "Make Selection Italic" IF there were a way to have Find somehow use what ever is selected

MS Word's Find&Replace lets you use ^c for the clipboard contents, and there's so much in Calibre, I didn't know there was something similar, or if it could be easily added

Last edited by phossler; 02-13-2019 at 06:05 PM.
phossler is offline   Reply With Quote
Old 02-13-2019, 06:18 PM   #17
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: 22,625
Karma: 22515566
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by phossler View Post
I could do that, but it more of an efficiency / productivity question

I won't know apriori the word or words or phrases to build the OR RegEx Find.

Proofing or fixing a book, when I come across a word or phrase (typically foreign) that I want in italics (or bold or <span>-ed or whatever) everywhere in the book, I could select the text, and then run a stored search "Make Selection Italic" IF there were a way to have Find somehow use what ever is selected

MS Word's Find&Replace lets you use ^c for the clipboard contents, and there's so much in Calibre, I didn't know there was something similar, or if it could be easily added
Clips use what is selected
I have a clip
Code:
<span lang="es">\1</span>
The common ones, have show on the clip bar. The lesser use ones are in nested clip folders
I just select and click the LANG= clip on my toolbar
theducks is offline   Reply With Quote
Old 02-13-2019, 06:27 PM   #18
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 791
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
'Clips' or 'Snippets'?

I couldn't find 'Clips' and there doesn't seem to be 'Clips Toolbar'

You might be thinking of Sigil ???

Even so, they're more of an ad hoc thing IIRC, not a global F&R
phossler is offline   Reply With Quote
Old 02-13-2019, 06:45 PM   #19
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: 12,178
Karma: 10633638
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by phossler View Post
'Clips' or 'Snippets'?

I couldn't find 'Clips' and there doesn't seem to be 'Clips Toolbar'

You might be thinking of Sigil ???

Even so, they're more of an ad hoc thing IIRC, not a global F&R
They're in Preferences->Editor Settings, see Snippets for doco.

BR
BetterRed is offline   Reply With Quote
Old 02-13-2019, 08:27 PM   #20
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: 22,625
Karma: 22515566
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by phossler View Post
'Clips' or 'Snippets'?

I couldn't find 'Clips' and there doesn't seem to be 'Clips Toolbar'

You might be thinking of Sigil ???

Even so, they're more of an ad hoc thing IIRC, not a global F&R
theducks is offline   Reply With Quote
Old 02-13-2019, 08:33 PM   #21
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 791
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by BetterRed View Post
They're in Preferences->Editor Settings, see Snippets for doco.

BR
Thanks, I've used snippets a little but they're still one at a time

jbacelar's suggestion seems to offer a way to do a global F&R

It just requires some careful manual copy/pasting, and not as IMHO user friendly as having a token representing the selected text
phossler is offline   Reply With Quote
Old 02-14-2019, 12:09 AM   #22
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: 34,049
Karma: 10261488
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Simply edit your saved search, replacing the matched word in the search definition, then run it on all files. Done in about 5 clicks.
kovidgoyal is offline   Reply With Quote
Old 02-14-2019, 10:58 AM   #23
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 791
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
Simply edit your saved search, replacing the matched word in the search definition, then run it on all files. Done in about 5 clicks.
That seems to be the consensus. Jbacelar said the same thing.

It's just that the book I'm trying to cleanup has many foreign words used many times each so I was looking for the most efficient to add <i> tags around each instance of each word

If there were a token (e.g. _SELECTION_) that could be used in the saved search, then it'd only be one click: Select word/phrase, click Saved Search
phossler is offline   Reply With Quote
Old 02-14-2019, 11:02 AM   #24
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: 34,049
Karma: 10261488
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
opena text file go through th ebook selecting the words one by one and copying them into the text file, separated by | then use that expression ina single search and replace.
kovidgoyal is offline   Reply With Quote
Old 02-14-2019, 02:57 PM   #25
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 791
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
opena text file go through th ebook selecting the words one by one and copying them into the text file, separated by | then use that expression ina single search and replace.
I usually stumble across words/phrases going through the book one at a time, so I know I'd miss something many times and have to keep repeating

So for now, jbacelar's suggestion seems to offer the most flexible way to do a global F&R for <i>Things like this</i>

Thanks to everyone for the ideas and suggestions
phossler is offline   Reply With Quote
Old 02-14-2019, 07:06 PM   #26
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: 12,178
Karma: 10633638
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@phossler - IIRC one of the Sigil cleanup plugins works off word lists, I'm not sure if the replacement can include tags - might be worth a look.

BR
BetterRed is offline   Reply With Quote
Old 02-14-2019, 10:22 PM   #27
phossler
Guru
phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.phossler can grok the meaning of the universe.
 
Posts: 791
Karma: 156340
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@BetterRed --

Thanks for the tip. I used to use Sigil, but when Kovid released his editor module, I switched and standardized on Calibre.

I guess I'll bite the bullet and use jacelar's and KG's suggestion paste the word or phrase into the saved search Find box and do a replace all

It's still much easier than the way I was doing it with the Find/Replace at the bottom of the screen

I'll have a series of saved searches: one to put <i> around all instances of a foreign word or phrase, and others to put a <span lang= .… > around foreign text (might include italics there - hmmm, didn't think of that)

Not sure what the actual rules are for marking/tagging foreign text is, but that'll be a fun research project for another day


Added - actually, the document language is English, so spell check flags the foreign words. From the spell check error report, I can copy the word to the saved search and do a replace all. Removes it from spell check error since I don't like to Ignore or Add To Dictionary

Doesn't work for phrases tho

Last edited by phossler; 02-14-2019 at 10:37 PM.
phossler is offline   Reply With Quote
Old 02-14-2019, 10:40 PM   #28
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: 12,178
Karma: 10633638
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@phossler - I don't see them as either/or, so I use both - I find some things easier in Sigil than calibre and vice-versa. And Sigil has a some useful plugins.

IIRC the Sigil devs are planning to dispense with the rigid folder structure.

BR
BetterRed 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
Difference in Manual Search and Saved Search phossler Editor 4 10-04-2015 01:17 PM
A wee request regarding search notification (and file selection) sherman Editor 1 04-06-2014 11:50 AM
Sending selection from Search & Replace to different fields? MelBr Calibre 2 03-05-2013 02:00 PM
Saved Search: How 2 theducks Library Management 3 11-27-2012 03:10 PM
Need help setting up a saved search ficbot Calibre 1 07-10-2010 03:10 PM


All times are GMT -4. The time now is 05:39 AM.


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