![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 1961918
Join Date: Feb 2012
Device: FBReader
|
Search/Replace ID?
I understand the reasons for not automatically changing the mobi-asin to amazon, but is it possible to do a search ("mobi-asin") and replace ("amazon") as the ID of selected books, without changing the actual number?
I must do this before I download metadata for selected books or it mostly returns the wrong book. Yes I just tested it on ver 1.1.0 selecting the first 20 books and the very first one was wrong. Since I began manually replacing the ID (mobi-asin) with ("amazon") it never once had an error. I see where I can search and replace several field entries but not ID identifiers themselves. If this is not possible please just say so. I love Calibre and am in it every day as reading is my "retirement job". When asked what I do, I tell people I'm a "bookkeeper". |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,299
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sure you can, choose the
search field identifiers, identifier type: mobi-asin the search for expression (.*) the replace expression \1 destination field: identifiers destination identifier type: amazon This will copy all mobi-asin ids to amazon ids in books that have mobi-asin ids. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 1961918
Join Date: Feb 2012
Device: FBReader
|
I've been giving this a solid try and am close but hit a bump. I'm selecting books, go to Edit Metadata in Bulk. I select the following:
Search Field: identifiers Identifier Type: mobi-asin Search For: .* Replace With: .* Identifier Type: amazon NOTE: These are all the fields I see. I don't know where to apply the "\1" you show for replace expression as there isn't a field. My entries result in the the following: On books that have a mobi-asin, it adds the amazon ID with the same number as the mobi-asin and leaves the mobi-asin in place. On books with an amazon ID but not a mobi-asin ID it deletes the amazon ID. I can use this by checking each book for the mobi-asin id or just take a chance since they all seem to have it. But if feels incomplete and I wonder if that "\1" is crucial. Am I entering this in the right place? I do want it to only modify the books selected, not the entire library. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,401
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
Search Field: identifiers Identifier Type: mobi-asin Search For: (.*) Replace With: \1 Identifier Type: amazon And yes, this S/R will create a new identifier "amazon". It won't delete the identifier "mobi-asin". You need to do that in a second-pass S/R, changing the destination identifier type to mobi-asin and removing the \1 from replace with. |
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 103
Karma: 1961918
Join Date: Feb 2012
Device: FBReader
|
Code:
Search Field: identifiers Identifier Type: mobi-asin Search For: (.*) Replace With: \1 Identifier Type: amazon The delete as follows did not work Code:
Search Field: identifiers Identifier Type: mobi-asin Search For: (.*) Replace With: Identifier Type: mobi-asin Thanks for all your help. This will save me a lot of time. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search and Replace | SOThunder | Conversion | 2 | 04-29-2012 08:29 AM |
Search and replace | TdeV | Sigil | 1 | 10-30-2011 04:45 PM |
search and replace - drops blanks in replace ? | cybmole | Conversion | 10 | 03-13-2011 03:07 AM |
Search and replace in 0.2.0 | paulpeer | Sigil | 7 | 03-13-2010 11:59 AM |
Why no search and replace? | charleski | Sigil | 10 | 11-24-2009 04:13 PM |