Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-16-2013, 08:15 PM   #1
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
Global Search and Replace Question

I used Edit Metadata in Bulk to search the Authors field for the character ; and replace it with the character &. Yes, I have a backup. Yes, I tried a test first and the replace seemed to work properly.

After this operation on around 700 titles, I used Advanced Search/Author to search for all instances of "&". The search finds zero results. Searching on other fields for the character "&" does return results. I am not missing any records that I can tell.

Any thoughts on why this is?
Joan M is offline   Reply With Quote
Old 02-16-2013, 08:59 PM   #2
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: 31,043
Karma: 60358908
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 Joan M View Post
I used Edit Metadata in Bulk to search the Authors field for the character ; and replace it with the character &. Yes, I have a backup. Yes, I tried a test first and the replace seemed to work properly.

After this operation on around 700 titles, I used Advanced Search/Author to search for all instances of "&". The search finds zero results. Searching on other fields for the character "&" does return results. I am not missing any records that I can tell.

Any thoughts on why this is?
Symbols can be special characters.
In REGEX Mode, always escape special characters(like): \& \. \+ \?
so they are treated as characters, not controls
theducks is offline   Reply With Quote
Advert
Old 02-16-2013, 09:18 PM   #3
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
REGEX Mode?
Joan M is offline   Reply With Quote
Old 02-16-2013, 09:51 PM   #4
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: 45,338
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://manual.calibre-ebook.com/regexp.html
kovidgoyal is offline   Reply With Quote
Old 02-16-2013, 09:55 PM   #5
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
I guess the joke's on me.
Joan M is offline   Reply With Quote
Advert
Old 02-16-2013, 10:27 PM   #6
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
No disrespect intended, truly, but I followed the instructions provided in that Edit Metadata in Bulk and something weird resulted. Assuming I don't want to master some aspect of Python (other than the ones in my avatar) right now, could someone tell me what I could do to have things revert back to normal?

Uninstall calibre?
Install my backup?

Some of us are not geeks. Thanks for any help.

ETA: In fairness, I see that theducks did answer my original question.

Last edited by Joan M; 02-16-2013 at 10:30 PM.
Joan M is offline   Reply With Quote
Old 02-17-2013, 02:34 AM   #7
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
In the search and replace dialogue you can specify what mode you want to use. There you can turn off RegExp mode, if you wish.
Adoby is offline   Reply With Quote
Old 02-17-2013, 02:58 AM   #8
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
Quote:
Originally Posted by Adoby View Post
In the search and replace dialogue you can specify what mode you want to use. There you can turn off RegExp mode, if you wish.
In the operation(s) I did, I used the default, "character match." The other choice was "regular expression." Is that what you mean? Thanks.
Joan M is offline   Reply With Quote
Old 02-17-2013, 11:34 AM   #9
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
Since the ampersand is used to separate authors, you can't search authors for & directly.

But in the field author_sort the authors are combined, with the & as separator. So if you search in author_sort you can list all books with multiple authors.

Put this in the search bar: author_sort:"&"
Adoby is offline   Reply With Quote
Old 02-17-2013, 10:54 PM   #10
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: 45,338
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
authors:#>1
kovidgoyal is offline   Reply With Quote
Old 02-18-2013, 01:50 AM   #11
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
Thanks. I looked for that before, without any luck. Live and learn.

http://manual.calibre-ebook.com/gui.html#search-sort
Quote:
You can search for the number of items in multiple-valued fields such as tags. These searches begin with the character #, then use the same syntax as numeric fields. For example, to find all books with more than 4 tags use tags:#>4. To find all books with exactly 10 tags use tags:#=10.
Adoby is offline   Reply With Quote
Old 02-18-2013, 02:31 AM   #12
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
Quote:
Originally Posted by Adoby View Post
Since the ampersand is used to separate authors, you can't search authors for & directly.
No, really, I could indeed search directly in all fields (before I did that global search and replace) by just clicking on the binoculars icon on the left of the search bar. If I entered "&" or ";" in, say, the title or author field, it pulled up all such instances in those fields. This was important to me as I had hundreds of multiple authors in the authors field separated by ";" some with spaces before and after, others not; hundreds of titles in the authors fields, some with characters like ";" and on and on. But the global search and replace screwed that up for me. With no warning.
Quote:
Put this in the search bar: author_sort:"&"
Ooooh! That works! This was very useful information. Thank you.

Now, my simple-minded question earlier was serious. How would I get calibre to revert to how it was before? Uninstall calibre? Install my backup? Throw salt over my left shoulder? Thanks again.
Joan M is offline   Reply With Quote
Old 02-18-2013, 03:16 AM   #13
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Joan M View Post
Now, my simple-minded question earlier was serious. How would I get calibre to revert to how it was before? Uninstall calibre? Install my backup? Throw salt over my left shoulder? Thanks again.
Exit calibre and restore your backup library. If nothing else has changed you can simply replace the metadata.db with your backup metadata.db file.
DoctorOhh is offline   Reply With Quote
Old 02-18-2013, 03:32 AM   #14
Joan M
Did someone say Python?
Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.Joan M 's ceiling is 100% spider-free.
 
Joan M's Avatar
 
Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
Now don't laugh at me, but if I exit calibre, how do I restore my backup library?
Joan M is offline   Reply With Quote
Old 02-18-2013, 03:35 AM   #15
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Joan M View Post
Now don't laugh at me, but if I exit calibre, how do I restore my backup library?
How did you create your backup library?
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
question about search and replace 0.4.904 congngo Sigil 9 01-06-2012 02:25 AM
Search and Replace Question MacEvansCB Conversion 1 12-10-2011 02:19 PM
calibre search & replace question Kelby ePub 1 09-29-2011 01:14 PM
Search & Replace question - something not right curiosity Library Management 21 06-15-2011 11:33 AM
Search/Replace Question seagull Sigil 22 03-21-2011 01:30 PM


All times are GMT -4. The time now is 06:18 AM.


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