![]() |
#1 |
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
In REGEX Mode, always escape special characters(like): \& \. \+ \? so they are treated as characters, not controls |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
|
REGEX Mode?
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,338
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#5 |
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
|
I guess the joke's on me.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#7 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 |
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
|
In the operation(s) I did, I used the default, "character match." The other choice was "regular expression." Is that what you mean? Thanks.
|
![]() |
![]() |
![]() |
#9 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:"&" |
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,338
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
authors:#>1
|
![]() |
![]() |
![]() |
#11 | |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#12 | ||
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 69
Karma: 118162
Join Date: Nov 2012
Location: USA
Device: Kindle, Kindle Paperwhite, Nook Tablet
|
Quote:
Quote:
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. |
||
![]() |
![]() |
![]() |
#13 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
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.
|
![]() |
![]() |
![]() |
#14 |
Did someone say Python?
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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?
|
![]() |
![]() |
![]() |
#15 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |