|
|
Thread Tools | Search this Thread |
02-13-2017, 11:46 AM | #1 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Dec 2013
Device: Kindle/Android
|
Search/Replace MOBI-ASIN into AMAZON ID (I know this is only for USA)
When I import books from my Kindle to Amazon, they have a USA MOBI-ASIN.
I'd like to use the bulk search and replace of Meta-Data to replace all MOBI-ASIN into AMAZON, but only for those with a 10 character ASIN. If I use the identifier search, I can't figure out how to replace the mobi-asin:, only how to copy it to amazon. If I use search for identifier mobi-asin, and use identifier amazon as the destination, that copies the id to the AMAZON, but does not replace it. If I use {template} {indentifiers} to for search field/template Search for: mobi-asin:([a-z0-9]*) Replace with: amazon:\1 Then it does replace, but matches the non 10 character IDs I don't want to use (won't work). I tried ([a-z0-9]{10,}), but then it just matches the first 10 characters, and still replaces the mobi-asin with amazon. I tried this: mobi-asin:([a-z0-9]{10,})([\s]*) But I'm unsure if it will work in all cases, and messes up with duplicate AMAZON IDs if I do it for books that already have a AMAZON ID. I do wish there was an option in MOBI/AZW3 import to transform the MOBI-ASIN into AMAZON if I check a box saying "yes I know this only works if the book was purchased in USA". |
02-13-2017, 11:52 AM | #2 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Dec 2013
Device: Kindle/Android
|
Well, searching for {template} {identifiers} and then using identifiers as the destination with "amazon" as the destination creates a ugly mess of multiple amazon: prefixes.
Is there any way to make changes to {template} {identifiers} and have the destination be the entire identifiers field, not one specific identifier type? |
02-13-2017, 09:05 PM | #3 |
creator of calibre
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
Search for: mobi-asin:([a-z0-9]{10}) |
02-17-2017, 10:54 AM | #4 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Dec 2013
Device: Kindle/Android
|
If I am using the bulk metadata search and replace, if I put mobi-asin:([a-z0-9]{10}) in as the "Search for:"
Then I have to use {templates} as the search field, and {identifiers} as the Template, which again leads back to what do I use for the Destination field? If I use identifiers as the Destination field, then I have to specify a Identifier type, which makes a huge mess. Also when searching {templates} {identifiers} the search string mobi-asin:([a-z0-9]{10}) matches longer IDs like this, it just matches the first 10 characters of the ID. mobi-asin:d4efab34f4-58f1-5031-87de-656de5b5cf4c What I'd love is to be able to search/replace the identifiers field just like other fields, or even better a option when importing Kindle books for USA customers that allow us to use the MOBI-ASIN as the AMAZON id. |
02-17-2017, 11:20 AM | #5 |
creator of calibre
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Add a $ at the end to match only values of ten characters
Code:
([a-zA-Z0-9]{10})$ Last edited by kovidgoyal; 02-17-2017 at 11:22 AM. |
08-06-2017, 05:33 PM | #6 | |
Enthusiast
Posts: 37
Karma: 10
Join Date: Dec 2013
Device: Kindle/Android
|
Quote:
B071F9WGRQ and B071F9WGRQ-ABC So it matches all the long form MOBI-ASIN identifiers. I tried a few other variations, but it seems like the regular expressions are acting strangely on indentifiers? |
|
11-22-2017, 07:39 PM | #7 |
just an egg
Posts: 1,583
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
|
nevermind
Last edited by odamizu; 11-22-2017 at 10:15 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
force mobi-asin identifier download from amazon source? | blaenk | Calibre | 10 | 06-20-2016 02:15 AM |
Search & Replace on only mobi half of a mobi/k8 combined file | EliW | Conversion | 0 | 05-03-2013 11:50 PM |
Difference between mobi-asin and amazon? | MelBr | Library Management | 1 | 03-30-2013 12:05 AM |
how to get mobi-asin:B0xx into book.mobi - exth 113 | gggggg | Conversion | 4 | 03-25-2013 09:14 PM |
What happens when MOBI matches actual ASIN in Amazon's database? | Zero9 | Conversion | 0 | 05-29-2011 10:20 AM |